Public Member Functions | |
def | __init__ (self, handler) |
def | add_toolbar (self, toolbar) |
def | add_widget (self, widget) |
def | argv (self) |
def | close_plugin (self) |
def | reload_plugin (self) |
def | remove_toolbar (self, toolbar) |
def | remove_widget (self, widget) |
def | serial_number (self) |
Private Attributes | |
_handler | |
Provides information to the plugin and exposes methods to interact with the framework. PluginContext 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, which 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 92 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 67 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 58 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 115 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.reload_plugin | ( | self | ) |
Reload the plugin.
Definition at line 123 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 105 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 82 of file plugin_context.py.
def qt_gui.plugin_context.PluginContext.serial_number | ( | self | ) |
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.
|
private |
Definition at line 45 of file plugin_context.py.