BPS C++ API  2.24.4
bpsmdeapplication.h
Go to the documentation of this file.
1 
4 #ifndef BPSMDEAPPLICATION_H
5 #define BPSMDEAPPLICATION_H
6 
7 #include "bpscore_global.h"
8 #include <QObject>
9 #include <QMap>
10 #include <QStringList>
11 
12 class BpsDatastore;
13 class BpsLicenseToken;
14 class BpsMdeRequest;
15 class BpsMdeSession;
16 
21 {
22  Q_OBJECT
23 
24 public:
29  BpsMdeApplication(QObject *aParent = nullptr);
30 
34  virtual ~BpsMdeApplication();
35 
44  virtual BpsLicenseToken* createLicenseToken(BpsDatastore* aDatastore, QObject* aParent = nullptr);
45 
52  virtual bool isPermittedFor(BpsMdeSession* aSession);
53 
59  virtual QStringList paths() const = 0;
60 
72  virtual int menuIndex() const;
73 
78  virtual QString text() const;
79 
84  virtual QString icon() const;
85 
94  virtual bool handleRequest(BpsMdeRequest* aRequest, BpsMdeSession* aSession) = 0;
95 
96 signals:
97 
102  void logError(const QString& aText);
103 
108  void logWarning(const QString& aText);
109 
114  void logInformation(const QString& aText);
115 
120  void logSuccess(const QString& aText);
121 };
122 
123 #endif // BPSMDEAPPLICATION_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
BPS datastore class.
Definition: bpsdatastore.h:61
The license token is used to check permission of software usage, and maintains the list in table t_li...
Definition: bpslicensetoken.h:25
Virtual class for MDE applications.
Definition: bpsmdeapplication.h:21
void logInformation(const QString &aText)
Emitted when a information should get logged.
virtual QString text() const
void logError(const QString &aText)
Emitted when a error should get logged.
BpsMdeApplication(QObject *aParent=nullptr)
Default constructor.
virtual QStringList paths() const =0
virtual bool isPermittedFor(BpsMdeSession *aSession)
Check permission flags for a logged in session.
void logWarning(const QString &aText)
Emitted when a warning should get logged.
virtual BpsLicenseToken * createLicenseToken(BpsDatastore *aDatastore, QObject *aParent=nullptr)
Create a license token for a new session upon login.
virtual ~BpsMdeApplication()
Destructor: Your application should have a virtual destructor.
void logSuccess(const QString &aText)
Emitted when a success should get logged.
virtual QString icon() const
virtual bool handleRequest(BpsMdeRequest *aRequest, BpsMdeSession *aSession)=0
Handle the request for a page.
virtual int menuIndex() const
Using a menuIndex the position of the application within the menu can be fixed.
BPS MDE request.
Definition: bpsmderequest.h:21
BPS MDE session object.
Definition: bpsmdesession.h:24