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 Member Functions | Private Attributes | List of all members
TransverterButton Class Reference

#include <transverterbutton.h>

Inherits QPushButton.

Public Member Functions

 TransverterButton (QWidget *parent=0)
 
qint64 getDeltaFrequency () const
 
bool getDeltaFrequencyAcive () const
 
void setDeltaFrequency (qint64 deltaFrequency)
 
void setDeltaFrequencyActive (bool active)
 

Private Slots

void onClicked ()
 

Private Member Functions

void updateState ()
 

Private Attributes

qint64 m_deltaFrequency
 
bool m_deltaFrequencyActive
 

Detailed Description

Definition at line 29 of file transverterbutton.h.

Constructor & Destructor Documentation

◆ TransverterButton()

TransverterButton::TransverterButton ( QWidget *  parent = 0)

Definition at line 25 of file transverterbutton.cpp.

References onClicked().

25  :
26  QPushButton(parent),
29 {
30  setObjectName("TransverterButton");
31  connect(this, SIGNAL(clicked()), this, SLOT(onClicked()));
32 }
+ Here is the call graph for this function:

Member Function Documentation

◆ getDeltaFrequency()

qint64 TransverterButton::getDeltaFrequency ( ) const
inline

Definition at line 34 of file transverterbutton.h.

34 { return m_deltaFrequency; }

◆ getDeltaFrequencyAcive()

bool TransverterButton::getDeltaFrequencyAcive ( ) const
inline

Definition at line 35 of file transverterbutton.h.

35 { return m_deltaFrequencyActive; }

◆ onClicked

void TransverterButton::onClicked ( )
privateslot

Definition at line 34 of file transverterbutton.cpp.

References m_deltaFrequency, m_deltaFrequencyActive, and updateState().

Referenced by TransverterButton().

35 {
37  transverterDialog.exec();
38  updateState();
39 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDeltaFrequency()

void TransverterButton::setDeltaFrequency ( qint64  deltaFrequency)
inline

Definition at line 37 of file transverterbutton.h.

38  {
39  m_deltaFrequency = deltaFrequency;
40  updateState();
41  }

◆ setDeltaFrequencyActive()

void TransverterButton::setDeltaFrequencyActive ( bool  active)
inline

Definition at line 43 of file transverterbutton.h.

44  {
45  m_deltaFrequencyActive = active;
46  updateState();
47  }

◆ updateState()

void TransverterButton::updateState ( )
private

Definition at line 41 of file transverterbutton.cpp.

References arg(), m_deltaFrequency, and m_deltaFrequencyActive.

Referenced by onClicked().

42 {
43  setToolTip(tr("Transverter frequency translation dialog. Delta frequency %1 MHz %2")
44  .arg(m_deltaFrequency/1000000.0)
45  .arg(m_deltaFrequencyActive ? "enabled" : "disabled"));
46 
48  {
49  setStyleSheet("TransverterButton { background:rgb(128, 70, 0); }");
50  }
51  else
52  {
53  setStyleSheet("TransverterButton { background:rgb(48, 48, 48); }");
54  }
55 
56 }
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:

Member Data Documentation

◆ m_deltaFrequency

qint64 TransverterButton::m_deltaFrequency
private

Definition at line 53 of file transverterbutton.h.

Referenced by onClicked(), and updateState().

◆ m_deltaFrequencyActive

bool TransverterButton::m_deltaFrequencyActive
private

Definition at line 54 of file transverterbutton.h.

Referenced by onClicked(), and updateState().


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