AusweisApp2
Lade ...
Suche ...
Keine Treffer
NumberModel.h
gehe zur Dokumentation dieser Datei
1
8#pragma once
9
11#include "Env.h"
12
13#include <QObject>
14#include <QSharedPointer>
15
16namespace governikus
17{
18
20 : public QObject
21{
22 Q_OBJECT
23 friend class Env;
24
26 Q_PROPERTY(QString can READ getCan WRITE setCan NOTIFY fireCanChanged)
27 Q_PROPERTY(QString pin READ getPin WRITE setPin NOTIFY firePinChanged)
28 Q_PROPERTY(QString newPin READ getNewPin WRITE setNewPin NOTIFY fireNewPinChanged)
29 Q_PROPERTY(QString puk READ getPuk WRITE setPuk NOTIFY firePukChanged)
30 Q_PROPERTY(bool hasError READ hasError NOTIFY fireInputErrorChanged)
32 Q_PROPERTY(QString inputError READ getInputError NOTIFY fireInputErrorChanged)
33 Q_PROPERTY(int retryCounter READ getRetryCounter NOTIFY fireReaderInfoChanged)
34 Q_PROPERTY(bool pinDeactivated READ isPinDeactivated NOTIFY fireReaderInfoChanged)
37
38 private:
39 QSharedPointer<WorkflowContext> mContext;
40 bool mRequestNewPin;
41
43 ~NumberModel() override = default;
44
45 CardReturnCode getInputErrorCode() const;
46
47 private Q_SLOTS:
48 void onCardConnectionChanged();
49
50 public:
51 enum class QmlPasswordType
52 {
54 };
55 Q_ENUM(QmlPasswordType)
56
57 void resetContext(const QSharedPointer<WorkflowContext>& pContext = QSharedPointer<WorkflowContext>());
58
60 Q_INVOKABLE void requestNewPin();
61
62 QString getCan() const;
63 void setCan(const QString& pCan);
64
65 QString getPin() const;
66 void setPin(const QString& pPin);
67
68 QString getNewPin() const;
69 void setNewPin(const QString& pNewPin);
70
71 QString getPuk() const;
72 void setPuk(const QString& pPuk);
73
74 bool hasError() const;
75 bool hasPasswordError() const;
76 QString getInputError() const;
77
78 int getRetryCounter() const;
79 bool isPinDeactivated() const;
80 bool isCanAllowedMode() const;
81
82 bool isRequestTransportPin() const;
83
84 private Q_SLOTS:
85 void onReaderInfoChanged(const ReaderInfo& pInfo);
86
87 Q_SIGNALS:
97};
98
99
100} // namespace governikus
Definition: Env.h:44
Definition: NumberModel.h:21
QString pin
Definition: NumberModel.h:27
int retryCounter
Definition: NumberModel.h:33
QString can
Definition: NumberModel.h:26
QString newPin
Definition: NumberModel.h:28
bool pinDeactivated
Definition: NumberModel.h:34
void setCan(const QString &pCan)
Definition: NumberModel.cpp:111
void setNewPin(const QString &pNewPin)
Definition: NumberModel.cpp:143
bool requestTransportPin
Definition: NumberModel.h:36
void fireRequestTransportPinChanged()
void resetContext(const QSharedPointer< WorkflowContext > &pContext=QSharedPointer< WorkflowContext >())
Definition: NumberModel.cpp:28
QmlPasswordType getPasswordType() const
Definition: NumberModel.cpp:64
QString getNewPin() const
Definition: NumberModel.cpp:135
QString puk
Definition: NumberModel.h:29
bool hasPasswordError
Definition: NumberModel.h:31
void setPuk(const QString &pPuk)
Definition: NumberModel.cpp:168
QString getInputError() const
Definition: NumberModel.cpp:203
bool hasError
Definition: NumberModel.h:30
bool isRequestTransportPin() const
Definition: NumberModel.cpp:325
QmlPasswordType
Definition: NumberModel.h:52
void setPin(const QString &pPin)
Definition: NumberModel.cpp:126
QString getPin() const
Definition: NumberModel.cpp:120
QString inputError
Definition: NumberModel.h:32
QString getPuk() const
Definition: NumberModel.cpp:162
bool isPinDeactivated() const
Definition: NumberModel.cpp:305
QmlPasswordType passwordType
Definition: NumberModel.h:25
bool isCanAllowedMode
Definition: NumberModel.h:35
int getRetryCounter() const
Definition: NumberModel.cpp:292
Q_INVOKABLE void requestNewPin()
Definition: NumberModel.cpp:95
QString getCan() const
Definition: NumberModel.cpp:105
Definition: ReaderInfo.h:17
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15