SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
deviceuserargsdialog.h
Go to the documentation of this file.
1 // Copyright (C) 2019 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef SDRGUI_GUI_DEVICEUSERARGSDIALOG_H
19 #define SDRGUI_GUI_DEVICEUSERARGSDIALOG_H
20 
21 #include <QDialog>
22 #include <QSet>
23 
24 #include "plugin/plugininterface.h"
25 #include "device/deviceuserargs.h"
26 #include "export.h"
27 
28 class QTreeWidgetItem;
29 class DeviceEnumerator;
30 
31 namespace Ui {
33 }
34 
35 class SDRGUI_API DeviceUserArgsDialog : public QDialog {
36  Q_OBJECT
37 
38 public:
39  explicit DeviceUserArgsDialog(
40  DeviceEnumerator* deviceEnumerator,
41  DeviceUserArgs& hardwareDeviceUserArgs,
42  QWidget* parent = 0);
44 
45 private:
47  QString m_hardwareId;
49  QString m_description;
50 
51  bool operator==(const HWDeviceReference& rhs) {
52  return (m_hardwareId == rhs.m_hardwareId) && (m_sequence == rhs.m_sequence);
53  }
54  };
55 
56  Ui::DeviceUserArgsDialog* ui;
59  std::vector<HWDeviceReference> m_availableHWDevices;
61 
62  void pushHWDeviceReference(const PluginInterface::SamplingDevice *samplingDevice);
63  void displayArgsByDevice();
64 
65 private slots:
66  void accept();
67  void reject();
68  void on_importDevice_clicked(bool checked);
69  void on_deleteArgs_clicked(bool checked);
70  void on_argsTree_currentItemChanged(QTreeWidgetItem* currentItem, QTreeWidgetItem* previousItem);
71  void on_argStringEdit_editingFinished();
72 };
73 
74 #endif // SDRGUI_GUI_DEVICEUSERARGSDIALOG_H
std::vector< HWDeviceReference > m_availableHWDevices
DeviceEnumerator * m_deviceEnumerator
DeviceUserArgs & m_hardwareDeviceUserArgs
#define SDRGUI_API
Definition: export.h:52
Ui::DeviceUserArgsDialog * ui
bool operator==(const HWDeviceReference &rhs)
DeviceUserArgs m_deviceUserArgsCopy