Public Member Functions | |
def | __init__ |
def | add_toolbar |
def | add_widget |
def | argv |
def | close_plugin |
def | reload_plugin |
def | remove_toolbar |
def | remove_widget |
def | serial_number |
Private Attributes | |
_handler |
PluginContext providing information to the plugin and exposing methods for the plugin to interact with the framework. It relays all methods to the corresponding `PluginHandler`.
Definition at line 34 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.__init__ | ( | self, | |
handler | |||
) |
Definition at line 41 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.add_toolbar | ( | self, | |
toolbar | |||
) |
Add a toolbar to the UI. The toolbar is directly added to the QMainWindow. This method can be called once for each toolbar a plugin would like to add and at any point in time (until the calling plugin has been shutdown). Note: The ownership of the toolbar is transferred to the callee which will delete it when the plugin is shut down. @param widget: The toolbar to add @type widget: QToolBar
Definition at line 84 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.add_widget | ( | self, | |
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). Note: The ownership of the widget is transferred to the callee which will delete it when the plugin is shut down. @param widget: The widget to add @type widget: QWidget
Definition at line 64 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.argv | ( | self | ) |
Return the command line arguments of the plugin. @return: The arguments without a program name at the beginning @rtype: list
Definition at line 56 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.close_plugin | ( | self | ) |
Close the plugin. The framework will call `Plugin.shutdown_plugin()` and unload it afterwards.
Definition at line 104 of file plugin_context.py.
Reload the plugin.
Definition at line 111 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.remove_toolbar | ( | self, | |
toolbar | |||
) |
Remove a previously added toolbar from the UI. Note: The ownership of the toolbar is transferred to the caller. @param widget: The toolbar to remove @type widget: QToolBar
Definition at line 95 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.remove_widget | ( | self, | |
widget | |||
) |
Remove a previously added widget from the UI. Note: The ownership of the widget is transferred to the caller. @param widget: The widget to remove @type widget: QWidget
Definition at line 75 of file plugin_context.py.
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). @return: The serial number @rtype: int
Definition at line 47 of file plugin_context.py.
Definition at line 41 of file plugin_context.py.