AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
ApplicationModel.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
10 
11 #include "ReaderInfo.h"
12 #include "WifiInfo.h"
13 
14 #include <QObject>
15 #include <QSharedPointer>
16 #include <QString>
17 
18 namespace governikus
19 {
20 
21 class WorkflowContext;
22 
24  : public QObject
25 {
26  Q_OBJECT
27 
28  Q_PROPERTY(bool nfcEnabled READ isNfcEnabled NOTIFY fireNfcEnabledChanged)
29  Q_PROPERTY(bool nfcAvailable READ isNfcAvailable CONSTANT)
30 
33  Q_PROPERTY(bool bluetoothAvailable READ isBluetoothAvailable CONSTANT)
35 
36  Q_PROPERTY(bool wifiEnabled MEMBER mWifiEnabled NOTIFY fireWifiEnabledChanged)
37 
40 
41  QSharedPointer<WorkflowContext> mContext;
42 
43  void onStatusChanged(const ReaderManagerPlugInInfo& pInfo);
44  ReaderManagerPlugInInfo getFirstPlugInInfo(ReaderManagerPlugInType pType) const;
45 
46  private:
47  WifiInfo mWifiInfo;
48  bool mWifiEnabled;
49  bool mBluetoothResponding;
50 
51  private Q_SLOTS:
52  void onWifiEnabledChanged();
53 
54  public:
55  ApplicationModel(QObject* pParent = nullptr);
56  virtual ~ApplicationModel();
57  void resetContext(const QSharedPointer<WorkflowContext>& pContext = QSharedPointer<WorkflowContext>());
58 
59  bool isNfcAvailable() const;
60  bool isNfcEnabled() const;
61 
62  bool isBluetoothAvailable() const;
63  bool isBluetoothResponding() const;
64  bool isBluetoothEnabled() const;
65  void setBluetoothEnabled(bool pEnabled);
66  bool locationPermissionRequired() const;
67 
68  QString getCurrentWorkflow() const;
69  bool foundSelectedReader() const;
70 
71  Q_INVOKABLE void enableWifi();
72 
73  Q_SIGNALS:
74  void fireNfcEnabledChanged();
75 
79 
82 
84  void fireCertificateRemoved(QString pDeviceName);
85 };
86 
87 
88 } /* namespace governikus */
bool bluetoothEnabled
Definition: ApplicationModel.h:31
void setBluetoothEnabled(bool pEnabled)
Definition: ApplicationModel.cpp:138
ReaderManagerPlugInInfo getFirstPlugInInfo(ReaderManagerPlugInType pType) const
Definition: ApplicationModel.cpp:82
bool locationPermissionRequired() const
QSharedPointer< WorkflowContext > mContext
Definition: ApplicationModel.h:41
void fireCertificateRemoved(QString pDeviceName)
bool wifiEnabled
Definition: ApplicationModel.h:36
bool isNfcAvailable() const
Definition: ApplicationModel.cpp:96
bool isBluetoothResponding() const
Definition: ApplicationModel.cpp:126
bool isBluetoothAvailable() const
Definition: ApplicationModel.cpp:120
QString currentWorkflow
Definition: ApplicationModel.h:38
bool nfcAvailable
Definition: ApplicationModel.h:29
bool foundSelectedReader() const
Definition: WorkflowContext.h:19
Definition: ReaderManagerPlugInInfo.h:22
void resetContext(const QSharedPointer< WorkflowContext > &pContext=QSharedPointer< WorkflowContext >())
Definition: ApplicationModel.cpp:67
bool isNfcEnabled() const
Definition: ApplicationModel.cpp:108
bool bluetoothAvailable
Definition: ApplicationModel.h:33
Definition: ApplicationModel.h:23
bool bluetoothResponding
Definition: ApplicationModel.h:32
Q_INVOKABLE void enableWifi()
Definition: ApplicationModel.cpp:227
QString getCurrentWorkflow() const
Definition: ApplicationModel.cpp:191
Definition: WifiInfo.h:18
bool nfcEnabled
Definition: ApplicationModel.h:28
void onStatusChanged(const ReaderManagerPlugInInfo &pInfo)
Definition: ApplicationModel.cpp:27
bool isBluetoothEnabled() const
Definition: ApplicationModel.cpp:132