Debian Codegraph @

src/libs/kernel/commands/AddResourceCmd.h

raw
1 /* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2004-2007 Dag Andersen <[email protected]>
3 * SPDX-FileCopyrightText: 2011 Dag Andersen <[email protected]>
4 * SPDX-FileCopyrightText: 2016 Dag Andersen <[email protected]>
5 * SPDX-FileCopyrightText: 2019 Dag Andersen <[email protected]>
6 *
7 * SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9
10 #ifndef KPTADDRESOURCECMD_H
11 #define KPTADDRESOURCECMD_H
12
13 #include "plankernel_export.h"
14
15 #include "NamedCommand.h"
16
17
18 /// The main namespace
19 namespace KPlato
20 {
21
22 class Project;
23 class Resource;
24 class ResourceGroup;
25
26 class PLANKERNEL_EXPORT AddResourceCmd : public NamedCommand
27 {
28 public:
29 AddResourceCmd(Project *project, Resource *resource, const KUndo2MagicString& name = KUndo2MagicString());
30 AddResourceCmd(ResourceGroup *group, Resource *resource, const KUndo2MagicString& name = KUndo2MagicString());
31 ~AddResourceCmd() override;
32 void execute() override;
33 void unexecute() override;
34
35 protected:
36 Project *m_project;
37 Resource *m_resource;
38 ResourceGroup *m_group;
39 int m_index;
40 bool m_mine;
41 };
42
43 }
44
45 #endif