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

#include <externalclockbutton.h>

Inherits QPushButton.

Public Member Functions

 ExternalClockButton (QWidget *parent=0)
 
qint64 getExternalClockFrequency () const
 
bool getExternalClockActive () const
 
void setExternalClockFrequency (qint64 deltaFrequency)
 
void setExternalClockActive (bool active)
 

Private Slots

void onClicked ()
 

Private Member Functions

void updateState ()
 

Private Attributes

qint64 m_externalClockFrequency
 
bool m_externalClockActive
 

Detailed Description

Definition at line 29 of file externalclockbutton.h.

Constructor & Destructor Documentation

◆ ExternalClockButton()

ExternalClockButton::ExternalClockButton ( QWidget *  parent = 0)

Definition at line 25 of file externalclockbutton.cpp.

References onClicked().

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

Member Function Documentation

◆ getExternalClockActive()

bool ExternalClockButton::getExternalClockActive ( ) const
inline

Definition at line 35 of file externalclockbutton.h.

◆ getExternalClockFrequency()

qint64 ExternalClockButton::getExternalClockFrequency ( ) const
inline

Definition at line 34 of file externalclockbutton.h.

◆ onClicked

void ExternalClockButton::onClicked ( )
privateslot

Definition at line 34 of file externalclockbutton.cpp.

References m_externalClockActive, m_externalClockFrequency, and updateState().

Referenced by ExternalClockButton().

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

◆ setExternalClockActive()

void ExternalClockButton::setExternalClockActive ( bool  active)
inline

Definition at line 43 of file externalclockbutton.h.

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

◆ setExternalClockFrequency()

void ExternalClockButton::setExternalClockFrequency ( qint64  deltaFrequency)
inline

Definition at line 37 of file externalclockbutton.h.

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

◆ updateState()

void ExternalClockButton::updateState ( )
private

Definition at line 41 of file externalclockbutton.cpp.

References arg(), m_externalClockActive, and m_externalClockFrequency.

Referenced by onClicked().

42 {
43  setToolTip(tr("External clock dialog. External clock frequency %1 MHz %2")
44  .arg(m_externalClockFrequency/1000000.0)
45  .arg(m_externalClockActive ? "enabled" : "disabled"));
46 
48  {
49  setStyleSheet("ExternalClockButton { background:rgb(128, 70, 0); }");
50  }
51  else
52  {
53  setStyleSheet("ExternalClockButton { 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_externalClockActive

bool ExternalClockButton::m_externalClockActive
private

Definition at line 54 of file externalclockbutton.h.

Referenced by onClicked(), and updateState().

◆ m_externalClockFrequency

qint64 ExternalClockButton::m_externalClockFrequency
private

Definition at line 53 of file externalclockbutton.h.

Referenced by onClicked(), and updateState().


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