XORDE
v1.0
eXtensible Operational Robotic Development Environment
|
The base class for XORDE module. More...
#include <ModuleBaseONB.h>
Signals | |
void | componentCreated (unsigned short id) |
Notify when the component is created with assigned componentID by the core. More... | |
Public Member Functions | |
ModuleBaseONB (QObject *parent=nullptr) | |
Default constructor. Runs timestamp timer. | |
~ModuleBaseONB () | |
It had to destroy the components but something went wrong. | |
template<class T > | |
void | declareComponent (T *component) |
Declare the ONB component. More... | |
void | setIcon (QImage icon) |
Set an icon to the module. More... | |
void | setIcon (QString filename) |
Set an icon to the module from file. More... | |
ComponentBase * | component (unsigned short id) |
Get the component by id. More... | |
void | log (QString message) |
Send the arbitrary message to the core's log output. | |
QList< QJsonObject > | getClassesInfo () const |
WHY?? it must be in proxy! | |
QJsonArray | getComponentsConfigList () const |
it's too. | |
virtual QJsonObject | getJsonConfig () const |
why?? why it is located here? | |
The base class for XORDE module.
XORDE module has an unique name, icon and contains a list of ONB components.
These components are self-describing by means of ONB protocol. They have its own name, icon, version info etc. and list of the Objects.
Object is bound to a certain variable, and its value is changed by accessing the variable. Data exchange is performed by implicit or explicit transferring the objects.
The ModuleBaseONB class contains methods to declare and manage components.
If you want to create an external module, use ModuleBaseAppONB.
|
inline |
Get the component by id.
id | componentID assigned by the core. |
|
signal |
Notify when the component is created with assigned componentID by the core.
id | Assigned componentID of the created component. |
|
inline |
Declare the ONB component.
The component must be derived from ComponentBase.
component | The component to declare. |
void ModuleBaseONB::setIcon | ( | QImage | icon | ) |
Set an icon to the module.
Component icon is used in the UI.
icon | The image containing icon. |
void ModuleBaseONB::setIcon | ( | QString | filename | ) |
Set an icon to the module from file.
This is an overloaded method.
filename | Name of icon file. Supported formats matches ones in Qt's QImage. |