OpenHantek
RawDevicesListModel Class Reference

#include <rawdeviceslistmodel.h>

Inheritance diagram for RawDevicesListModel:

Public Types

enum  Roles {
  ProductIDRole = Qt::UserRole+0, VendorIDRole = Qt::UserRole+1, AccessRole = Qt::UserRole+2, DeviceNameRole = Qt::UserRole+3,
  EntryPointerRole = Qt::UserRole+4
}
 

Public Member Functions

 RawDevicesListModel (libusb_context *context, QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent) const override
 
int columnCount (const QModelIndex &parent) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
void updateDeviceList ()
 

Private Attributes

std::vector< RawDeviceListEntryentries
 
libusb_context * context
 

Detailed Description

Provides a Model for the Qt Model/View concept. The {

See also
FindDevices} is required to update the list of available devices.

Member Enumeration Documentation

◆ Roles

Enumerator
ProductIDRole 
VendorIDRole 
AccessRole 
DeviceNameRole 
EntryPointerRole 

Constructor & Destructor Documentation

◆ RawDevicesListModel()

RawDevicesListModel::RawDevicesListModel ( libusb_context *  context,
QObject *  parent = nullptr 
)

Member Function Documentation

◆ columnCount()

int RawDevicesListModel::columnCount ( const QModelIndex &  parent) const
override

◆ data()

QVariant RawDevicesListModel::data ( const QModelIndex &  index,
int  role 
) const
override

◆ rowCount()

int RawDevicesListModel::rowCount ( const QModelIndex &  parent) const
override

◆ updateDeviceList()

void RawDevicesListModel::updateDeviceList ( )

Field Documentation

◆ context

libusb_context* RawDevicesListModel::context
private

◆ entries

std::vector<RawDeviceListEntry> RawDevicesListModel::entries
private

The documentation for this class was generated from the following files: