KDStateMachineEditor API Documentation
1.2.50
Main Page
Namespaces
Classes
Examples
•
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Properties
Pages
source
src
app
mainwindow.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_APP_MAINWINDOW_H
17
#define KDSME_APP_MAINWINDOW_H
18
19
#include <QMainWindow>
20
21
namespace
KDSME
{
22
class
StateMachine;
23
class
StateMachineView;
24
class
StateModel;
25
class
TransitionListModel;
26
class
StateMachineScene;
27
}
28
29
QT_BEGIN_NAMESPACE
30
class
QStandardItemModel
;
31
32
namespace
Ui
33
{
34
class
MainWindow
;
35
}
36
QT_END_NAMESPACE
37
38
class
MainWindow
:
public
QMainWindow
39
{
40
Q_OBJECT
41
42
public
:
43
enum
InputMode {
44
PresetsInputMode,
45
};
46
47
explicit
MainWindow
(
QWidget
* parent =
nullptr
,
Qt::WindowFlags
f =
nullptr
);
48
~
MainWindow
();
49
51
QString
selectedFile()
const
;
52
53
void
loadPresets(
const
QString
& presetsDir);
54
55
public
Q_SLOTS:
56
void
setStateMachine(
KDSME::StateMachine
* stateMachine);
57
void
setInputMode(InputMode mode);
58
59
void
createNew();
60
61
private
Q_SLOTS:
62
void
importFromScxmlFile(
const
QString
& filePath);
63
64
void
handlePresetActivated(
const
QModelIndex
& index);
65
66
private
:
67
void
setupPresetsView();
68
void
setupStateMachineView();
69
void
setupObjectInspector();
70
void
setupActions();
71
72
Ui::MainWindow* ui;
73
74
QStandardItemModel
* m_presetsModel;
75
KDSME::TransitionListModel
* m_transitionsModel;
76
77
KDSME::StateMachineView
* m_stateMachineView;
78
QScopedPointer<KDSME::StateMachine, QScopedPointerDeleteLater>
m_owningStateMachine;
79
};
80
81
#endif // MAINWINDOW_H
QModelIndex
QStandardItemModel
QWidget
KDSME::TransitionListModel
Definition:
elementmodel.h:50
KDSME::StateMachine
Definition:
state.h:153
KDSME::StateMachineView
Widget for displaying a KDSME::StateMachine in a Qt Quick based view.
Definition:
statemachineview.h:39
Ui
Definition:
mainwindow.h:32
QScopedPointer< KDSME::StateMachine, QScopedPointerDeleteLater >
QString
QMainWindow
KDSME
Definition:
mainwindow.h:21
Qt::WindowFlags
typedef WindowFlags
MainWindow
Definition:
mainwindow.h:38
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