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.
Public Member Functions | Private Slots | Private Attributes | List of all members
SamplingDeviceDialog Class Reference

#include <samplingdevicedialog.h>

Inherits QDialog.

Public Member Functions

 SamplingDeviceDialog (int deviceType, int deviceTabIndex, QWidget *parent=0)
 
 ~SamplingDeviceDialog ()
 
int getSelectedDeviceIndex () const
 

Private Slots

void accept ()
 

Private Attributes

Ui::SamplingDeviceDialog * ui
 
int m_deviceType
 
int m_deviceTabIndex
 
int m_selectedDeviceIndex
 
std::vector< int > m_deviceIndexes
 

Detailed Description

Definition at line 34 of file samplingdevicedialog.h.

Constructor & Destructor Documentation

◆ SamplingDeviceDialog()

SamplingDeviceDialog::SamplingDeviceDialog ( int  deviceType,
int  deviceTabIndex,
QWidget *  parent = 0 
)
explicit

Definition at line 27 of file samplingdevicedialog.cpp.

References DeviceEnumerator::instance(), DeviceEnumerator::listMIMODeviceNames(), DeviceEnumerator::listRxDeviceNames(), DeviceEnumerator::listTxDeviceNames(), m_deviceIndexes, m_deviceType, and ui.

27  :
28  QDialog(parent),
29  ui(new Ui::SamplingDeviceDialog),
30  m_deviceType(deviceType),
31  m_deviceTabIndex(deviceTabIndex),
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 }
std::vector< int > m_deviceIndexes
void listRxDeviceNames(QList< QString > &list, std::vector< int > &indexes) const
void listTxDeviceNames(QList< QString > &list, std::vector< int > &indexes) const
void listMIMODeviceNames(QList< QString > &list, std::vector< int > &indexes) const
Ui::SamplingDeviceDialog * ui
static DeviceEnumerator * instance()
+ Here is the call graph for this function:

◆ ~SamplingDeviceDialog()

SamplingDeviceDialog::~SamplingDeviceDialog ( )

Definition at line 50 of file samplingdevicedialog.cpp.

References ui.

51 {
52  delete ui;
53 }
Ui::SamplingDeviceDialog * ui

Member Function Documentation

◆ accept

void SamplingDeviceDialog::accept ( )
privateslot

Definition at line 55 of file samplingdevicedialog.cpp.

References DeviceEnumerator::changeMIMOSelection(), DeviceEnumerator::changeRxSelection(), DeviceEnumerator::changeTxSelection(), DeviceEnumerator::instance(), m_deviceIndexes, m_deviceTabIndex, m_deviceType, m_selectedDeviceIndex, and ui.

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 changeTxSelection(int tabIndex, int deviceIndex)
void changeRxSelection(int tabIndex, int deviceIndex)
Ui::SamplingDeviceDialog * ui
static DeviceEnumerator * instance()
+ Here is the call graph for this function:

◆ getSelectedDeviceIndex()

int SamplingDeviceDialog::getSelectedDeviceIndex ( ) const
inline

Definition at line 40 of file samplingdevicedialog.h.

Referenced by SamplingDeviceControl::on_deviceChange_clicked().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceIndexes

std::vector<int> SamplingDeviceDialog::m_deviceIndexes
private

Definition at line 47 of file samplingdevicedialog.h.

Referenced by accept(), and SamplingDeviceDialog().

◆ m_deviceTabIndex

int SamplingDeviceDialog::m_deviceTabIndex
private

Definition at line 45 of file samplingdevicedialog.h.

Referenced by accept().

◆ m_deviceType

int SamplingDeviceDialog::m_deviceType
private

Definition at line 44 of file samplingdevicedialog.h.

Referenced by accept(), and SamplingDeviceDialog().

◆ m_selectedDeviceIndex

int SamplingDeviceDialog::m_selectedDeviceIndex
private

Definition at line 46 of file samplingdevicedialog.h.

Referenced by accept().

◆ ui

Ui::SamplingDeviceDialog* SamplingDeviceDialog::ui
private

Definition at line 43 of file samplingdevicedialog.h.

Referenced by accept(), SamplingDeviceDialog(), and ~SamplingDeviceDialog().


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