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

#include <samplingdevicecontrol.h>

Inherits QWidget.

+ Collaboration diagram for SamplingDeviceControl:

Signals

void changed ()
 

Public Member Functions

 SamplingDeviceControl (int tabIndex, int deviceType, QWidget *parent=0)
 
 ~SamplingDeviceControl ()
 
int getSelectedDeviceIndex () const
 
void setSelectedDeviceIndex (int index)
 
void removeSelectedDeviceIndex ()
 
void setPluginManager (PluginManager *pluginManager)
 
QComboBox * getChannelSelector ()
 
QPushButton * getAddChannelButton ()
 

Private Slots

void on_deviceChange_clicked ()
 
void on_deviceReload_clicked ()
 

Private Attributes

Ui::SamplingDeviceControl * ui
 
PluginManagerm_pluginManager
 
int m_deviceTabIndex
 
int m_deviceType
 
int m_selectedDeviceIndex
 

Detailed Description

Definition at line 35 of file samplingdevicecontrol.h.

Constructor & Destructor Documentation

◆ SamplingDeviceControl()

SamplingDeviceControl::SamplingDeviceControl ( int  tabIndex,
int  deviceType,
QWidget *  parent = 0 
)
explicit

Definition at line 25 of file samplingdevicecontrol.cpp.

References ui.

25  :
26  QWidget(parent),
27  ui(new Ui::SamplingDeviceControl),
28  m_pluginManager(0),
29  m_deviceTabIndex(tabIndex),
30  m_deviceType(deviceType),
32 {
33  ui->setupUi(this);
34  ui->deviceSelectedText->setText("None");
35 }
PluginManager * m_pluginManager
Ui::SamplingDeviceControl * ui

◆ ~SamplingDeviceControl()

SamplingDeviceControl::~SamplingDeviceControl ( )

Definition at line 37 of file samplingdevicecontrol.cpp.

References ui.

38 {
39  delete ui;
40 }
Ui::SamplingDeviceControl * ui

Member Function Documentation

◆ changed

void SamplingDeviceControl::changed ( )
signal

Referenced by on_deviceChange_clicked(), and on_deviceReload_clicked().

+ Here is the caller graph for this function:

◆ getAddChannelButton()

QPushButton * SamplingDeviceControl::getAddChannelButton ( )

Definition at line 107 of file samplingdevicecontrol.cpp.

References ui.

108 {
109  return ui->addChannel;
110 }
Ui::SamplingDeviceControl * ui

◆ getChannelSelector()

QComboBox * SamplingDeviceControl::getChannelSelector ( )

Definition at line 102 of file samplingdevicecontrol.cpp.

References ui.

Referenced by MainWindow::channelAddClicked(), and MainWindow::handleMessage().

103 {
104  return ui->channelSelect;
105 }
Ui::SamplingDeviceControl * ui
+ Here is the caller graph for this function:

◆ getSelectedDeviceIndex()

int SamplingDeviceControl::getSelectedDeviceIndex ( ) const
inline

Definition at line 42 of file samplingdevicecontrol.h.

Referenced by MainWindow::sampleMIMOChanged(), MainWindow::sampleSinkChanged(), and MainWindow::sampleSourceChanged().

+ Here is the caller graph for this function:

◆ on_deviceChange_clicked

void SamplingDeviceControl::on_deviceChange_clicked ( )
privateslot

Definition at line 42 of file samplingdevicecontrol.cpp.

References changed(), SamplingDeviceDialog::getSelectedDeviceIndex(), m_deviceTabIndex, m_deviceType, m_selectedDeviceIndex, and setSelectedDeviceIndex().

43 {
45  dialog.exec();
46 
47  if (dialog.getSelectedDeviceIndex() >= 0)
48  {
49  m_selectedDeviceIndex = dialog.getSelectedDeviceIndex();
51  emit changed();
52  }
53 }
void setSelectedDeviceIndex(int index)
+ Here is the call graph for this function:

◆ on_deviceReload_clicked

void SamplingDeviceControl::on_deviceReload_clicked ( )
privateslot

Definition at line 55 of file samplingdevicecontrol.cpp.

References changed(), and m_selectedDeviceIndex.

56 {
57  if (m_selectedDeviceIndex >= 0) {
58  emit changed();
59  }
60 }

◆ removeSelectedDeviceIndex()

void SamplingDeviceControl::removeSelectedDeviceIndex ( )

Definition at line 86 of file samplingdevicecontrol.cpp.

References DeviceEnumerator::instance(), m_deviceTabIndex, m_deviceType, m_selectedDeviceIndex, DeviceEnumerator::removeRxSelection(), DeviceEnumerator::removeTxSelection(), and ui.

87 {
88  if (m_deviceType == 0) // Single Rx
89  {
91  ui->deviceSelectedText->setText("None");
92  }
93  else if (m_deviceType == 1) // Single Tx
94  {
96  ui->deviceSelectedText->setText("None");
97  }
98 
100 }
void removeRxSelection(int tabIndex)
void removeTxSelection(int tabIndex)
Ui::SamplingDeviceControl * ui
static DeviceEnumerator * instance()
+ Here is the call graph for this function:

◆ setPluginManager()

void SamplingDeviceControl::setPluginManager ( PluginManager pluginManager)
inline

Definition at line 46 of file samplingdevicecontrol.h.

46 { m_pluginManager = pluginManager; }
PluginManager * m_pluginManager

◆ setSelectedDeviceIndex()

void SamplingDeviceControl::setSelectedDeviceIndex ( int  index)

Definition at line 62 of file samplingdevicecontrol.cpp.

References DeviceEnumerator::changeMIMOSelection(), DeviceEnumerator::changeRxSelection(), DeviceEnumerator::changeTxSelection(), PluginInterface::SamplingDevice::displayedName, DeviceEnumerator::getMIMOSamplingDevice(), DeviceEnumerator::getRxSamplingDevice(), DeviceEnumerator::getTxSamplingDevice(), DeviceEnumerator::instance(), m_deviceTabIndex, m_deviceType, m_selectedDeviceIndex, and ui.

Referenced by MainWindow::handleMessage(), and on_deviceChange_clicked().

63 {
64  if (m_deviceType == 0) // Single Rx
65  {
68  ui->deviceSelectedText->setText(samplingDevice->displayedName);
69  }
70  else if (m_deviceType == 1) // Single Tx
71  {
74  ui->deviceSelectedText->setText(samplingDevice->displayedName);
75  }
76  else if (m_deviceType == 2) // MIMO
77  {
80  ui->deviceSelectedText->setText(samplingDevice->displayedName);
81  }
82 
83  m_selectedDeviceIndex = index;
84 }
void changeMIMOSelection(int tabIndex, int deviceIndex)
QString displayedName
The human readable name.
void changeTxSelection(int tabIndex, int deviceIndex)
const PluginInterface::SamplingDevice * getMIMOSamplingDevice(int deviceIndex) const
void changeRxSelection(int tabIndex, int deviceIndex)
Ui::SamplingDeviceControl * ui
const PluginInterface::SamplingDevice * getTxSamplingDevice(int deviceIndex) const
const PluginInterface::SamplingDevice * getRxSamplingDevice(int deviceIndex) const
static DeviceEnumerator * instance()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceTabIndex

int SamplingDeviceControl::m_deviceTabIndex
private

◆ m_deviceType

int SamplingDeviceControl::m_deviceType
private

◆ m_pluginManager

PluginManager* SamplingDeviceControl::m_pluginManager
private

Definition at line 56 of file samplingdevicecontrol.h.

◆ m_selectedDeviceIndex

int SamplingDeviceControl::m_selectedDeviceIndex
private

◆ ui

Ui::SamplingDeviceControl* SamplingDeviceControl::ui
private

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