KDStateMachineEditor API Documentation
2.1
Loading...
Searching...
No Matches
src
view
command
createelementcommand_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: 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_COMMAND_CREATEELEMENTCOMMAND_P_H
17
#define KDSME_COMMAND_CREATEELEMENTCOMMAND_P_H
18
19
#include "
command_p.h
"
20
#include "
element.h
"
21
22
namespace
KDSME
{
23
24
class
KDSME_VIEW_EXPORT
CreateElementCommand
:
public
Command
25
{
26
Q_OBJECT
27
Q_PROPERTY(
KDSME::Element
*parentElement READ parentElement WRITE setParentElement NOTIFY parentElementChanged)
28
Q_PROPERTY(
KDSME
::
Element
::Type type READ type WRITE setType NOTIFY typeChanged)
29
30
public:
31
explicit
CreateElementCommand
(
StateModel
*model =
nullptr
,
32
Element
::Type type =
Element
::ElementType,
33
QUndoCommand *parent =
nullptr
);
34
~
CreateElementCommand
();
35
36
Element
*parentElement() const;
37
void
setParentElement(
Element
*parentElement);
38
39
Element
::Type type() const;
40
void
setType(
Element
::Type type);
41
42
Element
*createdElement() const;
43
44
int
id
()
const override
45
{
46
return
CreateElement;
47
}
48
49
void
redo()
override
;
50
void
undo()
override
;
51
52
Q_SIGNALS:
53
void
parentElementChanged
(
KDSME::Element
*parentElement);
54
void
typeChanged
(
KDSME::Element::Type
type);
55
56
private
:
57
void
updateText();
58
59
Element
*m_parentElement;
60
Element::Type
m_type;
61
62
Element
*m_createdElement;
63
};
64
65
}
66
67
#endif
KDSME::Command
Definition
command_p.h:27
KDSME::CreateElementCommand
Definition
createelementcommand_p.h:25
KDSME::CreateElementCommand::parentElementChanged
void parentElementChanged(KDSME::Element *parentElement)
KDSME::CreateElementCommand::typeChanged
void typeChanged(KDSME::Element::Type type)
KDSME::Element
Definition
element.h:35
KDSME::Element::Type
Type
Definition
element.h:52
KDSME::StateModel
Definition
elementmodel.h:90
command_p.h
element.h
KDSME
Definition
mainwindow.h:21
© 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