BPS C++ API  2.24.4
bpsgaugeplugin.h
Go to the documentation of this file.
1 
4 #ifndef BPSGAUGEPLUGIN_H
5 #define BPSGAUGEPLUGIN_H
6 
7 #include "bpsgui_global.h"
8 #include "bpsgauge.h"
9 #include <QtPlugin>
10 #include <QMap>
11 
12 class BpsDatastore;
13 class BpsConfigWidget;
14 class BpsGaugeEditWidget;
15 class BpsSettings;
16 
22 {
23 public:
27  virtual ~BpsGaugePlugin() {};
28 
32  virtual QString gaugeId() const = 0;
33 
37  virtual QString gaugeName() const = 0;
38 
42  virtual BpsGauge::Unit gaugeUnit() const = 0;
43 
49  virtual bool check(BpsDatastore* aDatastore) const = 0;
50 
58  virtual BpsConfigWidget* createConfigWidget(BpsDatastore* aDatastore, QWidget* aParent = nullptr) const = 0;
59 
66  virtual BpsGauge* createGauge(BpsDatastore* aDatastore, QObject* aParent = nullptr) const = 0;
67 
74 
81  static BpsGaugePlugin* plugin(BpsDatastore* aDatastore, const QString& aId);
82 };
83 
87 #define BpsGaugePlugin_IID "com.ibk-software.BPS2.BpsGaugePlugin/1.0"
88 
89 Q_DECLARE_INTERFACE(BpsGaugePlugin, BpsGaugePlugin_IID)
90 
91 #endif // BPSGAUGEPLUGIN_H
Public include file for BpsGauge class.
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
Abstract configuration widget.
Definition: bpsconfigwidget.h:16
BPS datastore class.
Definition: bpsdatastore.h:61
Gauge interface.
Definition: bpsgauge.h:19
Unit
Value unit.
Definition: bpsgauge.h:27
Virtual class for gauge plugin of BPS Workplace.
Definition: bpsgaugeplugin.h:22
virtual QString gaugeName() const =0
static QList< BpsGaugePlugin * > plugins(BpsDatastore *aDatastore)
Get list of all gauge plugins available for usage.
virtual BpsGauge::Unit gaugeUnit() const =0
#define BpsGaugePlugin_IID
IID of the plugin.
Definition: bpsgaugeplugin.h:87
static BpsGaugePlugin * plugin(BpsDatastore *aDatastore, const QString &aId)
Find the available gauge plugin with the given ID.
virtual QString gaugeId() const =0
virtual ~BpsGaugePlugin()
Virtual destructor.
Definition: bpsgaugeplugin.h:27
virtual BpsGauge * createGauge(BpsDatastore *aDatastore, QObject *aParent=nullptr) const =0
Create a gauge object and return a pointer to it.
virtual BpsConfigWidget * createConfigWidget(BpsDatastore *aDatastore, QWidget *aParent=nullptr) const =0
Create the config widget and return a pointer to it.
virtual bool check(BpsDatastore *aDatastore) const =0
Check if plugin is available for usage, e.g.
Query and edit settings.
Definition: bpssettings.h:17