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.
samplingdevicedialog.cpp
Go to the documentation of this file.
1 // Copyright (C) 2017 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // OpenGL interface modernization. //
6 // See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
7 // //
8 // This program is free software; you can redistribute it and/or modify //
9 // it under the terms of the GNU General Public License as published by //
10 // the Free Software Foundation as version 3 of the License, or //
11 // (at your option) any later version. //
12 // //
13 // This program is distributed in the hope that it will be useful, //
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
16 // GNU General Public License V3 for more details. //
17 // //
18 // You should have received a copy of the GNU General Public License //
19 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
21 
22 #include "samplingdevicedialog.h"
23 #include "ui_samplingdevicedialog.h"
25 
26 
27 SamplingDeviceDialog::SamplingDeviceDialog(int deviceType, int deviceTabIndex, QWidget* parent) :
28  QDialog(parent),
29  ui(new Ui::SamplingDeviceDialog),
30  m_deviceType(deviceType),
31  m_deviceTabIndex(deviceTabIndex),
32  m_selectedDeviceIndex(-1)
33 {
34  ui->setupUi(this);
35 
36  QList<QString> deviceDisplayNames;
37 
38  if (m_deviceType == 0) { // Single Rx
40  } else if (m_deviceType == 1) { // Single Tx
42  } else if (m_deviceType == 2) { // MIMO
44  }
45 
46  QStringList devicesNamesList(deviceDisplayNames);
47  ui->deviceSelect->addItems(devicesNamesList);
48 }
49 
51 {
52  delete ui;
53 }
54 
56 {
57  m_selectedDeviceIndex = m_deviceIndexes[ui->deviceSelect->currentIndex()];
58 
59  if (m_deviceType == 0) { // Single Rx
61  } else if (m_deviceType == 1) { // Single Tx
63  } else if (m_deviceType == 2) { // MIMO
65  }
66 
67  QDialog::accept();
68 }
void changeMIMOSelection(int tabIndex, int deviceIndex)
std::vector< int > m_deviceIndexes
void listRxDeviceNames(QList< QString > &list, std::vector< int > &indexes) const
void changeTxSelection(int tabIndex, int deviceIndex)
void listTxDeviceNames(QList< QString > &list, std::vector< int > &indexes) const
SamplingDeviceDialog(int deviceType, int deviceTabIndex, QWidget *parent=0)
void changeRxSelection(int tabIndex, int deviceIndex)
void listMIMODeviceNames(QList< QString > &list, std::vector< int > &indexes) const
Ui::SamplingDeviceDialog * ui
static DeviceEnumerator * instance()