Public Member Functions | Protected Attributes | List of all members
qt_gui_cpp::PluginContext Class Reference

#include <plugin_context.h>

Inheritance diagram for qt_gui_cpp::PluginContext:
Inheritance graph
[legend]

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

qt_gui_cpp::PluginContext::PluginContext ( const PluginContext other)

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.

void qt_gui_cpp::PluginContext::closePlugin ( )

Close the plugin. The framework will call Plugin.shutdown_plugin() and unload it afterwards.

Definition at line 75 of file plugin_context.cpp.

void qt_gui_cpp::PluginContext::reloadPlugin ( )

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.

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

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 111 of file plugin_context.h.

GenericProxy qt_gui_cpp::PluginContext::proxy_
protected

Definition at line 107 of file plugin_context.h.

int qt_gui_cpp::PluginContext::serial_number_
protected

Definition at line 109 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 Thu Jun 6 2019 19:54:31