OpenHantek
selectsupporteddevice.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include "ui_selectsupporteddevice.h"
6 
7 #include <QDialog>
8 
9 #include <memory>
10 #include "usb/usbdevice.h"
11 
12 struct libusb_context;
14 
15 // define if this tab is also designed in "selectsupporteddevice.ui"
16 // #define NEW_DEVICE_FROM_EXISTING_DIALOG
17 
26 class SelectSupportedDevice : public QDialog
27 {
28  Q_OBJECT
29 
30 public:
31  explicit SelectSupportedDevice(QWidget *parent = nullptr);
32  std::unique_ptr<USBDevice> showSelectDeviceModal(libusb_context *context);
33  void showLibUSBFailedDialogModel(int error);
34 private:
35  void updateDeviceList();
37  std::unique_ptr<Ui::SelectSupportedDevice> ui;
39 #ifdef NEW_DEVICE_FROM_EXISTING_DIALOG
40  NewDeviceModelFromExisting* newDeviceFromExistingDialog;
41 #endif
42 };
void updateSupportedDevices()
Definition: selectsupporteddevice.cpp:138
SelectSupportedDevice(QWidget *parent=nullptr)
Definition: selectsupporteddevice.cpp:19
std::unique_ptr< USBDevice > showSelectDeviceModal(libusb_context *context)
Definition: selectsupporteddevice.cpp:50
UniqueUSBid selectedDevice
Definition: selectsupporteddevice.h:38
void showLibUSBFailedDialogModel(int error)
Definition: selectsupporteddevice.cpp:126
uint64_t UniqueUSBid
Definition: usbdevice.h:16
Definition: selectsupporteddevice.h:26
std::unique_ptr< Ui::SelectSupportedDevice > ui
Definition: selectsupporteddevice.h:37
Definition: newdevicemodelfromexisting.h:16