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

#include <complexfactorgui.h>

Inherits QWidget.

Signals

void moduleChanged (double value)
 
void argumentChanged (double value)
 
void automaticChanged (bool value)
 

Public Member Functions

 ComplexFactorGUI (QWidget *parent=0)
 
 ~ComplexFactorGUI ()
 
double getModule () const
 
double getArgument () const
 
bool getAutomatic () const
 
void setModule (double value)
 
void setArgument (double value)
 
void setAutomatic (bool automatic)
 
void setAutomaticEnable (bool enable)
 
void setLabel (const QString &text)
 
void setToolTip (const QString &text)
 

Private Slots

void on_automatic_toggled (bool set)
 
void on_module_valueChanged (int value)
 
void on_arg_valueChanged (int value)
 

Private Attributes

Ui::ComplexFactorGUI * ui
 

Detailed Description

Definition at line 34 of file complexfactorgui.h.

Constructor & Destructor Documentation

◆ ComplexFactorGUI()

ComplexFactorGUI::ComplexFactorGUI ( QWidget *  parent = 0)
explicit

Definition at line 21 of file complexfactorgui.cpp.

References ui.

21  :
22  QWidget(parent),
23  ui(new Ui::ComplexFactorGUI)
24 {
25  ui->setupUi(this);
26  ui->automatic->setChecked(false);
27 }
Ui::ComplexFactorGUI * ui

◆ ~ComplexFactorGUI()

ComplexFactorGUI::~ComplexFactorGUI ( )

Definition at line 29 of file complexfactorgui.cpp.

References ui.

30 {
31  delete ui;
32 }
Ui::ComplexFactorGUI * ui

Member Function Documentation

◆ argumentChanged

void ComplexFactorGUI::argumentChanged ( double  value)
signal

Referenced by on_arg_valueChanged().

+ Here is the caller graph for this function:

◆ automaticChanged

void ComplexFactorGUI::automaticChanged ( bool  value)
signal

Referenced by on_automatic_toggled().

+ Here is the caller graph for this function:

◆ getArgument()

double ComplexFactorGUI::getArgument ( ) const

Definition at line 39 of file complexfactorgui.cpp.

References ui.

40 {
41  return ui->arg->value() * 1.0;
42 }
Ui::ComplexFactorGUI * ui

◆ getAutomatic()

bool ComplexFactorGUI::getAutomatic ( ) const

Definition at line 44 of file complexfactorgui.cpp.

References ui.

45 {
46  return ui->automatic->isChecked();
47 }
Ui::ComplexFactorGUI * ui

◆ getModule()

double ComplexFactorGUI::getModule ( ) const

Definition at line 34 of file complexfactorgui.cpp.

References ui.

35 {
36  return ui->module->value() / 100.0;
37 }
Ui::ComplexFactorGUI * ui

◆ moduleChanged

void ComplexFactorGUI::moduleChanged ( double  value)
signal

Referenced by on_module_valueChanged().

+ Here is the caller graph for this function:

◆ on_arg_valueChanged

void ComplexFactorGUI::on_arg_valueChanged ( int  value)
privateslot

Definition at line 96 of file complexfactorgui.cpp.

References arg(), argumentChanged(), and ui.

97 {
98  ui->argText->setText(tr("%1").arg(value));
99  emit argumentChanged(value);
100 }
Ui::ComplexFactorGUI * ui
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void argumentChanged(double value)
+ Here is the call graph for this function:

◆ on_automatic_toggled

void ComplexFactorGUI::on_automatic_toggled ( bool  set)
privateslot

Definition at line 83 of file complexfactorgui.cpp.

References automaticChanged(), and ui.

84 {
85  ui->module->setEnabled(!set);
86  ui->arg->setEnabled(!set);
87  emit automaticChanged(set);
88 }
Ui::ComplexFactorGUI * ui
void automaticChanged(bool value)

◆ on_module_valueChanged

void ComplexFactorGUI::on_module_valueChanged ( int  value)
privateslot

Definition at line 90 of file complexfactorgui.cpp.

References arg(), moduleChanged(), and ui.

91 {
92  ui->moduleText->setText(tr("%1").arg(value/100.0f, 0, 'f', 2));
93  emit moduleChanged(value/100.0f);
94 }
Ui::ComplexFactorGUI * ui
void moduleChanged(double value)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
+ Here is the call graph for this function:

◆ setArgument()

void ComplexFactorGUI::setArgument ( double  value)

Definition at line 56 of file complexfactorgui.cpp.

References arg(), and ui.

Referenced by SoapySDRInputGui::displayCorrectionsSettings(), and SoapySDROutputGui::displayCorrectionsSettings().

57 {
58  int argValue = (int) (value < -180.0 ? -180.0 : value > 180.0 ? 180.0 : value);
59  ui->arg->setValue(argValue);
60  ui->argText->setText(tr("%1").arg(value));
61 }
Ui::ComplexFactorGUI * ui
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAutomatic()

void ComplexFactorGUI::setAutomatic ( bool  automatic)

Definition at line 63 of file complexfactorgui.cpp.

References ui.

Referenced by SoapySDRInputGui::displayCorrectionsSettings(), and SoapySDROutputGui::displayCorrectionsSettings().

64 {
65  ui->automatic->setChecked(automatic);
66 }
Ui::ComplexFactorGUI * ui
+ Here is the caller graph for this function:

◆ setAutomaticEnable()

void ComplexFactorGUI::setAutomaticEnable ( bool  enable)

Definition at line 68 of file complexfactorgui.cpp.

References ui.

Referenced by SoapySDRInputGui::createCorrectionsControl(), and SoapySDROutputGui::createCorrectionsControl().

69 {
70  ui->automatic->setEnabled(enable);
71 }
Ui::ComplexFactorGUI * ui
+ Here is the caller graph for this function:

◆ setLabel()

void ComplexFactorGUI::setLabel ( const QString &  text)

Definition at line 73 of file complexfactorgui.cpp.

References ui.

Referenced by SoapySDRInputGui::createCorrectionsControl(), and SoapySDROutputGui::createCorrectionsControl().

74 {
75  ui->label->setText(text);
76 }
Ui::ComplexFactorGUI * ui
+ Here is the caller graph for this function:

◆ setModule()

void ComplexFactorGUI::setModule ( double  value)

Definition at line 49 of file complexfactorgui.cpp.

References arg(), and ui.

Referenced by SoapySDRInputGui::displayCorrectionsSettings(), and SoapySDROutputGui::displayCorrectionsSettings().

50 {
51  double modValue = value < -1.0 ? -1.0 : value > 1.0 ? 1.0 : value;
52  ui->module->setValue((int) modValue*100.0f);
53  ui->moduleText->setText(tr("%1").arg(modValue, 0, 'f', 2));
54 }
Ui::ComplexFactorGUI * ui
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setToolTip()

void ComplexFactorGUI::setToolTip ( const QString &  text)

Definition at line 78 of file complexfactorgui.cpp.

References ui.

Referenced by SoapySDRInputGui::createCorrectionsControl().

79 {
80  ui->label->setToolTip(text);
81 }
Ui::ComplexFactorGUI * ui
+ Here is the caller graph for this function:

Member Data Documentation

◆ ui

Ui::ComplexFactorGUI* ComplexFactorGUI::ui
private

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