QuXtraWidgetPluginI provides and interface that subclasses will use to provide one or more widgets able to display or write values as any other cumbia-qtcontrols widget. Even though not strictly imposed by design, the returned widgets should implement the QuXtraWidgetI interface.
More...
#include <quxtrawidgetplugininterface.h>
|
virtual | ~QuXtraWidgetPluginI () |
|
virtual QWidget * | create (const QString &name, QWidget *parent, Cumbia *cumbia, const CuControlsReaderFactoryI &r_fac) |
| create allocate and return a new QWidget implementing QuXtraWidgetI More...
|
|
virtual QWidget * | create (const QString &name, QWidget *parent, Cumbia *cumbia, const CuControlsWriterFactoryI &w_fac) |
| create allocate and return a new QWidget implementing QuXtraWidgetI (writer version) More...
|
|
virtual QWidget * | create (const QString &name, QWidget *parent, CumbiaPool *cumbia_pool, const CuControlsFactoryPool &fpool) |
| create allocate and return a new QWidget implementing QuXtraWidgetI. CumbiaPool constructor version. More...
|
|
virtual QWidget * | create (const QString &name, QWidget *parent, Cumbia *cumbia, const CuControlsReaderFactoryI &r_fac, const CuControlsWriterFactoryI &w_fac) |
| create allocate and return a new QWidget implementing QuXtraWidgetI. Reader/Writer version. More...
|
|
virtual QString | name () const =0 |
| name returns the name of the plugin More...
|
|
virtual QString | description () const =0 |
| provides a brief description of the plugin and the classes it provides More...
|
|
virtual QStringList | catalogue () const =0 |
| widgetList provides the list of the names of the widgets offered by the plugin More...
|
|
virtual | ~QuXtraWidgetPluginI () |
|
virtual QWidget * | create (const QString &name, QWidget *parent, Cumbia *cumbia, const CuControlsReaderFactoryI &r_fac) |
| create allocate and return a new QWidget implementing QuXtraWidgetI More...
|
|
virtual QWidget * | create (const QString &name, QWidget *parent, Cumbia *cumbia, const CuControlsWriterFactoryI &w_fac) |
| create allocate and return a new QWidget implementing QuXtraWidgetI (writer version) More...
|
|
virtual QWidget * | create (const QString &name, QWidget *parent, CumbiaPool *cumbia_pool, const CuControlsFactoryPool &fpool) |
| create allocate and return a new QWidget implementing QuXtraWidgetI. CumbiaPool constructor version. More...
|
|
virtual QWidget * | create (const QString &name, QWidget *parent, Cumbia *cumbia, const CuControlsReaderFactoryI &r_fac, const CuControlsWriterFactoryI &w_fac) |
| create allocate and return a new QWidget implementing QuXtraWidgetI. Reader/Writer version. More...
|
|
virtual QString | name () const =0 |
| name returns the name of the plugin More...
|
|
virtual QString | description () const =0 |
| provides a brief description of the plugin and the classes it provides More...
|
|
virtual QStringList | catalogue () const =0 |
| widgetList provides the list of the names of the widgets offered by the plugin More...
|
|
QuXtraWidgetPluginI provides and interface that subclasses will use to provide one or more widgets able to display or write values as any other cumbia-qtcontrols widget. Even though not strictly imposed by design, the returned widgets should implement the QuXtraWidgetI interface.
Subclasses will implement the create methods that are more appropriate. The QWidget instances returned by the create methods should implement the QuXtraWidgetI interface, notwithstanding the code design does not force the client to do that. If the objects instantiated by the plugin implement QuXtraWidgetI, they can be dynamic_cast-ed at runtime and the methods of the interface can be used. If you choose not to inherit from QuXtraWidgetI, you must provide access to the classes through Qt properties.
A reader will typically implement both the Cumbia/CuControlsReaderFactoryI and the CumbiaPool/CuControlsFactoryPool versions of the create method, as suggested below.
Users of the extra widget plugins can easily access the plugin that provides a given widget through the QuXtraWidgetPluginLoader helper class. QuXtraWidgetPluginLoader searches amongst the installed extra widget plugins by class name.
The extra widget plugins file names must match a given pattern described in the introduction to QuXtraWidgetPluginLoader.
The key methods of QuXtraWidgetPluginI are the create functions, defined in several flavours. Their default behavior is returning a null pointer. Subclasses will return valid QWidget intances only from the create method they actually reimplement.
- Reader
- A reader will typically overwrite
- Writer
- A writer will provide valid QWidget instances from:
- Reader and writer
- A reader writer will reimplement
- See also
- QuXtraWidgetPluginLoader
-
QuXtraWidgetI
- Real time plot example.
- Please read the real time plot tutorial for an example.
◆ ~QuXtraWidgetPluginI() [1/2]
virtual QuXtraWidgetPluginI::~QuXtraWidgetPluginI |
( |
| ) |
|
|
inlinevirtual |
◆ ~QuXtraWidgetPluginI() [2/2]
virtual QuXtraWidgetPluginI::~QuXtraWidgetPluginI |
( |
| ) |
|
|
inlinevirtual |
◆ catalogue() [1/2]
virtual QStringList QuXtraWidgetPluginI::catalogue |
( |
| ) |
const |
|
pure virtual |
widgetList provides the list of the names of the widgets offered by the plugin
- Returns
- a QStringList with the names of the widgets made available by the plugin
Referenced by QuXtraWidgetPluginLoader::getPlugin().
◆ catalogue() [2/2]
virtual QStringList QuXtraWidgetPluginI::catalogue |
( |
| ) |
const |
|
pure virtual |
widgetList provides the list of the names of the widgets offered by the plugin
- Returns
- a QStringList with the names of the widgets made available by the plugin
◆ create() [1/8]
virtual QWidget * QuXtraWidgetPluginI::create |
( |
const QString & |
name, |
|
|
QWidget * |
parent, |
|
|
Cumbia * |
cumbia, |
|
|
const CuControlsReaderFactoryI & |
r_fac |
|
) |
| |
|
inlinevirtual |
create allocate and return a new QWidget implementing QuXtraWidgetI
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia | a pointer to a valid Cumbia object |
r_fac | const reference to a CuControlsReaderFactoryI |
- Note
- By default, returns a nullptr. Subclasses will implement the appropriate create method.
- Returns
- a new QWidget implementing QuXtraWidgetI
References name().
◆ create() [2/8]
virtual QWidget * QuXtraWidgetPluginI::create |
( |
const QString & |
name, |
|
|
QWidget * |
parent, |
|
|
Cumbia * |
cumbia, |
|
|
const CuControlsReaderFactoryI & |
r_fac |
|
) |
| |
|
inlinevirtual |
create allocate and return a new QWidget implementing QuXtraWidgetI
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia | a pointer to a valid Cumbia object |
r_fac | const reference to a CuControlsReaderFactoryI |
- Note
- By default, returns a nullptr. Subclasses will implement the appropriate create method.
- Returns
- a new QWidget implementing QuXtraWidgetI
References name().
◆ create() [3/8]
create allocate and return a new QWidget implementing QuXtraWidgetI. Reader/Writer version.
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia | a pointer to a valid Cumbia object |
r_fac | const reference to a CuControlsReaderFactoryI |
w_fac | const reference to a CuControlsWriterFactoryI |
- Returns
- a new QWidget implementing QuXtraWidgetI
This method creates a widget using the multi engine constructor version.
- Note
- writers will return a nullptr.
References name().
◆ create() [4/8]
create allocate and return a new QWidget implementing QuXtraWidgetI. Reader/Writer version.
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia | a pointer to a valid Cumbia object |
r_fac | const reference to a CuControlsReaderFactoryI |
w_fac | const reference to a CuControlsWriterFactoryI |
- Returns
- a new QWidget implementing QuXtraWidgetI
This method creates a widget using the multi engine constructor version.
- Note
- writers will return a nullptr.
References name().
◆ create() [5/8]
virtual QWidget * QuXtraWidgetPluginI::create |
( |
const QString & |
name, |
|
|
QWidget * |
parent, |
|
|
Cumbia * |
cumbia, |
|
|
const CuControlsWriterFactoryI & |
w_fac |
|
) |
| |
|
inlinevirtual |
create allocate and return a new QWidget implementing QuXtraWidgetI (writer version)
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia | a pointer to a valid Cumbia object |
w_fac | const reference to a CuControlsWriterFactoryI |
- Returns
- a new QWidget implementing QuXtraWidgetI (a writer)
- Note
- By default, returns a nullptr. Subclasses will implement the appropriate create method.
References name().
◆ create() [6/8]
virtual QWidget * QuXtraWidgetPluginI::create |
( |
const QString & |
name, |
|
|
QWidget * |
parent, |
|
|
Cumbia * |
cumbia, |
|
|
const CuControlsWriterFactoryI & |
w_fac |
|
) |
| |
|
inlinevirtual |
create allocate and return a new QWidget implementing QuXtraWidgetI (writer version)
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia | a pointer to a valid Cumbia object |
w_fac | const reference to a CuControlsWriterFactoryI |
- Returns
- a new QWidget implementing QuXtraWidgetI (a writer)
- Note
- By default, returns a nullptr. Subclasses will implement the appropriate create method.
References name().
◆ create() [7/8]
virtual QWidget * QuXtraWidgetPluginI::create |
( |
const QString & |
name, |
|
|
QWidget * |
parent, |
|
|
CumbiaPool * |
cumbia_pool, |
|
|
const CuControlsFactoryPool & |
fpool |
|
) |
| |
|
inlinevirtual |
create allocate and return a new QWidget implementing QuXtraWidgetI. CumbiaPool constructor version.
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia_pool | a pointer to a valid CumbiaPool object |
fpool | const reference to a CuControlsFactoryPool |
- Returns
- a new QWidget implementing QuXtraWidgetI
This method creates a widget using the multi engine constructor version.
- Note
- By default, returns a nullptr. Subclasses will implement the appropriate create method.
References name().
◆ create() [8/8]
virtual QWidget * QuXtraWidgetPluginI::create |
( |
const QString & |
name, |
|
|
QWidget * |
parent, |
|
|
CumbiaPool * |
cumbia_pool, |
|
|
const CuControlsFactoryPool & |
fpool |
|
) |
| |
|
inlinevirtual |
create allocate and return a new QWidget implementing QuXtraWidgetI. CumbiaPool constructor version.
- Parameters
-
name | the widget name. If a plugin provides a set of widgets, this parameter can be used to pick a specific one. |
parent | the parent widget |
cumbia_pool | a pointer to a valid CumbiaPool object |
fpool | const reference to a CuControlsFactoryPool |
- Returns
- a new QWidget implementing QuXtraWidgetI
This method creates a widget using the multi engine constructor version.
- Note
- By default, returns a nullptr. Subclasses will implement the appropriate create method.
References name().
◆ description() [1/2]
virtual QString QuXtraWidgetPluginI::description |
( |
| ) |
const |
|
pure virtual |
provides a brief description of the plugin and the classes it provides
- Returns
- a string with a short description of the plugin.
Must be implemented by subclasses
◆ description() [2/2]
virtual QString QuXtraWidgetPluginI::description |
( |
| ) |
const |
|
pure virtual |
provides a brief description of the plugin and the classes it provides
- Returns
- a string with a short description of the plugin.
Must be implemented by subclasses
◆ name() [1/2]
virtual QString QuXtraWidgetPluginI::name |
( |
| ) |
const |
|
pure virtual |
name returns the name of the plugin
- Returns
- the name of the plugin
Referenced by create().
◆ name() [2/2]
virtual QString QuXtraWidgetPluginI::name |
( |
| ) |
const |
|
pure virtual |
name returns the name of the plugin
- Returns
- the name of the plugin
The documentation for this class was generated from the following files: