OpenHantek
Loading...
Searching...
No Matches
deviceslistmodel.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include "devicelistentry.h"
6#include <QAbstractTableModel>
7
8class FindDevices;
9
14class DevicesListModel : public QAbstractTableModel {
15 public:
17 // QAbstractItemModel interface
18 int rowCount( const QModelIndex &parent ) const override;
19 int columnCount( const QModelIndex &parent ) const override;
20 QVariant headerData( int section, Qt::Orientation orientation, int role ) const override;
21 QVariant data( const QModelIndex &index, int role ) const override;
22 void updateDeviceList();
23
24 private:
25 std::vector< DeviceListEntry > entries;
27 int verboseLevel = 0;
28};
int rowCount(const QModelIndex &parent) const override
Definition deviceslistmodel.cpp:13
void updateDeviceList()
Definition deviceslistmodel.cpp:64
std::vector< DeviceListEntry > entries
Definition deviceslistmodel.h:25
DevicesListModel(FindDevices *findDevices, int verboseLevel=0)
Definition deviceslistmodel.cpp:10
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Definition deviceslistmodel.cpp:17
int verboseLevel
Definition deviceslistmodel.h:27
int columnCount(const QModelIndex &parent) const override
Definition deviceslistmodel.cpp:15
FindDevices * findDevices
Definition deviceslistmodel.h:26
QVariant data(const QModelIndex &index, int role) const override
Definition deviceslistmodel.cpp:33
Search for Hantek devices. Use usually want to call updateDeviceList and then retrieve the list via g...
Definition finddevices.h:23