15#include <QAbstractListModel>
18#include <QSharedPointer>
19#include <QSslCertificate>
24class test_RemoteDeviceModel;
25class test_RemoteDeviceFilterModel;
32 :
public QAbstractListModel
35 friend class ::test_RemoteDeviceModel;
36 friend class ::test_RemoteDeviceFilterModel;
39 QMap<QString, RemoteServiceSettings::RemoteInfo> mPairedReaders;
40 QList<RemoteDeviceModelEntry> mAllRemoteReaders;
43 bool mIsDetectingRemoteDevices;
45 bool mRemoteDetectionWasRunning;
48 [[nodiscard]]
bool indexIsValid(
const QModelIndex& pIndex)
const;
50 [[nodiscard]] QString getCurrentDeviceName(
const QModelIndex& pIndex)
const;
51 [[nodiscard]] QString constructDisplayDeviceName(
const QModelIndex& pIndex)
const;
52 void updatePairedReaders();
53 void updateUnpairedReaders();
54 void removeVanishedReaders();
55 [[nodiscard]]
virtual QList<RemoteDeviceModelEntry> presentReaders()
const;
59 void onApplicationStateChanged(
bool pIsAppInForeground);
60 void onUpdateReaderList();
82 [[nodiscard]]
int rowCount(
const QModelIndex& pParent = QModelIndex())
const override;
83 [[nodiscard]] QVariant
data(
const QModelIndex& pIndex,
int pRole = Qt::DisplayRole)
const override;
84 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
88 [[nodiscard]]
bool isPaired(
const QModelIndex& pIndex)
const;
89 [[nodiscard]]
bool isPairing(
const QModelIndex& pIndex)
const;
90 [[nodiscard]]
bool isSupported(
const QModelIndex& pIndex)
const;
Code
Definition: GlobalStatus.h:28
Definition: RemoteDeviceModelEntry.h:26
Definition: RemoteDeviceModel.h:33
void forgetDevice(const QModelIndex &pIndex)
Definition: RemoteDeviceModel.cpp:469
void onTranslationChanged()
Definition: RemoteDeviceModel.cpp:463
SettingsRemoteRoles
Definition: RemoteDeviceModel.h:67
@ IS_NETWORK_VISIBLE
Definition: RemoteDeviceModel.h:72
@ LAST_CONNECTED
Definition: RemoteDeviceModel.h:70
@ IS_SUPPORTED
Definition: RemoteDeviceModel.h:73
@ DEVICE_ID
Definition: RemoteDeviceModel.h:71
@ REMOTE_DEVICE_STATUS
Definition: RemoteDeviceModel.h:69
@ IS_PAIRED
Definition: RemoteDeviceModel.h:74
@ IS_PAIRING
Definition: RemoteDeviceModel.h:75
@ LINK_QUALITY
Definition: RemoteDeviceModel.h:76
@ IS_LAST_ADDED_DEVICE
Definition: RemoteDeviceModel.h:77
@ REMOTE_DEVICE_NAME
Definition: RemoteDeviceModel.h:68
QHash< int, QByteArray > roleNames() const override
Definition: RemoteDeviceModel.cpp:41
bool isPairing(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:363
bool isPaired(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:352
void onDeviceDisconnected(GlobalStatus::Code pCloseCode, const QString &pId)
Definition: RemoteDeviceModel.cpp:499
int rowCount(const QModelIndex &pParent=QModelIndex()) const override
Definition: RemoteDeviceModel.cpp:269
void setLastPairedReader(const QSslCertificate &pCert)
Definition: RemoteDeviceModel.cpp:491
void onKnownRemoteReadersChanged()
Definition: RemoteDeviceModel.cpp:409
void setDetectRemoteDevices(bool pNewStatus)
Definition: RemoteDeviceModel.cpp:385
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition: RemoteDeviceModel.cpp:275
bool isSupported(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:374
QSharedPointer< IfdListEntry > getRemoteDeviceListEntry(const QModelIndex &pIndex) const
Definition: RemoteDeviceModel.cpp:327
Definition: RemoteServiceSettings.h:40
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16