Documents > BPS V2 C++ API
BpsGaugePlugin Class Reference

Virtual class for gauge plugin of BPS Workplace. More...

#include <bpsgaugeplugin.h>

List of all members.

Public Member Functions

virtual bool check (BpsDatastore *aDatastore) const =0
 Check if plugin is available for usage, e.g.
virtual BpsConfigWidgetcreateConfigWidget (BpsDatastore *aDatastore, QWidget *aParent=0) const =0
 Create the config widget and return a pointer to it.
virtual BpsGaugecreateGauge (BpsDatastore *aDatastore, QObject *aParent=0) const =0
 Create a gauge object and return a pointer to it.
virtual QString gaugeId () const =0
virtual QString gaugeName () const =0
virtual BpsGauge::Unit gaugeUnit () const =0
virtual ~BpsGaugePlugin ()
 Virtual destructor.

Static Public Member Functions

static BpsGaugePluginplugin (BpsDatastore *aDatastore, const QString &aId)
 Find the available gauge plugin with the given ID.
static QList< BpsGaugePlugin * > plugins (BpsDatastore *aDatastore)
 Get list of all gauge plugins available for usage.

Detailed Description

Virtual class for gauge plugin of BPS Workplace.

Place the dynamic library in the plugins/bpsgauge folder.


Member Function Documentation

virtual bool BpsGaugePlugin::check ( BpsDatastore aDatastore) const [pure virtual]

Check if plugin is available for usage, e.g.

it is licensed.

Parameters:
aDatastoreThe datastore to use.
Returns:
True when gauge plugin is available, false when not.
virtual BpsConfigWidget* BpsGaugePlugin::createConfigWidget ( BpsDatastore aDatastore,
QWidget *  aParent = 0 
) const [pure virtual]

Create the config widget and return a pointer to it.

The widget is owned by the caller.

Parameters:
aDatastoreThe datastore to use.
aParentThe parent widget.
Returns:
Pointer to the new widget, or 0 if gauge plugin is not available for use (see check).
virtual BpsGauge* BpsGaugePlugin::createGauge ( BpsDatastore aDatastore,
QObject *  aParent = 0 
) const [pure virtual]

Create a gauge object and return a pointer to it.

Parameters:
aDatastoreThe datastore to use.
aParentThe parent object.
Returns:
Pointer to the new object, or 0 if gauge plugin is not available for use, the settings parameters are invalid, or the gauge can not be opened.
virtual QString BpsGaugePlugin::gaugeId ( ) const [pure virtual]
Returns:
The gauge ID, for example "nwkthien".
virtual QString BpsGaugePlugin::gaugeName ( ) const [pure virtual]
Returns:
The gauge name in current language, for example "NWK Thien"
virtual BpsGauge::Unit BpsGaugePlugin::gaugeUnit ( ) const [pure virtual]
Returns:
Unit of the values returned.
static BpsGaugePlugin* BpsGaugePlugin::plugin ( BpsDatastore aDatastore,
const QString &  aId 
) [static]

Find the available gauge plugin with the given ID.

Parameters:
aDatastoreThe datastore to use.
aIdThe gauge ID, for example "mtsics" or "bit650".
Returns:
The plugin, or 0 if no gauge plugin with this id was found or it is not available for use.
static QList<BpsGaugePlugin*> BpsGaugePlugin::plugins ( BpsDatastore aDatastore) [static]

Get list of all gauge plugins available for usage.

Parameters:
aDatastoreThe datastore to use.
Returns:
List of available gauge plugins.

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