KDStateMachineEditor API Documentation 2.3
Loading...
Searching...
No Matches
statemachineview.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_WIDGETS_STATEMACHINEVIEW_H
17#define KDSME_WIDGETS_STATEMACHINEVIEW_H
18
19#include "kdsme_view_export.h"
20
21#include <QQuickWidget>
22
23namespace KDSME {
24
25class Command;
26class EditController;
29class StateMachine;
30class Element;
31
39class KDSME_VIEW_EXPORT StateMachineView : public QQuickWidget
40{
41 Q_OBJECT
42 Q_PROPERTY(KDSME::StateMachineScene *scene READ scene WRITE setScene NOTIFY sceneChanged)
45
46 Q_PROPERTY(QString themeName READ themeName WRITE setThemeName NOTIFY themeNameChanged)
47
48public:
49 explicit StateMachineView(QWidget *parent = nullptr);
51
52 StateMachineScene *scene() const;
53
56
57 QString defaultThemeName() const;
58 QString themeName() const;
59 void setThemeName(const QString &themeName);
60
61 Q_INVOKABLE void sendCommand(KDSME::Command *cmd) const;
62
63 Q_INVOKABLE void fitInView();
64
65 Q_INVOKABLE void changeStateMachine(KDSME::StateMachine *stateMachine);
66 Q_INVOKABLE void deleteElement(KDSME::Element *element);
67
68protected:
69 QQuickItem *viewPortObject() const;
70 QQuickItem *sceneObject() const;
71
72Q_SIGNALS:
74 void themeNameChanged(const QString &themeName);
75
76private:
77 struct Private;
78 QScopedPointer<Private> d;
79
80 void setScene(StateMachineScene *scene);
81
82 Q_PRIVATE_SLOT(d, void onStateMachineChanged(KDSME::StateMachine *))
83};
84
85}
86
92
93#endif // STARTCHARTVIEW_H
void setThemeName(const QString &themeName)
KDSME::StateMachineScene * scene
QQuickItem * sceneObject() const
QQuickItem * viewPortObject() const
Q_INVOKABLE void deleteElement(KDSME::Element *element)
Q_INVOKABLE void changeStateMachine(KDSME::StateMachine *stateMachine)
KDSME::CommandController * commandController
Q_INVOKABLE void fitInView()
StateMachineView(QWidget *parent=nullptr)
KDSME::EditController * editController
void sceneChanged(KDSME::StateMachineScene *scene)
Q_INVOKABLE void sendCommand(KDSME::Command *cmd) const
void themeNameChanged(const QString &themeName)

© 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 for KDStateMachineEditor API Documentation by doxygen 1.15.0