Public Member Functions | Protected Attributes
qt_gui_cpp::PluginContext Class Reference

#include <plugin_context.h>

List of all members.

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_

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 plugin handler.

Definition at line 52 of file plugin_context.h.


Constructor & Destructor Documentation

qt_gui_cpp::PluginContext::PluginContext ( QObject *  obj,
int  serial_number,
const QStringList &  argv 
)

Definition at line 39 of file plugin_context.cpp.

Definition at line 46 of file plugin_context.cpp.


Member Function Documentation

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).

Note:
The ownership of the widget pointer is transferred to the callee which will delete it when the plugin is shut down.
Parameters:
widgetThe 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.

Returns:
The arguments without a program name at the beginning

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.

Note:
The ownership of the widget pointer is transferred back to the caller which is responsible of deleting it.
Parameters:
widgetThe widget to remove

Definition at line 69 of file plugin_context.cpp.

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).

Returns:
The serial number

Definition at line 53 of file plugin_context.cpp.


Member Data Documentation

QStringList qt_gui_cpp::PluginContext::argv_ [protected]

Definition at line 108 of file plugin_context.h.

Definition at line 104 of file plugin_context.h.

Definition at line 106 of file plugin_context.h.


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


qt_gui_cpp
Author(s): Dirk Thomas
autogenerated on Fri Aug 28 2015 12:15:44