AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
SelfAuthenticationModel.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
10 
11 #include <QAbstractListModel>
12 #include <QEvent>
13 #include <QSharedPointer>
14 #include <QString>
15 
16 namespace governikus
17 {
18 
19 class SelfAuthContext;
20 
22  : public QAbstractListModel
23 {
24  Q_OBJECT
25 
26  QSharedPointer<SelfAuthContext> mContext;
28 
29  enum DataRoles
30  {
31  NAME = Qt::UserRole + 1,
32  VALUE
33  };
34 
35  private Q_SLOTS:
36  void onSelfAuthenticationDataChanged();
37 
38  public:
39  SelfAuthenticationModel(QObject* pParent = nullptr);
40  void resetContext(const QSharedPointer<SelfAuthContext>& pContext = QSharedPointer<SelfAuthContext>());
41 
42  Q_INVOKABLE void startWorkflow();
43  Q_INVOKABLE void cancelWorkflow();
44  Q_INVOKABLE bool isBasicReader();
45 
46  int rowCount(const QModelIndex& = QModelIndex()) const override;
47  QVariant data(const QModelIndex& pIndex, int pRole = Qt::DisplayRole) const override;
48  QHash<int, QByteArray> roleNames() const override;
49 
50  virtual bool event(QEvent* pEvent) override;
51 
52  Q_SIGNALS:
53  void fireStartWorkflow();
54 
55 };
56 
57 
58 } /* namespace governikus */
QHash< int, QByteArray > roleNames() const override
Definition: SelfAuthenticationModel.cpp:110
void resetContext(const QSharedPointer< SelfAuthContext > &pContext=QSharedPointer< SelfAuthContext >())
Definition: SelfAuthenticationModel.cpp:49
int rowCount(const QModelIndex &=QModelIndex()) const override
Definition: SelfAuthenticationModel.cpp:86
QVector< QPair< QString, QString > > OrderedSelfData
Definition: SelfAuthenticationData.h:60
virtual bool event(QEvent *pEvent) override
Definition: SelfAuthenticationModel.cpp:119
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition: SelfAuthenticationModel.cpp:92
SelfAuthenticationModel(QObject *pParent=nullptr)
Definition: SelfAuthenticationModel.cpp:40
Definition: SelfAuthenticationModel.h:21
Q_INVOKABLE bool isBasicReader()
Definition: SelfAuthenticationModel.cpp:75
Q_INVOKABLE void startWorkflow()
Definition: SelfAuthenticationModel.cpp:60
Q_INVOKABLE void cancelWorkflow()
Definition: SelfAuthenticationModel.cpp:66