Krita Source Code Documentation
Loading...
Searching...
No Matches
KoAddRemoveShapeCommands.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KoAddRemoveShapeCommands_H
8#define KoAddRemoveShapeCommands_H
9
10#include "kritaflake_export.h"
11
12#include "kis_command_utils.h"
13
14class KoShape;
16
17
19{
20 KoAddRemoveShapeCommandImpl(KoShape *shape, KoShapeContainer *parent, State state, KUndo2Command *parentCommand);
22
23 void partA() override;
24 void partB() override;
25
26private:
27 bool m_ownShape = true;
28 KoShape *m_shape = 0;
29 KoShapeContainer *m_parent = 0;
30};
31
32struct KRITAFLAKE_EXPORT KoAddShapeCommand : public KoAddRemoveShapeCommandImpl
33{
34 KoAddShapeCommand(KoShape *shape, KoShapeContainer *parent, KUndo2Command *parentCommand = 0);
35};
36
37struct KRITAFLAKE_EXPORT KoRemoveShapeCommand : public KoAddRemoveShapeCommandImpl
38{
39 KoRemoveShapeCommand(KoShape *shape, KoShapeContainer *parent, KUndo2Command *parentCommand = 0);
40};
41
42#endif // KoAddRemoveShapeCommands_H