AusweisApp2
UILoader.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "EnumHelper.h"
10 #include "UIPlugIn.h"
11 
12 #include <QJsonObject>
13 #include <QMap>
14 #include <QVector>
15 
16 namespace governikus
17 {
18 
19 defineEnumType(UIPlugInName, UIPlugInQml, UIPlugInWidgets, UIPlugInJson, UIPlugInWebSocket, UIPlugInAidl)
20 
21 class UILoader
22  : public QObject
23 {
24  Q_OBJECT
25 
26  private:
27  QMap<UIPlugInName, UIPlugIn*> mLoadedPlugIns;
28  QVector<UIPlugInName> mDefault;
29 
30  inline QString getName(UIPlugInName pPlugin) const;
31  inline bool isPlugIn(const QJsonObject& pJson);
32  inline bool hasName(const QJsonObject& pJson, const QString& pName);
33 
34  protected:
35  UILoader();
36  virtual ~UILoader();
37 
38  public:
39  static UILoader& getInstance();
40 
41  bool load();
42  bool load(UIPlugInName pName);
43 
44  const QStringList getDefault() const;
45  void setDefault(const QStringList& pDefault);
46 
47  UIPlugIn* getLoaded(UIPlugInName pName) const;
48 
49  Q_INVOKABLE void shutdown();
50 
51  Q_SIGNALS:
52  void fireLoadedPlugin(UIPlugIn* pPlugin);
53  void fireShutdownComplete();
54 };
55 
56 } // namespace governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
defineEnumType(KeyAgreementType, DH, ECDH) defineEnumType(MappingType
Method used for key agreement: