15class RemoteDeviceFilterModel
16 :
public QSortFilterProxyModel
19 QML_UNCREATABLE(
"Used by RemoteServiceModel only")
22 friend class ::test_RemoteDeviceFilterModel;
25 using FilterFunctionType = std::function<bool (
int pSourceRow,
const QModelIndex& pSourceParent)>;
26 FilterFunctionType mFilterToApply;
28 RemoteDeviceFilterModel(QAbstractItemModel* pSourceModel,
const FilterFunctionType& pFilterFunction);
46 [[nodiscard]]
bool available(
int pSourceRow,
const QModelIndex& pSourceParent)
const;
47 [[nodiscard]]
bool isDevicePaired(
int pSourceRow,
const QModelIndex& pSourceParent)
const;
49 [[nodiscard]]
bool availableNotPairing(
int pSourceRow,
const QModelIndex& pSourceParent)
const;
50 [[nodiscard]]
bool unavailableAndPaired(
int pSourceRow,
const QModelIndex& pSourceParent)
const;
51 [[nodiscard]]
bool isPairing(
int pSourceRow,
const QModelIndex& pSourceParent)
const;
54 [[nodiscard]]
bool filterAcceptsRow(
int pSourceRow,
const QModelIndex& pSourceParent)
const override;