OpenHantek
SelectSupportedDevice Class Reference

#include <selectsupporteddevice.h>

Inheritance diagram for SelectSupportedDevice:

Public Member Functions

 SelectSupportedDevice (QWidget *parent=nullptr)
 
std::unique_ptr< USBDeviceshowSelectDeviceModal (libusb_context *context)
 
void showLibUSBFailedDialogModel (int error)
 

Private Member Functions

void updateDeviceList ()
 
void updateSupportedDevices ()
 

Private Attributes

std::unique_ptr< Ui::SelectSupportedDevice > ui
 
UniqueUSBid selectedDevice = 0
 

Detailed Description

Offers the user a device selection dialog. If you call any of the -Modal methods, the method will block and show a dialog for selection or for a usb error message. The method returns as soon as the user closes the dialog.

An example to get a user selected device: std::unique_ptr<USBDevice> device = SelectDevice().showSelectDeviceModal(context);

Constructor & Destructor Documentation

◆ SelectSupportedDevice()

SelectSupportedDevice::SelectSupportedDevice ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ showLibUSBFailedDialogModel()

void SelectSupportedDevice::showLibUSBFailedDialogModel ( int  error)

◆ showSelectDeviceModal()

std::unique_ptr< USBDevice > SelectSupportedDevice::showSelectDeviceModal ( libusb_context *  context)

◆ updateDeviceList()

void SelectSupportedDevice::updateDeviceList ( )
private

◆ updateSupportedDevices()

void SelectSupportedDevice::updateSupportedDevices ( )
private

Field Documentation

◆ selectedDevice

UniqueUSBid SelectSupportedDevice::selectedDevice = 0
private

◆ ui

std::unique_ptr<Ui::SelectSupportedDevice> SelectSupportedDevice::ui
private

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