• Stars
    star
    159
  • Rank 235,916 (Top 5 %)
  • Language
    C++
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A framework for creating Qt State Machine metacode using a graphical user interface

KDStateMachineEditor - Library for visualizing and editing state charts

Introduction

The KDAB State Machine Editor Library is a framework that can be used to help develop full-featured State Machine Editing graphical user interfaces and tools. Output from such applications is in metacode or QML that can then be used in larger Qt or QtQuick projects.

For a full description of the KDAB State Machine Editor Library, read our wiki on GitHub, https://github.com/KDAB/KDStateMachineEditor/wiki.

Screenshots

The main feature of KDStateMachineEditor is visualizing and editing state charts.

Note: A proof-of-concept application called kdstatemachineditor executable is part of this repository and will be built automatically. It can be run from the bin/ directory once the project built.

KDSME visualizing microwave_parallel.scxml

KDSME visualizing microwave_parallel.scxml

KDSME visualizing stickman.scxml

KDSME visualizing stickman.scxml

KDSME visualizing trafficreport.scxml (using a different theme)

KDSME visualizing trafficreport.scxml (using a different theme)

KDSME visualizing a live-running QScxmlStateMachine

KDSME visualizing a live-running QScxmlStateMachine

KDSME embedded in another application (here: GammaRay)

KDSME embedded in another application (here: GammaRay)

Features

  • Internal API to create state charts

    • Consisting of states and transitions
    • Also supports history/initial states (in short: everything the SCXML spec provides)
  • QML scene which shows the state charts

    • Custom items for drawing transitions using bezier curves
    • Editing: Drag & drop support, move support, etc.
    • Editing: Undo stack implementation, redo/undo actions for all operations
  • Abstract interface to layout state charts

    • GraphViz's cgraph is one of the implemented layouting backends (part of this repository)
  • Import/Export capabilities

    • Allows to import/export .scxml files
    • Allows to export .svg files
    • Allows to export .qml files (in QtQml.StateMachine syntax)
  • Allows to inspect running state machine instances

    • Both supports visualizing QStateMachine or QScxmlStateMachine
    • Can inspect remote applications (i.e. processes living on another machine)
    • Using QtRemoteObjects for communication
      • Requires the target application to be "instrumented", cf. the [qsmdebugger](examples/qsmdebugger/] example
  • Theming support (cf. screenshots above) -- currently available are:

    • DarkTheme
    • SystemTheme

GammaRay

KDStateMachineEditor's main user is KDAB's GammaRay, a tool for introspecting Qt application. GammaRay has the capability to display the state chart of a QStateMachine embedded in the application, making it possible to inspect the live configuration changes of the state machine, as well as zooming into child state (machines).

Building and running

We strongly recommend installing Graphviz:

    (Ubuntu) sudo apt install graphviz graphviz-dev
    (Fedora) dnf install graphviz graphviz-devel
    (Mac) brew install graphviz
    (Windows) choco install graphviz

of course you need a Qt5 or Qt6 installation and CMake too.

Build

Make sure you have cmake, ninja, compiler, Qt, etc in PATH.

    mkdir build
    cd build
    cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/path/where/to/install ..
    cmake --build
    cmake --build . --target install

Start the test app

    ./bin/kdstatemachineeditor

See INSTALL.txt for more information.

Known Issues

The editor part of the library still is somewhat "rough"; not a lot of development time has been spent on streamlining this feature.

Contributing

KDAB will happily accept external contributions, but substantial contributions require a signed Copyright Assignment Agreement.

Contact [email protected] for more information about the Copyright Assignment Agreement.

Please submit your contributions or issue reports from our GitHub space at https://github.com/KDAB/KDStateMachineEditor

Licensing

The KDAB State Machine Editor Library is (C) 2014-2023 KlarΓ€lvdalens Datakonsult AB (KDAB), and is licensed according to the terms of the LGPL 2.1.

Commercial licensing terms are available in the included file LicenseRef-KDAB-KDStateMachineEditor.txt.

For terms of redistribution, refer to the corresponding license agreement.

About KDAB

This State Machine Editor Library is supported and maintained by KlarΓ€lvdalens Datakonsult AB (KDAB).

The KDAB Group is the global No.1 software consultancy for Qt, C++ and OpenGL applications across desktop, embedded and mobile platforms.

The KDAB Group provides consulting and mentoring for developing Qt applications from scratch and in porting from all popular and legacy frameworks to Qt. We continue to help develop parts of Qt and are one of the major contributors to the Qt Project. We can give advanced or standard trainings anywhere around the globe on Qt as well as C++, OpenGL, 3D and more.

Please visit https://www.kdab.com to meet the people who write code like this.

Stay up-to-date with KDAB product announcements:

More Repositories

1

hotspot

The Linux perf GUI for performance analysis.
C++
4,027
star
2

GammaRay

GammaRay is a tool to poke around in a Qt-application and also to manipulate the application to some extent.
C++
1,410
star
3

codebrowser

Woboq CodeBrowser
C++
1,093
star
4

cxx-qt

Safe interop between Rust and Qt
Rust
998
star
5

KDDockWidgets

KDAB's Dock Widget Framework for Qt
C++
623
star
6

android_openssl

OpenSSL scripts and bins for Android (useful for Qt on Android apps)
C
313
star
7

KDToolBox

KDAB's collection of miscellaneous useful C++ classes and stuff
C++
259
star
8

KDBindings

Reactive programming & data binding in C++
C++
208
star
9

Charm

The Cross-Platform Time Tracker
C++
192
star
10

kdabtv

This repository contains the code of the examples showcased in the KDAB TV video series.
C++
186
star
11

DeclarativeWidgets

Library and tools for creating QtWidget UIs using QML
C++
168
star
12

KDSoap

A Qt-based client-side and server-side SOAP component
C++
140
star
13

kuesa

Professional 3D asset creation and integration workflow for Qt
C++
139
star
14

qt3d-examples

Qt3D Examples
C++
131
star
15

KDReports

Qt library for generating printable and exportable reports from code and from XML descriptions.
C++
115
star
16

KDChart

A Qt tool for creating business and scientific charts. This is the canonical repository for KDChart.
C++
99
star
17

KDAlgorithms

Algorithm wrappers
C++
77
star
18

sqlate

C++
58
star
19

android

KDAB's Android gems
C++
45
star
20

KDSingleApplication

KDAB's helper class for single-instance policy applications
CMake
45
star
21

integrating-qq2-with-opengl

C++
43
star
22

virtual-keyboard-demo

Example source code for the implementation of a virtual keyboard based on Qt input method framework
C++
42
star
23

Qt4to5

C++
40
star
24

KDMacTouchBar

KDAB's Qt Widget for the Mac Touch Bar
Objective-C++
37
star
25

KDTools

KDTools aims to ease the daily work of Qt programmers by providing a number of well-designed, easy-to-use widgets and non-gui classes.
C++
30
star
26

FatCRM

Desktop Application for SugarCRM
C++
28
star
27

qsslint

Linter for Qt stylesheet files
C++
21
star
28

ctf2ctf

Common Trace Format to Chrome Trace Format converter
C++
18
star
29

eglinfo

Provides information about available EGL configurations.
C++
16
star
30

perfparser

fork of qt-creator/perfparser.git with not-yet upstreamed changes required for hotspot
C++
15
star
31

GammaRay-plugin-examples

Example plug-ins for GammaRay
C++
14
star
32

homebrew-tap

Homebrew formulas for KDAB projects
Ruby
11
star
33

OpenEmbedded-Archos

An Angstrom distro for the Archos 101IT tablet based on OpenEmbedded, with Qt4 and Qt5 support including multitouch and OpenGL/ES2
C
11
star
34

KDBoatDemo

KDAB Nautical UI - concept of the next generation UI for sailing boats
QML
8
star
35

QMemstat

Inspect Pagemaps of Programs
C++
8
star
36

KDUtils

A set of C++ helpers and wrappers around the C++ standard library
C++
7
star
37

knut

Knut is an automation tool for code transformation using scripts.
C++
5
star
38

autogen

Common build system code for KDAB products
Python
5
star
39

clang-format-rs

clang-format wrapper for rust
Rust
4
star
40

patent_defense

Defensive Patent Publications
C
3
star
41

qnxtools

Python
3
star
42

KDGpu

KDGpu is a thin wrapper around Vulkan to make modern graphics easier to learn and use
C++
3
star
43

WebKit

QtWebkit clone
C++
2
star
44

event_loop_watchdog

A class to detect whenever your main event loop gets blocked for more than x milliseconds
Dart
2
star
45

vscode-qttest

VSCode extension for supporting Qt tests in the "Testing" sidebar
TypeScript
2
star
46

cabin-demo

KDAB Flutter demo application.
Dart
1
star
47

GammaRayPlatformProbe

GammaRay Platform Probe
C++
1
star
48

kdab-overlay

Gentoo Portage overlay containing KDAB software
Shell
1
star
49

kuserfeedbackdocker

Docker container for the KUserFeedback server.
PHP
1
star
50

unicode_view

Playground repo for unicode view
C++
1
star
51

blog-vscode-template

vscode template for C++ projects (Cross referenced by the blog, do not delete)
CMake
1
star