KDStateMachineEditor API Documentation 2.1
Loading...
Searching...
No Matches
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
21namespace KDSME {
22class StateMachine;
24class StateModel;
27}
28
29QT_BEGIN_NAMESPACE
30class QStandardItemModel;
31
32namespace Ui {
33class MainWindow;
34}
35QT_END_NAMESPACE
36
37class MainWindow : public QMainWindow
38{
39 Q_OBJECT
40
41public:
46
47 explicit MainWindow(QWidget *parent = nullptr, Qt::WindowFlags f = {});
49
51 QString selectedFile() const;
52
53 void loadPresets(const QString &presetsDir);
54
55public Q_SLOTS:
56 void setStateMachine(KDSME::StateMachine *stateMachine);
58
59 void createNew();
60
61private Q_SLOTS:
62 void importFromScxmlFile(const QString &filePath);
63
64 void handlePresetActivated(const QModelIndex &index);
65
66private:
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
Widget for displaying a KDSME::StateMachine in a Qt Quick based view.
QString selectedFile() const
When in PresetsInputMode, return the currently selected file name.
void setStateMachine(KDSME::StateMachine *stateMachine)
void loadPresets(const QString &presetsDir)
void setInputMode(MainWindow::InputMode mode)
void createNew()
@ PresetsInputMode
Definition mainwindow.h:44

© 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