BPS C++ API  2.24.4
bpslabelerplugin.h
Go to the documentation of this file.
1 
4 #ifndef BPSLABELERPLUGIN_H
5 #define BPSLABELERPLUGIN_H
6 
7 #include "bpsgui_global.h"
8 #include <QtPlugin>
9 #include <QMap>
10 
11 class BpsDatastore;
12 class BpsConfigWidget;
13 class BpsLabeler;
15 class BpsSettings;
16 
22 {
23 public:
27  virtual ~BpsLabelerPlugin() {};
28 
32  virtual QString labelerId() const = 0;
33 
37  virtual QString labelerName() const = 0;
38 
44  virtual bool check(BpsDatastore* aDatastore) const = 0;
45 
53  virtual BpsLabelerEditWidget* createEditWidget(BpsDatastore* aDatastore, QWidget* aParent = nullptr) const = 0;
54 
62  virtual BpsConfigWidget* createConfigWidget(BpsDatastore* aDatastore, QWidget* aParent = nullptr) const = 0;
63 
70  virtual BpsLabeler* createLabeler(BpsDatastore* aDatastore, QObject* aParent = nullptr) const = 0;
71 
78 
85  static BpsLabelerPlugin* plugin(BpsDatastore* aDatastore, const QString& aId);
86 };
87 
91 #define BpsLabelerPlugin_IID "com.ibk-software.BPS2.BpsLabelerPlugin/1.0"
92 
93 Q_DECLARE_INTERFACE(BpsLabelerPlugin, BpsLabelerPlugin_IID)
94 
95 #endif // BPSLABELERPLUGIN_H
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
Abstract edit widget for labeler plug in.
Definition: bpslabelereditwidget.h:14
Labeler interface.
Definition: bpslabeler.h:17
Virtual class for labeler plugin of BPS Workplace.
Definition: bpslabelerplugin.h:22
virtual ~BpsLabelerPlugin()
Virtual destructor.
Definition: bpslabelerplugin.h:27
virtual BpsConfigWidget * createConfigWidget(BpsDatastore *aDatastore, QWidget *aParent=nullptr) const =0
Create the config widget and return a pointer to it.
#define BpsLabelerPlugin_IID
IID of the plugin.
Definition: bpslabelerplugin.h:91
virtual BpsLabelerEditWidget * createEditWidget(BpsDatastore *aDatastore, QWidget *aParent=nullptr) const =0
Create the edit widget and return a pointer to it.
virtual bool check(BpsDatastore *aDatastore) const =0
Check if plugin is available for usage, e.g.
virtual QString labelerName() const =0
virtual QString labelerId() const =0
static QMap< BpsLabelerPlugin *, QVariant > plugins(BpsDatastore *aDatastore)
Get map of all labeler plugins and matching keys in table t_labelers available for usage.
static BpsLabelerPlugin * plugin(BpsDatastore *aDatastore, const QString &aId)
Find the available labeler plugin with the given ID.
virtual BpsLabeler * createLabeler(BpsDatastore *aDatastore, QObject *aParent=nullptr) const =0
Create a labeler object and return a pointer to it.
Query and edit settings.
Definition: bpssettings.h:17