BrickStore Extensions Documentation
The QML BrickStore module provides the necessary types for scripting extension in the desktop version (as well as for creating complete mobile user interfaces).
Installing an extension from a file, so that it can be used by BrickStore is covered here:
Porting old Scripts
Print scripts from old BrickStore (or BrickStock) versions are not compatible anymore and need to be ported manually. You can find a porting guide here:
Your best bet is to start by cloning an existing extension to get all the needed boiler plate code.
import BrickStore import BrickLink import QtQuick
Your root object is always Script followed by one or more child elements of type PrintingScriptAction and ExtensionScriptAction. All the other types can not be instantiated in a declarative way, but are instead provided to your extensions interface functions as parameters, or they can be dynamically created/retrieved via the global singletons BrickStore and BrickLink.
These types are available to setup and manage an extension:
Use this type to add an UI action to your extension
Use this type to add a print action to your extension
Root element of any BrickStore extension file
While the extension is active, you have acess to these types:
Core singleton managing the data transfer from and to BrickLink
This singleton represents global settings and state
This value type represents a BrickLink item category
This value type represents a BrickLink color
Each instance of this type represents an open document
This value type represents a BrickLink item
This value type represents a BrickLink item type
This value type represent a lot in a document
This type holds the information about a BrickLink order
This value type represents a picture of a BrickLink item
This value type represents the price guide for a BrickLink item
In addition to that, printing extensions also use these types:
An instance of this type represents an active print job
An instance of this type represents the canvas of a printer page
console.log() calls end up in BrickStore's error log, which is available via the
View info docks menu.
If you throw an
Error object, the script execution will terminate and the
message property of the thrown object will be shown to the user in a message box.
© 2004-2023 Robert Griebl. 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. All trademarks are property of their respective owners.