KDStateMachineEditor API Documentation
2.1
Loading...
Searching...
No Matches
src
view
command
changestatemachinecommand_p.h
Go to the documentation of this file.
1
/*
2
This file is part of the KDAB State Machine Editor Library.
3
4
SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5
Author: Sebastian Sauer <sebastian.sauer@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_COMMAND_CHANGESTATEMACHINECOMMAND_P_H
17
#define KDSME_COMMAND_CHANGESTATEMACHINECOMMAND_P_H
18
19
#include "
command_p.h
"
20
21
#include "
state.h
"
22
23
#include <QPointer>
24
25
namespace
KDSME
{
26
27
class
StateMachineScene;
28
class
StateMachine;
29
35
class
KDSME_VIEW_EXPORT
ChangeStateMachineCommand
:
public
Command
36
{
37
Q_OBJECT
38
Q_PROPERTY(
KDSME::State
*stateMachine READ stateMachine WRITE setStateMachine NOTIFY stateMachineChanged)
39
40
public
:
41
explicit
ChangeStateMachineCommand
(
KDSME::StateMachineScene
*view, QUndoCommand *parent =
nullptr
);
42
43
int
id
()
const override
44
{
45
return
ChangeStateMachine;
46
}
47
48
KDSME::State
*stateMachine()
const
;
49
void
setStateMachine(
KDSME::State
*stateMachine);
50
51
void
redo()
override
;
52
void
undo()
override
;
53
54
Q_SIGNALS:
55
void
stateMachineChanged
(
KDSME::State
*statemachine);
56
57
private
:
58
QPointer<StateMachineScene> m_view;
59
QPointer<State> m_oldStateMachine, m_newStateMachine;
60
};
61
62
}
63
64
#endif
// REPARENTELEMENTCOMMAND_P_H
KDSME::ChangeStateMachineCommand
Changes the state machine of a KDSME::StateMachineScene and records the old state machine the scene w...
Definition
changestatemachinecommand_p.h:36
KDSME::ChangeStateMachineCommand::stateMachineChanged
void stateMachineChanged(KDSME::State *statemachine)
KDSME::ChangeStateMachineCommand::id
int id() const override
Definition
changestatemachinecommand_p.h:43
KDSME::Command
Definition
command_p.h:27
KDSME::StateMachineScene
Definition
statemachinescene.h:35
KDSME::State
Definition
state.h:29
command_p.h
KDSME
Definition
mainwindow.h:21
state.h
© 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
Generated on Tue Jul 15 2025 15:21:47 for KDStateMachineEditor API Documentation by doxygen 1.9.8