Public Member Functions | Private Attributes
qt_gui.plugin_context.PluginContext Class Reference
Inheritance diagram for qt_gui.plugin_context.PluginContext:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

def qt_gui.plugin_context.PluginContext.__init__ (   self,
  handler 
)

Definition at line 41 of file plugin_context.py.


Member Function Documentation

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.

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.

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.

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.

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.


Member Data Documentation

Definition at line 41 of file plugin_context.py.


The documentation for this class was generated from the following file:


qt_gui
Author(s): Dirk Thomas
autogenerated on Fri Feb 3 2017 03:42:12