Krita Source Code Documentation
Loading...
Searching...
No Matches
EditAssistantsCommand.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Tusooa Zhu <tusooa@vista.aero>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#include <QPointer>
8
9#include <kundo2command.h>
11
12class KisCanvas2;
13
15{
17public:
18 enum Type {
19 ADD = -1,
20 REMOVE = 1,
21 EDIT = 0
22 };
23 EditAssistantsCommand(QPointer<KisCanvas2> canvas, AssistantSPList origAssistants, AssistantSPList newAssistants, KUndo2Command *parent = 0);
24 EditAssistantsCommand(QPointer<KisCanvas2> canvas, AssistantSPList origAssistants, AssistantSPList newAssistants, Type type, int index, KUndo2Command *parent = 0);
25
26 void undo() override;
27 void redo() override;
28
29private:
30 void replaceWith(AssistantSPList assistants, Type type = EDIT);
36};
QList< KisPaintingAssistantSP > AssistantSPList
EditAssistantsCommand(QPointer< KisCanvas2 > canvas, AssistantSPList origAssistants, AssistantSPList newAssistants, KUndo2Command *parent=0)
QPointer< KisCanvas2 > m_canvas
void replaceWith(AssistantSPList assistants, Type type=EDIT)