KDStateMachineEditor  1.0.0
A framework for creating Qt State Machine metacode using a graphical user interface
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)
 

Public Member Functions

 StateMachineView (QWidget *parent=nullptr)
 
StateMachineScenescene () const
 
CommandControllercommandController () const
 
EditControllereditController () const
 
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::StateMachineScene scene
 
KDSME::CommandController commandController
 
KDSME::EditController editController
 

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)
Qt-related services and products
http://www.kdab.com/
https://github.com/KDAB/KDStateMachineEditor