After some excellent feedback on Kent and Eskil's state machine framework, and on the old-time Qt-SCXML project, we now present the updated version, with the latest and greatest of both. Qt State Machine Framework Solution 1.1 now includes not only carefully designed API adjustments and bug fixes to the main state/transition classes, but it now also includes the Qt-SCXML functionality, loaded into the Qt State Machine Framework with the QtScriptedStateMachine class.
With both SCXML and the State Machine C++ API, you can choose whether your design calls for Qt/C++ style initialization of the state machine, or for loading external SCXML files that access Qt through scripting. The SCXML part also contains a few additions that are not implemented in the C++ API, such as anchors, and the ability to use scripted conditions to guard transitions (even without loading a whole SCXML file, with the QtScriptedTransition class).
Even with the aforementioned features, the SCXML support is a pretty thin layer on top of the C++ State Machine API, as it is basically some standard QXmlStreamReader code for parsing the SCXML file, QtScript for ecmascript transitions and actions, and a couple of additional goodies like menu/message-box and anchors.
Note that there might be a few minor discrepancies between the SCXML spec and what's supported in the implementation. That's due to the fact that the SCXML specification itself is still evolving. We're also participating in the group that makes that happen.
During the development of this solution, we made an attempt at creating a compiler similar to uic (the QtDesigner form compiler), that would generate C++ Qt State Machine code from the SCXML files, and thus reduce the load time of the state machine. We solicit feedback as to whether such feature is needed.
Some of the original features of Qt-SCXML have been enhanced, removed or modified in this spec. For example, instead of using the custom <Qt:property /> tag, we enable an invoke tag <invoke type="q-bindings" /> that does virtually the same thing. See the ported examples and you'll get the picture :)
Also, Qt-SCXML now supports only QtScript, and not the "native" sort-of-expression-syntax it supported before as an alternative. If you're interested in using Qt state-machines without using QtScript at all, We hope that the C++ API is an adequate answer.
If a removed feature from the old Qt-SCXML is extremely close to your heart, please speak your mind!
Any bug, question, suggestion or interesting use you have: email@example.com or here.
Download the latest release here: www.qt.io/download.
Qt 5.15 was developed with a strong focus on quality and is a long-term-supported (LTS) release that will be supported for 3 years.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don’t want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu