Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_gui_context_command.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
9
10
12 : m_command(command),
13 m_delegate(new KisGuiContextCommandDelegate(0))
14{
19 m_delegate->moveToThread(guiObject->thread());
20
21 connect(this, SIGNAL(sigExecuteCommand(KUndo2Command*,bool)),
22 m_delegate.data(), SLOT(executeCommand(KUndo2Command*,bool)),
23 Qt::BlockingQueuedConnection);
24}
25
29
31{
32 Q_EMIT sigExecuteCommand(m_command.data(), true);
33}
34
36{
37 Q_EMIT sigExecuteCommand(m_command.data(), false);
38}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void sigExecuteCommand(KUndo2Command *command, bool undo)
QScopedPointer< KisGuiContextCommandDelegate > m_delegate
QScopedPointer< KUndo2Command > m_command
KisGuiContextCommand(KUndo2Command *command, QObject *guiObject)