AusweisApp2
SmartModel.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "Env.h"
10 #include "ReaderInfo.h"
13 
14 #include <QObject>
15 #include <QSharedPointer>
16 #include <QVariant>
17 
18 
19 class test_SmartModel;
20 
21 
22 namespace governikus
23 {
24 
26  : public QObject
27 {
28  Q_OBJECT
29  friend class Env;
30  friend class ::test_SmartModel;
31 
33  Q_PROPERTY(int progress READ getProgress NOTIFY fireProgressChanged)
34  Q_PROPERTY(bool isScanRunning READ isScanRunning NOTIFY fireScanRunningChanged)
35 
36  public:
37  enum class QmlSmartState
38  {
45  };
46  Q_ENUM(QmlSmartState)
47 
48  private:
49  SmartModel();
50  QmlSmartState mStatus;
51  CardInfo mCachedCardInfo;
52  int mProgress;
53 
54  void updateStatus();
55  void updatePinStatus();
56  void setProgress(int pProgress);
57  void setStatus(QmlSmartState pNewStatus);
58 
59  bool isScanRunning() const;
60 
61  private Q_SLOTS:
62  void onDeletePersonalizationDone(const QVariant& pResult);
63  void onDeleteSmartDone(const QVariant& pResult);
64  void onUpdateStatusDone(const QVariant& pResult);
65  void onUpdatePinStatusDone(const ReaderManagerPlugInInfo& pInfo);
66  void onStatusChanged(const ReaderManagerPlugInInfo& pInfo);
67 
68  public:
70  int getProgress() const;
71 
72  void workflowFinished(QSharedPointer<WorkflowContext> pContext);
73 
74  [[nodiscard]] MobileEidType getMobileEidType();
75 
76  Q_INVOKABLE void deletePersonalization();
77  Q_INVOKABLE void deleteSmart();
78 
79  Q_SIGNALS:
85 };
86 
87 } // namespace governikus
Holds smart card information.
Definition: CardInfo.h:30
Definition: Env.h:44
Definition: SmartModel.h:27
int getProgress() const
Definition: SmartModel.cpp:164
QmlSmartState
Definition: SmartModel.h:38
Q_INVOKABLE void deleteSmart()
Definition: SmartModel.cpp:250
QmlSmartState smartState
Definition: SmartModel.h:32
int progress
Definition: SmartModel.h:33
QmlSmartState getSmartState() const
Definition: SmartModel.cpp:209
MobileEidType getMobileEidType()
Definition: SmartModel.cpp:270
void fireDeletePersonalizationDone()
bool isScanRunning
Definition: SmartModel.h:34
Q_INVOKABLE void deletePersonalization()
Definition: SmartModel.cpp:238
void workflowFinished(QSharedPointer< WorkflowContext > pContext)
Definition: SmartModel.cpp:220
A simple template renderer.
Definition: ActivationContext.h:15