KDStateMachineEditor API Documentation
2.1
Loading...
Searching...
No Matches
src
app
mainwindow.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: 2014 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
class
MainWindow
;
34
}
35
QT_END_NAMESPACE
36
37
class
MainWindow
:
public
QMainWindow
38
{
39
Q_OBJECT
40
41
public
:
42
enum
InputMode
43
{
44
PresetsInputMode
,
45
};
46
47
explicit
MainWindow
(QWidget *parent =
nullptr
, Qt::WindowFlags f = {});
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
(
MainWindow::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
KDSME::StateMachineScene
Definition
statemachinescene.h:35
KDSME::StateMachineView
Widget for displaying a KDSME::StateMachine in a Qt Quick based view.
Definition
statemachineview.h:40
KDSME::StateMachine
Definition
state.h:156
KDSME::StateModel
Definition
elementmodel.h:90
KDSME::TransitionListModel
Definition
elementmodel.h:51
MainWindow
Definition
mainwindow.h:38
MainWindow::selectedFile
QString selectedFile() const
When in PresetsInputMode, return the currently selected file name.
Definition
mainwindow.cpp:172
MainWindow::setStateMachine
void setStateMachine(KDSME::StateMachine *stateMachine)
Definition
mainwindow.cpp:134
MainWindow::loadPresets
void loadPresets(const QString &presetsDir)
Definition
mainwindow.cpp:82
MainWindow::setInputMode
void setInputMode(MainWindow::InputMode mode)
Definition
mainwindow.cpp:159
MainWindow::createNew
void createNew()
Definition
mainwindow.cpp:166
MainWindow::InputMode
InputMode
Definition
mainwindow.h:43
MainWindow::PresetsInputMode
@ PresetsInputMode
Definition
mainwindow.h:44
MainWindow::~MainWindow
~MainWindow()
Definition
mainwindow.cpp:75
KDSME
Definition
mainwindow.h:21
Ui
Definition
mainwindow.h:32
© 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