IRBCAM plugins
Developer reference for IRBCAM plugins
|
If you're new to plugin development for IRBCAM, this guide will walk you through the basics to get you started on the right track. Learn the structure of a plugin and how to use the IRBCAM interface. By the end of this section, you'll have a clear understanding of the initial steps in creating plugins for IRBCAM.
Plugins in IRBCAM are dynamically loaded QML files, meaning that a plugin in its simplest form is a single QML file. We recommend placing your QML components within a component from the Qt Layout Module. The following example shows a basic plugin, where a a button click changes the text of a label.
Let's start by loading this simple plugin. Open a text editor or IDE, paste the example code and save your file as SimplePlugin.qml
. This QML file is your plugin, and we want to load it into IRBCAM to check if it is working. Log in to IRBCAM and go to File > Settings > Plugins. Select Add Plugin and upload your file. Select a name and add your plugin.
Plugins are most useful when connected to the IRBCAM interface. By importing IRBCAM.InterfacePublic
in your QML file, you will get access to the plugin interface IrbcamInterfacePublic. Let's expand on the previous example.
In this example, we imported the IrbcamInterfacePublic and used IrbcamInterfacePublic::degToRad to convert degrees to radians when clicking the button.
While you're welcome to write QML code in a simple text editor like Notepad, using an IDE (Integrated Development Environment) can provide you with syntax highlighting and linting to make development easier. We recommend using either Qt's own IDE, Qt Creator or Visual Studio Code. The latter can get QML support using extensions.
These are the basics to getting started with plugin development for IRBCAM. For further reading we recommend: