16#include <QAbstractTableModel>
18#include <QSslCertificate>
21class test_RemoteDeviceModel;
28 friend class ::test_RemoteDeviceModel;
37 QDateTime mLastConnected;
38 QSharedPointer<IfdListEntry> mRemoteDeviceListEntry;
43 const QSharedPointer<IfdListEntry>& pRemoteDeviceListEntry);
49 const QDateTime& pLastConnected,
50 const QSharedPointer<IfdListEntry>& pRemoteDeviceListEntry);
55 [[nodiscard]]
const QString&
getId()
const;
56 void setId(
const QString& pId);
71 :
public QAbstractListModel
80 const
bool mShowPairedReaders;
81 const
bool mShowUnpairedReaders;
83 bool mIsDetectingRemoteDevices;
85 bool mRemoteDetectionWasRunning;
88 [[nodiscard]]
bool indexIsValid(
const QModelIndex& pIndex)
const;
90 void updatePairedReaders();
91 void updateUnpairedReaders();
92 void removeVanishedReaders();
93 [[nodiscard]] QVector<RemoteDeviceModelEntry> presentReaders()
const;
97 void onApplicationStateChanged(
bool pIsAppInForeground);
98 void onUpdateReaderList();
116 RemoteDeviceModel(QObject* pParent =
nullptr,
bool pShowPairedReaders =
true,
bool pShowUnpairedReaders =
true);
118 [[nodiscard]]
int rowCount(
const QModelIndex& pParent = QModelIndex())
const override;
119 [[nodiscard]] QVariant
data(
const QModelIndex& pIndex,
int pRole = Qt::DisplayRole)
const override;
120 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
124 [[nodiscard]]
bool isPaired(
const QModelIndex& pIndex)
const;
125 [[nodiscard]]
bool isSupported(
const QModelIndex& pIndex)
const;
Code
Definition: GlobalStatus.h:26
Definition: RemoteDeviceModel.h:27
bool operator==(const RemoteDeviceModelEntry &pOther) const
Definition: RemoteDeviceModel.cpp:151
void setPaired(bool pPaired)
Definition: RemoteDeviceModel.cpp:87
bool isSupported() const
Definition: RemoteDeviceModel.cpp:127
void setLastConnected(const QDateTime &pLastConnected)
Definition: RemoteDeviceModel.cpp:145
const QSharedPointer< IfdListEntry > & getRemoteDeviceListEntry() const
Definition: RemoteDeviceModel.cpp:69
void setId(const QString &pId)
Definition: RemoteDeviceModel.cpp:99
void setNetworkVisible(bool pNetworkVisible)
Definition: RemoteDeviceModel.cpp:133
const QString & getId() const
Definition: RemoteDeviceModel.cpp:93
QString getDeviceNameEscaped() const
Definition: RemoteDeviceModel.cpp:75
const QDateTime & getLastConnected() const
Definition: RemoteDeviceModel.cpp:139
bool isPaired() const
Definition: RemoteDeviceModel.cpp:81
bool isNetworkVisible() const
Definition: RemoteDeviceModel.cpp:105
int getLinkQuality() const
Definition: RemoteDeviceModel.cpp:111
Definition: RemoteDeviceModel.h:72
void forgetDevice(const QModelIndex &pIndex)
Definition: RemoteDeviceModel.cpp:555
QString getEmptyListDescriptionString() const
Definition: RemoteDeviceModel.cpp:577
void onTranslationChanged()
Definition: RemoteDeviceModel.cpp:549
SettingsRemoteRoles
Definition: RemoteDeviceModel.h:105
@ IS_NETWORK_VISIBLE
Definition: RemoteDeviceModel.h:110
@ LAST_CONNECTED
Definition: RemoteDeviceModel.h:108
@ IS_SUPPORTED
Definition: RemoteDeviceModel.h:111
@ DEVICE_ID
Definition: RemoteDeviceModel.h:109
@ REMOTE_DEVICE_STATUS
Definition: RemoteDeviceModel.h:107
@ IS_PAIRED
Definition: RemoteDeviceModel.h:112
@ LINK_QUALITY
Definition: RemoteDeviceModel.h:113
@ REMOTE_DEVICE_NAME
Definition: RemoteDeviceModel.h:106
QHash< int, QByteArray > roleNames() const override
Definition: RemoteDeviceModel.cpp:184
bool isPaired(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:443
void onDeviceDisconnected(GlobalStatus::Code pCloseCode, const QString &pId)
Definition: RemoteDeviceModel.cpp:588
int rowCount(const QModelIndex &pParent=QModelIndex()) const override
Definition: RemoteDeviceModel.cpp:369
void onKnownRemoteReadersChanged()
Definition: RemoteDeviceModel.cpp:489
friend class ::test_RemoteDeviceModel
Definition: RemoteDeviceModel.h:75
void setDetectRemoteDevices(bool pNewStatus)
Definition: RemoteDeviceModel.cpp:465
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition: RemoteDeviceModel.cpp:375
bool isSupported(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:454
QSharedPointer< IfdListEntry > getRemoteDeviceListEntry(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:418
QString emptyListDescriptionString
Definition: RemoteDeviceModel.h:74
Definition: RemoteServiceSettings.h:29
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16