Giter Site home page Giter Site logo

sosflyyi / kdstatemachineeditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kdab/kdstatemachineeditor

0.0 0.0 0.0 2.55 MB

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

Home Page: https://kdab.github.io/KDStateMachineEditor/

JavaScript 0.25% Ruby 0.02% C++ 72.05% Python 1.65% C 0.57% Makefile 0.01% QML 9.26% CMake 16.17%

kdstatemachineeditor's Introduction

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:

kdstatemachineeditor's People

Contributors

winterz avatar krf avatar sebsauer avatar vkrause avatar albert-astals-cid-kdab avatar dfaure avatar pasnox avatar jpetersen avatar bog-dan-ro avatar stottle avatar e4z9 avatar nmariusp avatar mkrus avatar renatofilho avatar aholza avatar bweir avatar cschleifenbaum avatar krop avatar dantti avatar dfaure-kdab avatar petross404 avatar pre-commit-ci[bot] avatar tuxmaster5000 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.