AusweisApp
Lade ...
Suche ...
Keine Treffer
NumberModel.h
gehe zur Dokumentation dieser Datei
1
10
#pragma once
11
12
#include "
EnumHelper.h
"
13
#include "
Env.h
"
14
#include "
context/WorkflowContext.h
"
15
16
#include <QObject>
17
#include <QSharedPointer>
18
19
20
class
test_UIPlugInQml;
21
22
23
namespace
governikus
24
{
25
26
defineEnumType
(
PasswordType
,
TRANSPORT_PIN
,
PIN
,
CAN
,
PUK
,
NEW_PIN
,
NEW_PIN_CONFIRMATION
,
REMOTE_PIN
,
SMART_PIN
,
NEW_SMART_PIN
,
NEW_SMART_PIN_CONFIRMATION
,
SMART_BLOCKING_CODE
)
27
28
class
NumberModel
29
:
public
QObject
30
{
31
Q_OBJECT
32
friend
class
Env;
33
friend
class ::test_UIPlugInQml;
34
35
Q_PROPERTY
(
PasswordType
passwordType
READ
getPasswordType
NOTIFY
firePasswordTypeChanged
)
36
Q_PROPERTY
(
QString
can
READ
getCan
WRITE
setCan
NOTIFY
fireCanChanged
)
37
Q_PROPERTY
(
QString
pin
READ
getPin
WRITE
setPin
NOTIFY
firePinChanged
)
38
Q_PROPERTY
(
QString
newPin
READ
getNewPin
WRITE
setNewPin
NOTIFY
fireNewPinChanged)
39
Q_PROPERTY
(
QString
newPinConfirmation
READ
getNewPinConfirmation
WRITE
setNewPinConfirmation
NOTIFY
fireNewPinConfirmationChanged
)
40
Q_PROPERTY
(
QString
puk
READ
getPuk
WRITE
setPuk
NOTIFY
firePukChanged
)
41
Q_PROPERTY
(
bool
hasPasswordError
READ
hasPasswordError
NOTIFY
fireInputErrorChanged
)
42
Q_PROPERTY
(
QString
inputError
READ
getInputError
NOTIFY
fireInputErrorChanged
)
43
Q_PROPERTY
(
int
retryCounter
READ
getRetryCounter
NOTIFY
fireReaderInfoChanged)
44
Q_PROPERTY
(
bool
isCanAllowedMode
READ
isCanAllowedMode
NOTIFY
fireCanAllowedModeChanged
)
45
46
private
:
47
QSharedPointer<WorkflowContext>
mContext;
48
QString
mNewPin;
49
QString
mNewPinConfirmation
;
50
51
NumberModel
();
52
~NumberModel
()
override
=
default
;
53
54
CardReturnCode
getInputErrorCode
()
const
;
55
void
clearNewPinAndConfirmation
();
56
bool
newPinAndConfirmationMatch
()
const
;
57
58
private
Q_SLOTS
:
59
void
onCardConnectionChanged
();
60
61
public
:
62
void
resetContext(
const
QSharedPointer<WorkflowContext>
&
pContext
=
QSharedPointer<WorkflowContext>
());
63
64
[[
nodiscard
]]
PasswordType
getPasswordType
()
const
;
65
66
[[
nodiscard
]]
QString
getCan
()
const
;
67
void
setCan
(
const
QString
&
pCan
);
68
69
[[
nodiscard
]]
QString
getPin
()
const
;
70
void
setPin
(
const
QString
&
pPin
);
71
72
[[
nodiscard
]]
QString
getNewPin()
const
;
73
void
setNewPin(
const
QString
&
pNewPin
);
74
[[
nodiscard
]]
QString
getNewPinConfirmation
()
const
;
75
void
setNewPinConfirmation
(
const
QString
&
pNewPinConfirmation
);
76
Q_INVOKABLE
bool
commitNewPin
();
77
78
[[
nodiscard
]]
QString
getPuk
()
const
;
79
void
setPuk
(
const
QString
&
pPuk
);
80
81
[[
nodiscard
]]
bool
hasPasswordError
()
const
;
82
[[
nodiscard
]]
QString
getInputError
()
const
;
83
84
[[
nodiscard
]]
int
getRetryCounter()
const
;
85
[[
nodiscard
]]
bool
isCanAllowedMode()
const
;
86
87
private
Q_SLOTS
:
88
void
onReaderInfoChanged(
const
ReaderInfo&
pInfo
);
89
90
Q_SIGNALS
:
91
void
fireCanChanged
();
92
void
firePinChanged
();
93
void
fireNewPinChanged();
94
void
fireNewPinConfirmationChanged
();
95
void
firePukChanged
();
96
void
fireInputErrorChanged
();
97
void
fireReaderInfoChanged();
98
void
fireCanAllowedModeChanged
();
99
void
firePasswordTypeChanged
();
100
};
101
102
103
}
// namespace governikus
EnumHelper.h
defineEnumType
#define defineEnumType(enumName,...)
Definition
EnumHelper.h:90
Env.h
WorkflowContext.h
governikus
Implementation of GeneralAuthenticate response APDUs.
Definition
CommandApdu.h:16
governikus::decodeObject
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition
ASN1TemplateUtil.h:114
src
ui
qml
NumberModel.h
Erzeugt von
1.10.0