KDStateMachineEditor API Documentation  1.2
Classes | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KDSME::StateMachineView Class Reference

Widget for displaying a KDSME::StateMachine in a Qt Quick based view. More...

#include <statemachineview.h>

Inheritance diagram for KDSME::StateMachineView:
Inheritance graph
[legend]

Classes

struct  Private
 

Signals

void sceneChanged (KDSME::StateMachineScene *scene)
 
void themeNameChanged (const QString &themeName)
 

Public Member Functions

 StateMachineView (QWidget *parent=nullptr)
 
StateMachineScenescene () const
 
CommandControllercommandController () const
 
EditControllereditController () const
 
QString defaultThemeName () const
 
QString themeName () const
 
void setThemeName (const QString &themeName)
 
Q_INVOKABLE void sendCommand (KDSME::Command *cmd)
 
Q_INVOKABLE void fitInView ()
 
Q_INVOKABLE void changeStateMachine (KDSME::StateMachine *stateMachine)
 
Q_INVOKABLE void deleteElement (KDSME::Element *element)
 

Protected Member Functions

QQuickItem * viewPortObject () const
 
QQuickItem * sceneObject () const
 

Properties

KDSME::StateMachineScenescene
 
KDSME::CommandControllercommandController
 
KDSME::EditControllereditController
 
QString themeName
 

Detailed Description

Widget for displaying a KDSME::StateMachine in a Qt Quick based view.

Simple example building up and display a state machine in a view:

StateMachine machine;
State s1(&machine);
s1.setLabel("s1");
State s2(&machine);
s2.setLabel("s2");
s1.addSignalTransition(&s2);
StateMachineView view;
view.scene()->setRootState(&machine);
view.scene()->layout();
view.resize(800, 600);
view.show();
Examples
scxmlimport/main.cpp, and simplestatemachine/main.cpp.

The documentation for this class was generated from the following files:

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