#include <plugin_context.h>
Public Member Functions | |
void | addWidget (QWidget *widget) |
const QStringList & | argv () const |
void | closePlugin () |
PluginContext (QObject *obj, int serial_number, const QStringList &argv) | |
PluginContext (const PluginContext &other) | |
void | reloadPlugin () |
void | removeWidget (QWidget *widget) |
int | serialNumber () const |
Protected Attributes | |
QStringList | argv_ |
GenericProxy | proxy_ |
int | serial_number_ |
PluginContext providing information to the plugin and exposing methods for the plugin to interact with the framework. It relays all methods to the corresponding plugin handler.
Definition at line 52 of file plugin_context.h.
qt_gui_cpp::PluginContext::PluginContext | ( | QObject * | obj, |
int | serial_number, | ||
const QStringList & | argv | ||
) |
Definition at line 39 of file plugin_context.cpp.
qt_gui_cpp::PluginContext::PluginContext | ( | const PluginContext & | other | ) |
Definition at line 46 of file plugin_context.cpp.
void qt_gui_cpp::PluginContext::addWidget | ( | QWidget * | widget | ) |
Add a widget to the UI. The widget is embedded into a new QDockWidget which itself is added to the QMainWindow. This method can be called once for each widget a plugin would like to add and at any point in time (until the calling plugin has been shutdown).
widget | The widget to add |
Definition at line 63 of file plugin_context.cpp.
const QStringList & qt_gui_cpp::PluginContext::argv | ( | ) | const |
Return the command line arguments of the plugin.
Definition at line 58 of file plugin_context.cpp.
Close the plugin. The framework will call `Plugin.shutdown_plugin()` and unload it afterwards.
Definition at line 75 of file plugin_context.cpp.
Reload the plugin.
Definition at line 81 of file plugin_context.cpp.
void qt_gui_cpp::PluginContext::removeWidget | ( | QWidget * | widget | ) |
Remove a previously added widget from the UI.
widget | The widget to remove |
Definition at line 69 of file plugin_context.cpp.
int qt_gui_cpp::PluginContext::serialNumber | ( | ) | const |
Return the serial number of the plugin. For a specific type of plugin each instance gets a serial number (which is the first currently not used positive integer at construction time).
Definition at line 53 of file plugin_context.cpp.
QStringList qt_gui_cpp::PluginContext::argv_ [protected] |
Definition at line 108 of file plugin_context.h.
GenericProxy qt_gui_cpp::PluginContext::proxy_ [protected] |
Definition at line 104 of file plugin_context.h.
int qt_gui_cpp::PluginContext::serial_number_ [protected] |
Definition at line 106 of file plugin_context.h.