Zuble QML Types   |  Zuble C++ Classes   |  Table of Contents

Zuble Sprockets

Sprocket Extension Objects

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]