KDStateMachineEditor API Documentation
1.2
source
src
view
commandcontroller.h
1
/*
2
This file is part of the KDAB State Machine Editor Library.
3
4
SPDX-FileCopyrightText: 2014-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5
Author: Kevin Funk <kevin.funk@kdab.com>
6
7
SPDX-License-Identifier: LGPL-2.1-only OR LicenseRef-KDAB-KDStateMachineEditor
8
9
Licensees holding valid commercial KDAB State Machine Editor Library
10
licenses may use this file in accordance with the KDAB State Machine Editor
11
Library License Agreement provided with the Software.
12
13
Contact info@kdab.com if any conditions of this licensing are not clear to you.
14
*/
15
16
#ifndef KDSME_COMMANDCONTROLLER_H
17
#define KDSME_COMMANDCONTROLLER_H
18
19
#include "kdsme_view_export.h"
20
21
#include "abstractcontroller.h"
22
23
QT_BEGIN_NAMESPACE
24
class
QUndoCommand
;
25
class
QUndoStack
;
26
QT_END_NAMESPACE
27
28
namespace
KDSME {
29
class
Command;
30
class
State;
31
class
StateModel;
32
33
class
KDSME_VIEW_EXPORT
CommandController
:
public
AbstractController
34
{
35
Q_OBJECT
36
Q_PROPERTY(
QUndoStack
* undoStack READ undoStack CONSTANT)
37
38
public
:
39
explicit
CommandController
(
QUndoStack
* undoStack,
StateMachineView
* parent);
40
~
CommandController
();
41
42
Q_INVOKABLE
void
push(KDSME::Command* command);
43
44
void
clear();
45
46
QUndoStack
* undoStack()
const
;
47
48
private
:
49
struct
Private;
50
QScopedPointer<Private>
d;
51
};
52
53
}
54
55
Q_DECLARE_METATYPE(
KDSME::CommandController
*)
56
57
#endif // COMMANDCONTROLLER_H
KDSME::StateMachineView
Widget for displaying a KDSME::StateMachine in a Qt Quick based view.
Definition:
statemachineview.h:40
QUndoCommand
QUndoStack
KDSME::AbstractController
Definition:
abstractcontroller.h:28
QScopedPointer< Private >
KDSME::CommandController
Definition:
commandcontroller.h:34
Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor