18#include <QAbstractTableModel>
20#include <QSslCertificate>
23class test_RemoteDeviceModel;
30 friend class ::test_RemoteDeviceModel;
39 QDateTime mLastConnected;
40 QSharedPointer<IfdListEntry> mRemoteDeviceListEntry;
45 const QSharedPointer<IfdListEntry>& pRemoteDeviceListEntry);
51 const QDateTime& pLastConnected,
52 const QSharedPointer<IfdListEntry>& pRemoteDeviceListEntry);
57 [[nodiscard]]
const QString&
getId()
const;
58 void setId(
const QString& pId);
73 :
public QAbstractListModel
82 const
bool mShowPairedReaders;
83 const
bool mShowUnpairedReaders;
85 bool mIsDetectingRemoteDevices;
87 bool mRemoteDetectionWasRunning;
90 [[nodiscard]]
bool indexIsValid(
const QModelIndex& pIndex)
const;
92 void updatePairedReaders();
93 void updateUnpairedReaders();
94 void removeVanishedReaders();
95 [[nodiscard]] QVector<RemoteDeviceModelEntry> presentReaders()
const;
99 void onApplicationStateChanged(
bool pIsAppInForeground);
100 void onUpdateReaderList();
118 RemoteDeviceModel(QObject* pParent =
nullptr,
bool pShowPairedReaders =
true,
bool pShowUnpairedReaders =
true);
120 [[nodiscard]]
int rowCount(
const QModelIndex& pParent = QModelIndex())
const override;
121 [[nodiscard]] QVariant
data(
const QModelIndex& pIndex,
int pRole = Qt::DisplayRole)
const override;
122 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
126 [[nodiscard]]
bool isPaired(
const QModelIndex& pIndex)
const;
127 [[nodiscard]]
bool isSupported(
const QModelIndex& pIndex)
const;
Code
Definition: GlobalStatus.h:28
Definition: RemoteDeviceModel.h:29
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:74
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:107
@ IS_NETWORK_VISIBLE
Definition: RemoteDeviceModel.h:112
@ LAST_CONNECTED
Definition: RemoteDeviceModel.h:110
@ IS_SUPPORTED
Definition: RemoteDeviceModel.h:113
@ DEVICE_ID
Definition: RemoteDeviceModel.h:111
@ REMOTE_DEVICE_STATUS
Definition: RemoteDeviceModel.h:109
@ IS_PAIRED
Definition: RemoteDeviceModel.h:114
@ LINK_QUALITY
Definition: RemoteDeviceModel.h:115
@ REMOTE_DEVICE_NAME
Definition: RemoteDeviceModel.h:108
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:77
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:76
Definition: RemoteServiceSettings.h:31
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16