Base class for Gazebo GUI plugins. More...
#include <Plugin.hh>
Public Member Functions | |
Plugin () | |
Constructor. | |
virtual | ~Plugin () |
Destructor. | |
QQuickItem * | CardItem () const |
Get the card item which contains this plugin. The item is generated the first time this function is run. | |
virtual std::string | ConfigStr () |
Get the configuration XML as a string. | |
QQmlContext * | Context () const |
Get the QML context where the plugin was created. | |
bool | DeleteLaterRequested () const |
Get the value of the the delete_later element from the configuration file, which defaults to false. | |
void | Load (const tinyxml2::XMLElement *_pluginElem) |
Load the plugin with a configuration file. This loads the default parameters and then calls LoadConfig(), which should be overridden to load custom parameters. | |
QQuickItem * | PluginItem () const |
Get the plugin item. | |
void | PostParentChanges () |
Apply changes which should come after the plugin already has a parent. | |
virtual std::string | Title () const |
Get title. | |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
void | DeleteLater () |
Wait until the plugin has a parent, then close and delete the parent. | |
virtual void | LoadConfig (const tinyxml2::XMLElement *_pluginElem) |
Load the plugin with a configuration file. Override this on custom plugins to handle custom configurations. | |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Attributes | |
std::string | configStr |
XML configuration. | |
std::string | title = "" |
Title to be displayed on top of plugin. | |
Additional Inherited Members | |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
objectName | |
Detailed Description
Base class for Gazebo GUI plugins.
When inheriting from this plugin, the following are assumed:
- The derived class' name is the same as the generated shared library (i.e. if the Publisher class extends Plugin, the library file is libPublisher.so)
- There is a QML file with the same name as the plugin's shared library name. (i.e. there must be a Publisher.qml)
- The QML file is prefixed by the library's name in the QRC file (i.e. the file's resource is found at ':/Publisher/Publisher.qml')
Constructor & Destructor Documentation
🔗Plugin()
Plugin | ( | ) |
Constructor.
🔗~Plugin()
|
virtual |
Destructor.
Member Function Documentation
🔗CardItem()
QQuickItem * CardItem | ( | ) | const |
Get the card item which contains this plugin. The item is generated the first time this function is run.
- Returns
- Pointer to card item.
🔗ConfigStr()
|
virtual |
Get the configuration XML as a string.
- Returns
- Config element
🔗Context()
QQmlContext * Context | ( | ) | const |
Get the QML context where the plugin was created.
- Returns
- Pointer context.
🔗DeleteLater()
|
protected |
Wait until the plugin has a parent, then close and delete the parent.
🔗DeleteLaterRequested()
bool DeleteLaterRequested | ( | ) | const |
Get the value of the the delete_later
element from the configuration file, which defaults to false.
- Returns
- The value of
delete_later
.
🔗Load()
void Load | ( | const tinyxml2::XMLElement * | _pluginElem | ) |
Load the plugin with a configuration file. This loads the default parameters and then calls LoadConfig(), which should be overridden to load custom parameters.
Called when a plugin is first created. This function should not be blocking.
- See also
- Load
- Parameters
-
[in] _pluginElem Element containing configuration
🔗LoadConfig()
|
protectedvirtual |
Load the plugin with a configuration file. Override this on custom plugins to handle custom configurations.
Called when a plugin is first created. This function should not be blocking.
- See also
- Load
- Parameters
-
[in] _pluginElem Element containing configuration
Reimplemented in CameraTrackingConfig.
🔗PluginItem()
QQuickItem * PluginItem | ( | ) | const |
Get the plugin item.
- Returns
- Pointer to plugin item.
🔗PostParentChanges()
void PostParentChanges | ( | ) |
Apply changes which should come after the plugin already has a parent.
🔗Title()
|
virtual |
Get title.
- Returns
- Plugin title.
Member Data Documentation
🔗configStr
|
protected |
XML configuration.
🔗title
|
protected |
Title to be displayed on top of plugin.
The documentation for this class was generated from the following file: