BPS C++ API  2.24.4
BpsScalesPlugin Class Referenceabstract

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

#include <bpsscalesplugin.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 BpsScales * createScales (BpsDatastore *aDatastore, QObject *aParent=nullptr) const =0
 Create a scales object and return a pointer to it. More...
 
virtual QString scalesId () const =0
 
virtual QString scalesName () const =0
 
virtual ~BpsScalesPlugin ()
 Virtual destructor.
 

Static Public Member Functions

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

Related Functions

(Note that these are not member functions.)

#define BpsScalesPlugin_IID   "com.ibk-software.BPS2.BpsScalesPlugin/1.0"
 IID of the plugin.
 

Detailed Description

Virtual class for scales plugin of BPS Workplace.

Place the dynamic library in the plugins/bpscales folder.

Member Function Documentation

◆ check()

virtual bool BpsScalesPlugin::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 scales plugin is available, false when not.

◆ createConfigWidget()

virtual BpsConfigWidget* BpsScalesPlugin::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 scales plugin is not available for use (see check).

◆ createScales()

virtual BpsScales* BpsScalesPlugin::createScales ( BpsDatastore *  aDatastore,
QObject *  aParent = nullptr 
) const
pure virtual

Create a scales object and return a pointer to it.

Parameters
aDatastoreThe datastore to use.
aParentThe parent object.
Returns
Pointer to the new object, or 0 if scales plugin is not available for use, the settings parameters are invalid, or the scales can not be opened.

◆ plugin()

static BpsScalesPlugin* BpsScalesPlugin::plugin ( BpsDatastore *  aDatastore,
const QString &  aId 
)
static

Find the available scales plugin with the given ID.

Parameters
aDatastoreThe datastore to use.
aIdThe scales ID, for example "mtsics" or "bit650".
Returns
The plugin, or 0 if no scales plugin with this id was found or it is not available for use.

◆ plugins()

static QList<BpsScalesPlugin*> BpsScalesPlugin::plugins ( BpsDatastore *  aDatastore)
static

Get list of all scales plugins available for usage.

Parameters
aDatastoreThe datastore to use.
Returns
List of available scales plugins.

◆ scalesId()

virtual QString BpsScalesPlugin::scalesId ( ) const
pure virtual
Returns
The scales ID, for example "mtsics" or "bit650".

◆ scalesName()

virtual QString BpsScalesPlugin::scalesName ( ) const
pure virtual
Returns
The scales name in current language, for example "Mettler Toledo MT-SICS" or "Busch BIT650"

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