Sprockets are custom QML extension plugins that link directly to Zuble's zblcore plugin and register with the ZblCog object as a Zuble sprocket. They provide a means of extending Zuble's core plugin QML library with QML extension objects custom designed for the specific application. This provides the ability for parts of Zuble applications to be written in C++ when necessary for performance or other purposes. Since sprockets are linked directly to zblcore they can access Zuble's C++ interfaces directly.
Sprockets behave as normal QML extension plugins, providing QML objects to the QML engine by calling qmlRegisterType() from within the QQmlExtensionPlugin::registerTypes(const char* uri) method implementation.
However unlike normal, stand-alone QML extension plugins, sprockets also link directly to Zuble's core plugin and implement static object constructor functions for creating instances of their QML extension objects in Zuble's background script threads. QML code in background threads use the Zbl.newObject() method for creating instances of Sprocket QML objects from within Zuble background script threads.
[some stuff about sprocket design pattern, howto make a sprocket plugin]
Zuble documentation copyright © 2019 Bob Dinitto. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Zuble is a derivative work of Qt version 5. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.