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
DeviceStreamSelectionDialog Class Reference

#include <devicestreamselectiondialog.h>

Inherits QDialog.

Public Member Functions

 DeviceStreamSelectionDialog (QWidget *parent=nullptr)
 
 ~DeviceStreamSelectionDialog ()
 
bool hasChanged () const
 
void setNumberOfStreams (int nbStreams)
 
void setStreamIndex (int index)
 
int getSelectedStreamIndex () const
 

Private Slots

void accept ()
 

Private Attributes

Ui::DeviceStreamSelectionDialog * ui
 
bool m_hasChanged
 
int m_streamIndex
 

Detailed Description

Definition at line 30 of file devicestreamselectiondialog.h.

Constructor & Destructor Documentation

◆ DeviceStreamSelectionDialog()

DeviceStreamSelectionDialog::DeviceStreamSelectionDialog ( QWidget *  parent = nullptr)
explicit

Definition at line 22 of file devicestreamselectiondialog.cpp.

References setStreamIndex(), and ui.

22  :
23  QDialog(parent),
24  ui(new Ui::DeviceStreamSelectionDialog),
25  m_hasChanged(false)
26 {
27  ui->setupUi(this);
28  setStreamIndex(0);
29 }
Ui::DeviceStreamSelectionDialog * ui
+ Here is the call graph for this function:

◆ ~DeviceStreamSelectionDialog()

DeviceStreamSelectionDialog::~DeviceStreamSelectionDialog ( )

Definition at line 31 of file devicestreamselectiondialog.cpp.

References ui.

32 {
33  delete ui;
34 }
Ui::DeviceStreamSelectionDialog * ui

Member Function Documentation

◆ accept

void DeviceStreamSelectionDialog::accept ( )
privateslot

Definition at line 51 of file devicestreamselectiondialog.cpp.

References m_hasChanged, m_streamIndex, and ui.

52 {
53  m_streamIndex = ui->deviceStream->currentIndex();
54  m_hasChanged = true;
55  QDialog::accept();
56 }
Ui::DeviceStreamSelectionDialog * ui

◆ getSelectedStreamIndex()

int DeviceStreamSelectionDialog::getSelectedStreamIndex ( ) const
inline

Definition at line 39 of file devicestreamselectiondialog.h.

Referenced by AMDemodGUI::onMenuDialogCalled().

+ Here is the caller graph for this function:

◆ hasChanged()

bool DeviceStreamSelectionDialog::hasChanged ( ) const
inline

◆ setNumberOfStreams()

void DeviceStreamSelectionDialog::setNumberOfStreams ( int  nbStreams)

Definition at line 36 of file devicestreamselectiondialog.cpp.

References arg(), i, and ui.

Referenced by AMDemodGUI::onMenuDialogCalled().

37 {
38  ui->deviceStream->clear();
39 
40  for (int i = 0; i < nbStreams; i++) {
41  ui->deviceStream->addItem(tr("%1").arg(i));
42  }
43 }
Ui::DeviceStreamSelectionDialog * ui
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
int32_t i
Definition: decimators.h:244
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStreamIndex()

void DeviceStreamSelectionDialog::setStreamIndex ( int  index)

Definition at line 45 of file devicestreamselectiondialog.cpp.

References m_streamIndex, and ui.

Referenced by DeviceStreamSelectionDialog(), and AMDemodGUI::onMenuDialogCalled().

46 {
47  ui->deviceStream->setCurrentIndex(index);
48  m_streamIndex = ui->deviceStream->currentIndex();
49 }
Ui::DeviceStreamSelectionDialog * ui
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_hasChanged

bool DeviceStreamSelectionDialog::m_hasChanged
private

Definition at line 46 of file devicestreamselectiondialog.h.

Referenced by accept().

◆ m_streamIndex

int DeviceStreamSelectionDialog::m_streamIndex
private

Definition at line 47 of file devicestreamselectiondialog.h.

Referenced by accept(), and setStreamIndex().

◆ ui

Ui::DeviceStreamSelectionDialog* DeviceStreamSelectionDialog::ui
private

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