Hi Brett and welcome,
On 30/05/2014 23:14, Stottlemyer, Brett (B.S.) wrote:
Hi list,
My name is Brett Stottlemyer. I work for Ford Motor Company, and Ford
has graciously agreed to let us contribute some of the cool stuff
we've developed back to Qt. We aren't quite done with everything yet
(still waiting on the Corporate CLA), but I will be at Qt Contributors
Summit in a week and a half to discuss this and a 2nd project, and
answer (hopefully a bunch) of good questions.
I'd like to officially request a sandbox for: QQSM
What is it?
QQSM is the Qt QML State Machine. Simply put, it is a QML module to
allow you to create Qt State Machine Framework instances via the QML
engine.
This sounds really great to me. I've worked on a number of projects that
make use of QStateMachine et al and being able to define the state chart
using QML would save having to write a ton of boilerplate and remove the
need to subclass in many situations.
What need does this module solve?
QQSM makes it a lot easier to create state machines. You get all of
the benefits of the maturity of Qt's State Machine Framework, the
ability to introspect/debug the machine with tools like gammaray, but
with a simplified syntax and QML's runtime bindings. An example of
the simplification? A guard condition for a transition can use
QML/javascript and use signal parameters in deciding whether to
trigger a transition -- entirely in QML markup.
Detailed description
QQSM is basically a Domain Specific Language (in QML) for simplified
descriptions of State Machines. While the C++ State Machine Framework
is complete, it requires a lot of boilerplate code. The examples I've
seen have created numerous QSignalTransition derived classes, one for
each boolean condition required to test for a transition.
While QML already has a State type, this is not a complete,
deterministic state machine. This is an overly simplified state
machine, in that it provides little in terms of error checking or
nested states.
The proposed QQSM module, on the other hand, provides BasicState (to
not conflict with existing State type), HistoryState and FinalState,
plus StateMachine, SignalTransition and TimeoutTransition types. The
benefit of QML for State Machines is much more than just having to
write less code, though. Two features of the QML engine are runtime
processing of scripted code, and dynamic Signal/Slot connections.
Since all SignalTransition classes provide a boolean result for
eventTest(), a single C++ implementation was created that uses a
boolean property ("guard") for the eventTest result. This allows any
QML/Javascript expression that resolves to a boolean to be used. The
dynamic connections make is easy to bind onEntry and onExit signals to
non-state machine QObjects.
The end result is an environment that allows State Machines to be
developed rapidly and succinctly.
Hope you like the idea, and approve the sandbox area.
+1 from me. I'd love to see this made available.
Looking forward to your thoughts!
Thank you for offering this to the community!
Cheers,
Sean
--
Dr Sean Harmer | [email protected] | Managing Director UK
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development