BPS C++ API  2.24.4
BpsGaugePlugin Class Referenceabstract

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

#include <bpsgaugeplugin.h>

Public Member Functions

virtual bool check (BpsDatastore *aDatastore) const =0
 Check if plugin is available for usage, e.g. More...
 
virtual BpsConfigWidget * createConfigWidget (BpsDatastore *aDatastore, QWidget *aParent=nullptr) const =0
 Create the config widget and return a pointer to it. More...
 
virtual BpsGauge * createGauge (BpsDatastore *aDatastore, QObject *aParent=nullptr) const =0
 Create a gauge object and return a pointer to it. More...
 
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 BpsGaugePlugin * plugin (BpsDatastore *aDatastore, const QString &aId)
 Find the available gauge plugin with the given ID. More...
 
static QList< BpsGaugePlugin * > plugins (BpsDatastore *aDatastore)
 Get list of all gauge plugins available for usage. More...
 

Related Functions

(Note that these are not member functions.)

#define BpsGaugePlugin_IID   "com.ibk-software.BPS2.BpsGaugePlugin/1.0"
 IID of the plugin.
 

Detailed Description

Virtual class for gauge plugin of BPS Workplace.

Place the dynamic library in the plugins/bpsgauge folder.

Member Function Documentation

◆ check()

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.

◆ createConfigWidget()

virtual BpsConfigWidget* BpsGaugePlugin::createConfigWidget ( BpsDatastore *  aDatastore,
QWidget *  aParent = nullptr 
) 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).

◆ createGauge()

virtual BpsGauge* BpsGaugePlugin::createGauge ( BpsDatastore *  aDatastore,
QObject *  aParent = nullptr 
) 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.

◆ gaugeId()

virtual QString BpsGaugePlugin::gaugeId ( ) const
pure virtual
Returns
The gauge ID, for example "nwkthien".

◆ gaugeName()

virtual QString BpsGaugePlugin::gaugeName ( ) const
pure virtual
Returns
The gauge name in current language, for example "NWK Thien"

◆ gaugeUnit()

virtual BpsGauge::Unit BpsGaugePlugin::gaugeUnit ( ) const
pure virtual
Returns
Unit of the values returned.

◆ plugin()

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.

◆ plugins()

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: