OpenHantek
selectsupporteddevice.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #pragma once
4 
5 #include "ui_selectsupporteddevice.h"
6 
7 #include <QDialog>
8 #include <QPushButton>
9 
10 #include "usb/scopedevice.h"
11 #include <memory>
12 
13 struct libusb_context;
14 
23 class SelectSupportedDevice : public QDialog {
24  Q_OBJECT
25 
26  public:
27  explicit SelectSupportedDevice( QWidget *parent = nullptr );
28  std::unique_ptr< ScopeDevice > showSelectDeviceModal( libusb_context *context, int verboseLevel = 0, bool autoConnect = true );
29  void showLibUSBFailedDialogModel( int error );
30 
31  private:
32  void updateDeviceList();
34  std::unique_ptr< Ui::SelectSupportedDevice > ui;
36  bool demoModeClicked = false;
37  int verboseLevel = 0;
38  QPushButton *btnDemoMode;
39 };
QPushButton * btnDemoMode
Definition: selectsupporteddevice.h:38
std::unique_ptr< Ui::SelectSupportedDevice > ui
Definition: selectsupporteddevice.h:34
void updateSupportedDevices()
Definition: selectsupporteddevice.cpp:173
SelectSupportedDevice(QWidget *parent=nullptr)
Definition: selectsupporteddevice.cpp:20
UniqueUSBid selectedDevice
Definition: selectsupporteddevice.h:35
int verboseLevel
Definition: selectsupporteddevice.h:37
void showLibUSBFailedDialogModel(int error)
Definition: selectsupporteddevice.cpp:164
Definition: selectsupporteddevice.h:23
std::unique_ptr< ScopeDevice > showSelectDeviceModal(libusb_context *context, int verboseLevel=0, bool autoConnect=true)
Definition: selectsupporteddevice.cpp:48
uint64_t UniqueUSBid
Definition: scopedevice.h:20
bool demoModeClicked
Definition: selectsupporteddevice.h:36