Debian Codegraph @

src/libs/kernel/commands/RemoveResourceCmd.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 KPTREMOVERESOURCECMD_H
11 #define KPTREMOVERESOURCECMD_H
12
13 #include "plankernel_export.h"
14
15 #include "AddResourceCmd.h"
16 #include "MacroCommand.h"
17
18
19 /// The main namespace
20 namespace KPlato
21 {
22
23 class Resource;
24 class ResourceRequest;
25 class Appointment;
26
27 class PLANKERNEL_EXPORT RemoveResourceCmd : public AddResourceCmd
28 {
29 public:
30 RemoveResourceCmd(Resource *resource, const KUndo2MagicString& name = KUndo2MagicString());
31 ~RemoveResourceCmd() override;
32 void execute() override;
33 void unexecute() override;
34
35 private:
36 QList<ResourceRequest*> m_requests;
37 QList<Appointment*> m_appointments;
38 MacroCommand m_preCmd;
39 MacroCommand m_postCmd;
40 };
41
42 }
43
44 #endif