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

#include <fcdprogui.h>

+ Inheritance diagram for FCDProGui:
+ Collaboration diagram for FCDProGui:

Public Member Functions

 FCDProGui (DeviceUISet *deviceUISet, QWidget *parent=0)
 
virtual ~FCDProGui ()
 
virtual void destroy ()
 
void setName (const QString &name)
 
QString getName () const
 
void resetToDefaults ()
 
virtual qint64 getCenterFrequency () const
 
virtual void setCenterFrequency (qint64 centerFrequency)
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 
virtual MessageQueuegetInputMessageQueue ()
 
virtual bool handleMessage (const Message &message)
 
- Public Member Functions inherited from PluginInstanceGUI
 PluginInstanceGUI ()
 
virtual ~PluginInstanceGUI ()
 

Private Slots

void handleInputMessages ()
 
void on_centerFrequency_changed (quint64 value)
 
void on_ppm_valueChanged (int value)
 
void on_dcOffset_toggled (bool checked)
 
void on_iqImbalance_toggled (bool checked)
 
void on_lnaGain_currentIndexChanged (int index)
 
void on_rfFilter_currentIndexChanged (int index)
 
void on_lnaEnhance_currentIndexChanged (int index)
 
void on_band_currentIndexChanged (int index)
 
void on_mixGain_currentIndexChanged (int index)
 
void on_mixFilter_currentIndexChanged (int index)
 
void on_bias_currentIndexChanged (int index)
 
void on_mode_currentIndexChanged (int index)
 
void on_gain1_currentIndexChanged (int index)
 
void on_rcFilter_currentIndexChanged (int index)
 
void on_gain2_currentIndexChanged (int index)
 
void on_gain3_currentIndexChanged (int index)
 
void on_gain4_currentIndexChanged (int index)
 
void on_ifFilter_currentIndexChanged (int index)
 
void on_gain5_currentIndexChanged (int index)
 
void on_gain6_currentIndexChanged (int index)
 
void on_decim_currentIndexChanged (int index)
 
void on_fcPos_currentIndexChanged (int index)
 
void on_setDefaults_clicked (bool checked)
 
void on_startStop_toggled (bool checked)
 
void on_record_toggled (bool checked)
 
void on_transverter_clicked ()
 
void updateHardware ()
 
void updateStatus ()
 
void openDeviceSettingsDialog (const QPoint &p)
 

Private Member Functions

void blockApplySettings (bool block)
 
void displaySettings ()
 
void sendSettings ()
 
void updateSampleRateAndFrequency ()
 
void updateFrequencyLimits ()
 

Private Attributes

Ui::FCDProGui * ui
 
DeviceUISetm_deviceUISet
 
bool m_doApplySettings
 
bool m_forceSettings
 
FCDProSettings m_settings
 
QTimer m_updateTimer
 
QTimer m_statusTimer
 
std::vector< int > m_gains
 
DeviceSampleSourcem_sampleSource
 
int m_sampleRate
 
quint64 m_deviceCenterFrequency
 Center frequency in device. More...
 
int m_lastEngineState
 
MessageQueue m_inputMessageQueue
 

Detailed Description

Definition at line 36 of file fcdprogui.h.

Constructor & Destructor Documentation

◆ FCDProGui()

FCDProGui::FCDProGui ( DeviceUISet deviceUISet,
QWidget *  parent = 0 
)
explicit

Definition at line 34 of file fcdprogui.cpp.

References FCDProConstants::bands, FCDProConstants::bias_currents, displaySettings(), FCDProConstants::fcdpro_band_nb_values(), FCDProConstants::fcdpro_bias_current_nb_values(), FCDProConstants::fcdpro_if_filter_nb_values(), FCDProConstants::fcdpro_if_gain1_nb_values(), FCDProConstants::fcdpro_if_gain2_nb_values(), FCDProConstants::fcdpro_if_gain3_nb_values(), FCDProConstants::fcdpro_if_gain4_nb_values(), FCDProConstants::fcdpro_if_gain5_nb_values(), FCDProConstants::fcdpro_if_gain6_nb_values(), FCDProConstants::fcdpro_if_gain_mode_nb_values(), FCDProConstants::fcdpro_if_rc_filter_nb_values(), FCDProConstants::fcdpro_lna_enhance_nb_values(), FCDProConstants::fcdpro_lna_gain_nb_values(), FCDProConstants::fcdpro_mixer_filter_nb_values(), FCDProConstants::fcdpro_mixer_gain_nb_values(), FCDProConstants::fcdpro_rf_filter_nb_values(), DeviceAPI::getSampleSource(), ColorMapper::GrayGold, handleInputMessages(), i, FCDProConstants::if_filters, FCDProConstants::if_gain_modes, FCDProConstants::if_gains1, FCDProConstants::if_gains2, FCDProConstants::if_gains3, FCDProConstants::if_gains4, FCDProConstants::if_gains5, FCDProConstants::if_gains6, FCDProConstants::if_rc_filters, FCDProConstants::lna_enhances, FCDProConstants::lna_gains, DeviceUISet::m_deviceAPI, m_deviceUISet, m_inputMessageQueue, m_sampleSource, m_statusTimer, m_updateTimer, FCDProConstants::mixer_filters, FCDProConstants::mixer_gains, openDeviceSettingsDialog(), FCDProConstants::rf_filters, DeviceSampleSource::setMessageQueueToGUI(), ui, updateFrequencyLimits(), updateHardware(), and updateStatus().

34  :
35  QWidget(parent),
36  ui(new Ui::FCDProGui),
37  m_deviceUISet(deviceUISet),
38  m_forceSettings(true),
39  m_settings(),
40  m_sampleSource(NULL),
42 {
44 
45  ui->setupUi(this);
46  ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
48 
49  ui->lnaGain->clear();
50  for (int i = 0; i < FCDProConstants::fcdpro_lna_gain_nb_values(); i++)
51  {
52  ui->lnaGain->addItem(QString(FCDProConstants::lna_gains[i].label.c_str()), i);
53  }
54 
55  ui->rfFilter->clear();
56  for (int i = 0; i < FCDProConstants::fcdpro_rf_filter_nb_values(); i++)
57  {
58  ui->rfFilter->addItem(QString(FCDProConstants::rf_filters[i].label.c_str()), i);
59  }
60 
61  ui->lnaEnhance->clear();
63  {
64  ui->lnaEnhance->addItem(QString(FCDProConstants::lna_enhances[i].label.c_str()), i);
65  }
66 
67  ui->band->clear();
68  for (int i = 0; i < FCDProConstants::fcdpro_band_nb_values(); i++)
69  {
70  ui->band->addItem(QString(FCDProConstants::bands[i].label.c_str()), i);
71  }
72 
73  ui->mixGain->clear();
75  {
76  ui->mixGain->addItem(QString(FCDProConstants::mixer_gains[i].label.c_str()), i);
77  }
78 
79  ui->mixFilter->clear();
81  {
82  ui->mixFilter->addItem(QString(FCDProConstants::mixer_filters[i].label.c_str()), i);
83  }
84 
85  ui->bias->clear();
87  {
88  ui->bias->addItem(QString(FCDProConstants::bias_currents[i].label.c_str()), i);
89  }
90 
91  ui->mode->clear();
93  {
94  ui->mode->addItem(QString(FCDProConstants::if_gain_modes[i].label.c_str()), i);
95  }
96 
97  ui->gain1->clear();
98  for (int i = 0; i < FCDProConstants::fcdpro_if_gain1_nb_values(); i++)
99  {
100  ui->gain1->addItem(QString(FCDProConstants::if_gains1[i].label.c_str()), i);
101  }
102 
103  ui->rcFilter->clear();
105  {
106  ui->rcFilter->addItem(QString(FCDProConstants::if_rc_filters[i].label.c_str()), i);
107  }
108 
109  ui->gain2->clear();
110  for (int i = 0; i < FCDProConstants::fcdpro_if_gain2_nb_values(); i++)
111  {
112  ui->gain2->addItem(QString(FCDProConstants::if_gains2[i].label.c_str()), i);
113  }
114 
115  ui->gain3->clear();
116  for (int i = 0; i < FCDProConstants::fcdpro_if_gain3_nb_values(); i++)
117  {
118  ui->gain3->addItem(QString(FCDProConstants::if_gains3[i].label.c_str()), i);
119  }
120 
121  ui->gain4->clear();
122  for (int i = 0; i < FCDProConstants::fcdpro_if_gain4_nb_values(); i++)
123  {
124  ui->gain4->addItem(QString(FCDProConstants::if_gains4[i].label.c_str()), i);
125  }
126 
127  ui->ifFilter->clear();
128  for (int i = 0; i < FCDProConstants::fcdpro_if_filter_nb_values(); i++)
129  {
130  ui->ifFilter->addItem(QString(FCDProConstants::if_filters[i].label.c_str()), i);
131  }
132 
133  ui->gain5->clear();
134  for (int i = 0; i < FCDProConstants::fcdpro_if_gain5_nb_values(); i++)
135  {
136  ui->gain5->addItem(QString(FCDProConstants::if_gains5[i].label.c_str()), i);
137  }
138 
139  ui->gain6->clear();
140  for (int i = 0; i < FCDProConstants::fcdpro_if_gain6_nb_values(); i++)
141  {
142  ui->gain6->addItem(QString(FCDProConstants::if_gains6[i].label.c_str()), i);
143  }
144 
145  connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
146  connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
147  m_statusTimer.start(500);
148 
149  CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);
150  connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
151 
152  displaySettings();
153 
154  connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
156 }
QTimer m_statusTimer
Definition: fcdprogui.h:63
static int fcdpro_if_filter_nb_values()
static int fcdpro_rf_filter_nb_values()
Definition: fcdproconst.cpp:99
static const fcdpro_if_gain3 if_gains3[]
Definition: fcdproconst.h:338
static const fcdpro_bias_current bias_currents[]
Definition: fcdproconst.h:331
MessageQueue m_inputMessageQueue
Definition: fcdprogui.h:69
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
Definition: deviceapi.cpp:213
static const fcdpro_if_gain1 if_gains1[]
Definition: fcdproconst.h:336
DeviceUISet * m_deviceUISet
Definition: fcdprogui.h:58
static int fcdpro_mixer_gain_nb_values()
static const fcdpro_if_gain_mode if_gain_modes[]
Definition: fcdproconst.h:333
QTimer m_updateTimer
Definition: fcdprogui.h:62
bool m_forceSettings
Definition: fcdprogui.h:60
static int fcdpro_if_gain3_nb_values()
FCDProSettings m_settings
Definition: fcdprogui.h:61
static int fcdpro_bias_current_nb_values()
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
static const fcdpro_if_gain6 if_gains6[]
Definition: fcdproconst.h:341
static const fcdpro_lna_gain lna_gains[]
Definition: fcdproconst.h:326
static const fcdpro_if_gain2 if_gains2[]
Definition: fcdproconst.h:337
engine is before initialization
Definition: deviceapi.h:53
static int fcdpro_if_gain2_nb_values()
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
static int fcdpro_lna_enhance_nb_values()
Definition: fcdproconst.cpp:39
static int fcdpro_lna_gain_nb_values()
Definition: fcdproconst.cpp:26
int32_t i
Definition: decimators.h:244
static int fcdpro_band_nb_values()
Definition: fcdproconst.cpp:51
static int fcdpro_if_rc_filter_nb_values()
static int fcdpro_if_gain1_nb_values()
static const fcdpro_rf_filter rf_filters[]
Definition: fcdproconst.h:329
static int fcdpro_if_gain6_nb_values()
void updateFrequencyLimits()
Definition: fcdprogui.cpp:279
static const fcdpro_if_filter if_filters[]
Definition: fcdproconst.h:335
DeviceSampleSource * m_sampleSource
Definition: fcdprogui.h:65
void updateHardware()
Definition: fcdprogui.cpp:558
void displaySettings()
Definition: fcdprogui.cpp:294
static int fcdpro_if_gain_mode_nb_values()
static const fcdpro_if_gain4 if_gains4[]
Definition: fcdproconst.h:339
void openDeviceSettingsDialog(const QPoint &p)
Definition: fcdprogui.cpp:566
void updateStatus()
Definition: fcdprogui.cpp:529
static const fcdpro_mixer_filter mixer_filters[]
Definition: fcdproconst.h:332
virtual void setMessageQueueToGUI(MessageQueue *queue)=0
void handleInputMessages()
Definition: fcdprogui.cpp:244
int m_lastEngineState
Definition: fcdprogui.h:68
static const fcdpro_band bands[]
Definition: fcdproconst.h:328
static int fcdpro_if_gain4_nb_values()
static const fcdpro_if_gain5 if_gains5[]
Definition: fcdproconst.h:340
static const fcdpro_lna_enhance lna_enhances[]
Definition: fcdproconst.h:327
static int fcdpro_if_gain5_nb_values()
static const fcdpro_mixer_gain mixer_gains[]
Definition: fcdproconst.h:330
static const fcdpro_if_rc_filter if_rc_filters[]
Definition: fcdproconst.h:334
static int fcdpro_mixer_filter_nb_values()
+ Here is the call graph for this function:

◆ ~FCDProGui()

FCDProGui::~FCDProGui ( )
virtual

Definition at line 158 of file fcdprogui.cpp.

References ui.

159 {
160  delete ui;
161 }
Ui::FCDProGui * ui
Definition: fcdprogui.h:56

Member Function Documentation

◆ blockApplySettings()

void FCDProGui::blockApplySettings ( bool  block)
inlineprivate

Definition at line 71 of file fcdprogui.h.

Referenced by handleMessage().

71 { m_doApplySettings = !block; }
bool m_doApplySettings
Definition: fcdprogui.h:59
+ Here is the caller graph for this function:

◆ deserialize()

bool FCDProGui::deserialize ( const QByteArray &  data)
virtual

Implements PluginInstanceGUI.

Definition at line 202 of file fcdprogui.cpp.

References FCDProSettings::deserialize(), displaySettings(), m_forceSettings, m_settings, resetToDefaults(), and sendSettings().

203 {
204  if(m_settings.deserialize(data))
205  {
206  displaySettings();
207  m_forceSettings = true;
208  sendSettings();
209  return true;
210  }
211  else
212  {
213  resetToDefaults();
214  return false;
215  }
216 }
bool m_forceSettings
Definition: fcdprogui.h:60
FCDProSettings m_settings
Definition: fcdprogui.h:61
void resetToDefaults()
Definition: fcdprogui.cpp:178
void displaySettings()
Definition: fcdprogui.cpp:294
bool deserialize(const QByteArray &data)
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ destroy()

void FCDProGui::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 163 of file fcdprogui.cpp.

164 {
165  delete this;
166 }

◆ displaySettings()

void FCDProGui::displaySettings ( )
private

Definition at line 294 of file fcdprogui.cpp.

References arg(), FCDProSettings::m_bandIndex, FCDProSettings::m_biasCurrentIndex, FCDProSettings::m_centerFrequency, FCDProSettings::m_dcBlock, FCDProSettings::m_fcPos, FCDProSettings::m_gain1Index, FCDProSettings::m_gain2Index, FCDProSettings::m_gain3Index, FCDProSettings::m_gain4Index, FCDProSettings::m_gain5Index, FCDProSettings::m_gain6Index, FCDProSettings::m_ifFilterIndex, FCDProSettings::m_iqCorrection, FCDProSettings::m_lnaEnhanceIndex, FCDProSettings::m_lnaGainIndex, FCDProSettings::m_log2Decim, FCDProSettings::m_LOppmTenths, FCDProSettings::m_mixerFilterIndex, FCDProSettings::m_mixerGainIndex, FCDProSettings::m_modeIndex, FCDProSettings::m_rcFilterIndex, FCDProSettings::m_rfFilterIndex, m_settings, FCDProSettings::m_transverterDeltaFrequency, FCDProSettings::m_transverterMode, ui, and updateFrequencyLimits().

Referenced by deserialize(), FCDProGui(), handleMessage(), on_ppm_valueChanged(), on_setDefaults_clicked(), resetToDefaults(), and setCenterFrequency().

295 {
296  ui->transverter->setDeltaFrequency(m_settings.m_transverterDeltaFrequency);
297  ui->transverter->setDeltaFrequencyActive(m_settings.m_transverterMode);
299  ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
300  ui->ppm->setValue(m_settings.m_LOppmTenths);
301  ui->ppmText->setText(QString("%1").arg(QString::number(m_settings.m_LOppmTenths/10.0, 'f', 1)));
302  ui->dcOffset->setChecked(m_settings.m_dcBlock);
303  ui->iqImbalance->setChecked(m_settings.m_iqCorrection);
304 
305  ui->lnaGain->setCurrentIndex(m_settings.m_lnaGainIndex);
306  ui->rfFilter->setCurrentIndex(m_settings.m_rfFilterIndex);
307  ui->lnaEnhance->setCurrentIndex(m_settings.m_lnaEnhanceIndex);
308  ui->band->setCurrentIndex(m_settings.m_bandIndex);
309  ui->mixGain->setCurrentIndex(m_settings.m_mixerGainIndex);
310  ui->mixFilter->setCurrentIndex(m_settings.m_mixerFilterIndex);
311  ui->bias->setCurrentIndex(m_settings.m_biasCurrentIndex);
312  ui->mode->setCurrentIndex(m_settings.m_modeIndex);
313  ui->gain1->setCurrentIndex(m_settings.m_gain1Index);
314  ui->gain2->setCurrentIndex(m_settings.m_gain2Index);
315  ui->gain3->setCurrentIndex(m_settings.m_gain3Index);
316  ui->gain4->setCurrentIndex(m_settings.m_gain4Index);
317  ui->gain5->setCurrentIndex(m_settings.m_gain5Index);
318  ui->gain6->setCurrentIndex(m_settings.m_gain6Index);
319  ui->decim->setCurrentIndex(m_settings.m_log2Decim);
320  ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos);
321  ui->rcFilter->setCurrentIndex(m_settings.m_rcFilterIndex);
322  ui->ifFilter->setCurrentIndex(m_settings.m_ifFilterIndex);
323 }
qint32 m_lnaEnhanceIndex
qint32 m_mixerGainIndex
quint32 m_log2Decim
FCDProSettings m_settings
Definition: fcdprogui.h:61
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
qint32 m_lnaGainIndex
qint32 m_ifFilterIndex
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
qint64 m_transverterDeltaFrequency
qint32 m_LOppmTenths
qint32 m_rfFilterIndex
qint32 m_mixerFilterIndex
void updateFrequencyLimits()
Definition: fcdprogui.cpp:279
qint32 m_rcFilterIndex
quint64 m_centerFrequency
qint32 m_biasCurrentIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCenterFrequency()

qint64 FCDProGui::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 185 of file fcdprogui.cpp.

References FCDProSettings::m_centerFrequency, and m_settings.

186 {
188 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
quint64 m_centerFrequency

◆ getInputMessageQueue()

virtual MessageQueue* FCDProGui::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 52 of file fcdprogui.h.

52 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Definition: fcdprogui.h:69

◆ getName()

QString FCDProGui::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 173 of file fcdprogui.cpp.

174 {
175  return objectName();
176 }

◆ handleInputMessages

void FCDProGui::handleInputMessages ( )
privateslot

Definition at line 244 of file fcdprogui.cpp.

References DSPSignalNotification::getCenterFrequency(), Message::getIdentifier(), DSPSignalNotification::getSampleRate(), handleMessage(), m_deviceCenterFrequency, m_inputMessageQueue, m_sampleRate, Message::match(), MessageQueue::pop(), and updateSampleRateAndFrequency().

Referenced by FCDProGui().

245 {
246  Message* message;
247 
248  while ((message = m_inputMessageQueue.pop()) != 0)
249  {
250  qDebug("FCDProGui::handleInputMessages: message: %s", message->getIdentifier());
251 
252  if (DSPSignalNotification::match(*message))
253  {
254  DSPSignalNotification* notif = (DSPSignalNotification*) message;
255  m_sampleRate = notif->getSampleRate();
257  qDebug("FCDProGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
259 
260  delete message;
261  }
262  else
263  {
264  if (handleMessage(*message))
265  {
266  delete message;
267  }
268  }
269  }
270 }
Message * pop()
Pop message from queue.
MessageQueue m_inputMessageQueue
Definition: fcdprogui.h:69
void updateSampleRateAndFrequency()
Definition: fcdprogui.cpp:272
qint64 getCenterFrequency() const
Definition: dspcommands.h:329
static bool match(const Message *message)
Definition: message.cpp:45
int getSampleRate() const
Definition: dspcommands.h:328
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: fcdprogui.h:67
virtual const char * getIdentifier() const
Definition: message.cpp:35
int m_sampleRate
Definition: fcdprogui.h:66
virtual bool handleMessage(const Message &message)
Definition: fcdprogui.cpp:218
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

bool FCDProGui::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 218 of file fcdprogui.cpp.

References blockApplySettings(), displaySettings(), FCDProInput::MsgConfigureFCDPro::getSettings(), FCDProInput::MsgStartStop::getStartStop(), m_settings, Message::match(), and ui.

Referenced by handleInputMessages().

219 {
221  {
223  m_settings = cfg.getSettings();
224  blockApplySettings(true);
225  displaySettings();
226  blockApplySettings(false);
227  return true;
228  }
229  else if (FCDProInput::MsgStartStop::match(message))
230  {
232  blockApplySettings(true);
233  ui->startStop->setChecked(notif.getStartStop());
234  blockApplySettings(false);
235 
236  return true;
237  }
238  else
239  {
240  return false;
241  }
242 }
void blockApplySettings(bool block)
Definition: fcdprogui.h:71
FCDProSettings m_settings
Definition: fcdprogui.h:61
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
const FCDProSettings & getSettings() const
Definition: fcdproinput.h:52
bool getStartStop() const
Definition: fcdproinput.h:94
static bool match(const Message *message)
Definition: message.cpp:45
void displaySettings()
Definition: fcdprogui.cpp:294
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_band_currentIndexChanged

void FCDProGui::on_band_currentIndexChanged ( int  index)
privateslot

Definition at line 374 of file fcdprogui.cpp.

References FCDProSettings::m_bandIndex, m_settings, and sendSettings().

375 {
376  m_settings.m_bandIndex = index;
377  sendSettings();
378 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_bias_currentIndexChanged

void FCDProGui::on_bias_currentIndexChanged ( int  index)
privateslot

Definition at line 392 of file fcdprogui.cpp.

References FCDProSettings::m_biasCurrentIndex, m_settings, and sendSettings().

393 {
395  sendSettings();
396 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
qint32 m_biasCurrentIndex
+ Here is the call graph for this function:

◆ on_centerFrequency_changed

void FCDProGui::on_centerFrequency_changed ( quint64  value)
privateslot

Definition at line 331 of file fcdprogui.cpp.

References FCDProSettings::m_centerFrequency, m_settings, and sendSettings().

332 {
333  m_settings.m_centerFrequency = value * 1000;
334  sendSettings();
335 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
quint64 m_centerFrequency
+ Here is the call graph for this function:

◆ on_dcOffset_toggled

void FCDProGui::on_dcOffset_toggled ( bool  checked)
privateslot

Definition at line 344 of file fcdprogui.cpp.

References FCDProSettings::m_dcBlock, m_settings, and sendSettings().

345 {
346  m_settings.m_dcBlock = checked;
347  sendSettings();
348 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_decim_currentIndexChanged

void FCDProGui::on_decim_currentIndexChanged ( int  index)
privateslot

Definition at line 452 of file fcdprogui.cpp.

References FCDProSettings::m_log2Decim, m_settings, and sendSettings().

453 {
454  if ((index < 0) || (index > 6)) {
455  return;
456  }
457 
458  m_settings.m_log2Decim = index;
459  sendSettings();
460 }
quint32 m_log2Decim
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_fcPos_currentIndexChanged

void FCDProGui::on_fcPos_currentIndexChanged ( int  index)
privateslot

Definition at line 462 of file fcdprogui.cpp.

References FCDProSettings::FC_POS_CENTER, FCDProSettings::FC_POS_INFRA, FCDProSettings::FC_POS_SUPRA, FCDProSettings::m_fcPos, m_settings, and sendSettings().

463 {
464  if (index == 0) {
466  sendSettings();
467  } else if (index == 1) {
469  sendSettings();
470  } else if (index == 2) {
472  sendSettings();
473  }
474 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_gain1_currentIndexChanged

void FCDProGui::on_gain1_currentIndexChanged ( int  index)
privateslot

Definition at line 404 of file fcdprogui.cpp.

References FCDProSettings::m_gain1Index, m_settings, and sendSettings().

405 {
406  m_settings.m_gain1Index = index;
407  sendSettings();
408 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_gain2_currentIndexChanged

void FCDProGui::on_gain2_currentIndexChanged ( int  index)
privateslot

Definition at line 416 of file fcdprogui.cpp.

References FCDProSettings::m_gain2Index, m_settings, and sendSettings().

417 {
418  m_settings.m_gain2Index = index;
419  sendSettings();
420 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_gain3_currentIndexChanged

void FCDProGui::on_gain3_currentIndexChanged ( int  index)
privateslot

Definition at line 422 of file fcdprogui.cpp.

References FCDProSettings::m_gain3Index, m_settings, and sendSettings().

423 {
424  m_settings.m_gain3Index = index;
425  sendSettings();
426 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_gain4_currentIndexChanged

void FCDProGui::on_gain4_currentIndexChanged ( int  index)
privateslot

Definition at line 428 of file fcdprogui.cpp.

References FCDProSettings::m_gain4Index, m_settings, and sendSettings().

429 {
430  m_settings.m_gain4Index = index;
431  sendSettings();
432 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_gain5_currentIndexChanged

void FCDProGui::on_gain5_currentIndexChanged ( int  index)
privateslot

Definition at line 440 of file fcdprogui.cpp.

References FCDProSettings::m_gain5Index, m_settings, and sendSettings().

441 {
442  m_settings.m_gain5Index = index;
443  sendSettings();
444 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_gain6_currentIndexChanged

void FCDProGui::on_gain6_currentIndexChanged ( int  index)
privateslot

Definition at line 446 of file fcdprogui.cpp.

References FCDProSettings::m_gain6Index, m_settings, and sendSettings().

447 {
448  m_settings.m_gain6Index = index;
449  sendSettings();
450 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_ifFilter_currentIndexChanged

void FCDProGui::on_ifFilter_currentIndexChanged ( int  index)
privateslot

Definition at line 434 of file fcdprogui.cpp.

References FCDProSettings::m_ifFilterIndex, m_settings, and sendSettings().

435 {
436  m_settings.m_ifFilterIndex = index;
437  sendSettings();
438 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_ifFilterIndex
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_iqImbalance_toggled

void FCDProGui::on_iqImbalance_toggled ( bool  checked)
privateslot

Definition at line 350 of file fcdprogui.cpp.

References FCDProSettings::m_iqCorrection, m_settings, and sendSettings().

351 {
352  m_settings.m_iqCorrection = checked;
353  sendSettings();
354 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_lnaEnhance_currentIndexChanged

void FCDProGui::on_lnaEnhance_currentIndexChanged ( int  index)
privateslot

Definition at line 368 of file fcdprogui.cpp.

References FCDProSettings::m_lnaEnhanceIndex, m_settings, and sendSettings().

369 {
371  sendSettings();
372 }
qint32 m_lnaEnhanceIndex
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_lnaGain_currentIndexChanged

void FCDProGui::on_lnaGain_currentIndexChanged ( int  index)
privateslot

Definition at line 356 of file fcdprogui.cpp.

References FCDProSettings::m_lnaGainIndex, m_settings, and sendSettings().

357 {
358  m_settings.m_lnaGainIndex = index;
359  sendSettings();
360 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_lnaGainIndex
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_mixFilter_currentIndexChanged

void FCDProGui::on_mixFilter_currentIndexChanged ( int  index)
privateslot

Definition at line 386 of file fcdprogui.cpp.

References FCDProSettings::m_mixerFilterIndex, m_settings, and sendSettings().

387 {
389  sendSettings();
390 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_mixerFilterIndex
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_mixGain_currentIndexChanged

void FCDProGui::on_mixGain_currentIndexChanged ( int  index)
privateslot

Definition at line 380 of file fcdprogui.cpp.

References FCDProSettings::m_mixerGainIndex, m_settings, and sendSettings().

381 {
383  sendSettings();
384 }
qint32 m_mixerGainIndex
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_mode_currentIndexChanged

void FCDProGui::on_mode_currentIndexChanged ( int  index)
privateslot

Definition at line 398 of file fcdprogui.cpp.

References FCDProSettings::m_modeIndex, m_settings, and sendSettings().

399 {
400  m_settings.m_modeIndex = index;
401  sendSettings();
402 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_ppm_valueChanged

void FCDProGui::on_ppm_valueChanged ( int  value)
privateslot

Definition at line 337 of file fcdprogui.cpp.

References displaySettings(), FCDProSettings::m_LOppmTenths, m_settings, and sendSettings().

338 {
339  m_settings.m_LOppmTenths = value;
340  displaySettings();
341  sendSettings();
342 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_LOppmTenths
void displaySettings()
Definition: fcdprogui.cpp:294
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_rcFilter_currentIndexChanged

void FCDProGui::on_rcFilter_currentIndexChanged ( int  index)
privateslot

Definition at line 410 of file fcdprogui.cpp.

References FCDProSettings::m_rcFilterIndex, m_settings, and sendSettings().

411 {
412  m_settings.m_rcFilterIndex = index;
413  sendSettings();
414 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_rcFilterIndex
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_record_toggled

void FCDProGui::on_record_toggled ( bool  checked)
privateslot

Definition at line 507 of file fcdprogui.cpp.

References FCDProInput::MsgFileRecord::create(), DeviceSampleSource::getInputMessageQueue(), m_sampleSource, MessageQueue::push(), and ui.

508 {
509  if (checked) {
510  ui->record->setStyleSheet("QToolButton { background-color : red; }");
511  } else {
512  ui->record->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
513  }
514 
517 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
static MsgFileRecord * create(bool startStop)
Definition: fcdproinput.h:77
DeviceSampleSource * m_sampleSource
Definition: fcdprogui.h:65
+ Here is the call graph for this function:

◆ on_rfFilter_currentIndexChanged

void FCDProGui::on_rfFilter_currentIndexChanged ( int  index)
privateslot

Definition at line 362 of file fcdprogui.cpp.

References FCDProSettings::m_rfFilterIndex, m_settings, and sendSettings().

363 {
364  m_settings.m_rfFilterIndex = index;
365  sendSettings();
366 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_rfFilterIndex
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:

◆ on_setDefaults_clicked

void FCDProGui::on_setDefaults_clicked ( bool  checked)
privateslot

Definition at line 476 of file fcdprogui.cpp.

References displaySettings(), FCDProSettings::m_biasCurrentIndex, FCDProSettings::m_gain1Index, FCDProSettings::m_gain2Index, FCDProSettings::m_gain3Index, FCDProSettings::m_gain4Index, FCDProSettings::m_gain5Index, FCDProSettings::m_gain6Index, FCDProSettings::m_ifFilterIndex, FCDProSettings::m_lnaEnhanceIndex, FCDProSettings::m_lnaGainIndex, FCDProSettings::m_mixerFilterIndex, FCDProSettings::m_mixerGainIndex, FCDProSettings::m_modeIndex, FCDProSettings::m_rcFilterIndex, m_settings, and sendSettings().

477 {
478  (void) checked;
479  m_settings.m_lnaGainIndex = 8; // +15 dB
480  //m_settings.rfFilterIndex = 0;
481  m_settings.m_mixerGainIndex = 1; // +12 dB
482  m_settings.m_mixerFilterIndex = 8; // 1.9 MHz
483  m_settings.m_gain1Index = 1; // +6 dB
484  m_settings.m_rcFilterIndex = 15; // 1.0 MHz
485  m_settings.m_gain2Index = 1; // +3 dB
486  m_settings.m_gain3Index = 1; // +3 dB
487  m_settings.m_gain4Index = 0; // 0 dB
488  m_settings.m_ifFilterIndex = 31; // 2.15 MHz
489  m_settings.m_gain5Index = 0; // +3 dB
490  m_settings.m_gain6Index = 0; // +3 dB
491  m_settings.m_lnaEnhanceIndex = 0; // Off
492  m_settings.m_biasCurrentIndex = 3; // V/U band
493  m_settings.m_modeIndex = 0; // Linearity
494  displaySettings();
495  sendSettings();
496 }
qint32 m_lnaEnhanceIndex
qint32 m_mixerGainIndex
FCDProSettings m_settings
Definition: fcdprogui.h:61
qint32 m_lnaGainIndex
qint32 m_ifFilterIndex
qint32 m_mixerFilterIndex
void displaySettings()
Definition: fcdprogui.cpp:294
qint32 m_rcFilterIndex
void sendSettings()
Definition: fcdprogui.cpp:325
qint32 m_biasCurrentIndex
+ Here is the call graph for this function:

◆ on_startStop_toggled

void FCDProGui::on_startStop_toggled ( bool  checked)
privateslot

Definition at line 498 of file fcdprogui.cpp.

References FCDProInput::MsgStartStop::create(), DeviceSampleSource::getInputMessageQueue(), m_doApplySettings, m_sampleSource, and MessageQueue::push().

499 {
500  if (m_doApplySettings)
501  {
504  }
505 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
bool m_doApplySettings
Definition: fcdprogui.h:59
DeviceSampleSource * m_sampleSource
Definition: fcdprogui.h:65
static MsgStartStop * create(bool startStop)
Definition: fcdproinput.h:96
+ Here is the call graph for this function:

◆ on_transverter_clicked

void FCDProGui::on_transverter_clicked ( )
privateslot

Definition at line 519 of file fcdprogui.cpp.

References FCDProSettings::m_centerFrequency, m_settings, FCDProSettings::m_transverterDeltaFrequency, FCDProSettings::m_transverterMode, sendSettings(), ui, and updateFrequencyLimits().

520 {
521  m_settings.m_transverterMode = ui->transverter->getDeltaFrequencyAcive();
522  m_settings.m_transverterDeltaFrequency = ui->transverter->getDeltaFrequency();
523  qDebug("FCDProGui::on_transverter_clicked: %lld Hz %s", m_settings.m_transverterDeltaFrequency, m_settings.m_transverterMode ? "on" : "off");
525  m_settings.m_centerFrequency = ui->centerFrequency->getValueNew()*1000;
526  sendSettings();
527 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
qint64 m_transverterDeltaFrequency
void updateFrequencyLimits()
Definition: fcdprogui.cpp:279
void sendSettings()
Definition: fcdprogui.cpp:325
quint64 m_centerFrequency
+ Here is the call graph for this function:

◆ openDeviceSettingsDialog

void FCDProGui::openDeviceSettingsDialog ( const QPoint &  p)
privateslot

Definition at line 566 of file fcdprogui.cpp.

References BasicDeviceSettingsDialog::getReverseAPIAddress(), BasicDeviceSettingsDialog::getReverseAPIDeviceIndex(), BasicDeviceSettingsDialog::getReverseAPIPort(), FCDProSettings::m_reverseAPIAddress, FCDProSettings::m_reverseAPIDeviceIndex, FCDProSettings::m_reverseAPIPort, m_settings, FCDProSettings::m_useReverseAPI, sendSettings(), BasicDeviceSettingsDialog::setReverseAPIAddress(), BasicDeviceSettingsDialog::setReverseAPIDeviceIndex(), BasicDeviceSettingsDialog::setReverseAPIPort(), BasicDeviceSettingsDialog::setUseReverseAPI(), and BasicDeviceSettingsDialog::useReverseAPI().

Referenced by FCDProGui().

567 {
568  BasicDeviceSettingsDialog dialog(this);
569  dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
570  dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
571  dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
572  dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
573 
574  dialog.move(p);
575  dialog.exec();
576 
577  m_settings.m_useReverseAPI = dialog.useReverseAPI();
578  m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
579  m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
580  m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
581 
582  sendSettings();
583 }
uint16_t m_reverseAPIPort
FCDProSettings m_settings
Definition: fcdprogui.h:61
uint16_t m_reverseAPIDeviceIndex
QString m_reverseAPIAddress
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void FCDProGui::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 178 of file fcdprogui.cpp.

References displaySettings(), m_settings, FCDProSettings::resetToDefaults(), and sendSettings().

Referenced by deserialize().

179 {
181  displaySettings();
182  sendSettings();
183 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void displaySettings()
Definition: fcdprogui.cpp:294
void sendSettings()
Definition: fcdprogui.cpp:325
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendSettings()

void FCDProGui::sendSettings ( )
private

◆ serialize()

QByteArray FCDProGui::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 197 of file fcdprogui.cpp.

References m_settings, and FCDProSettings::serialize().

198 {
199  return m_settings.serialize();
200 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
QByteArray serialize() const
+ Here is the call graph for this function:

◆ setCenterFrequency()

void FCDProGui::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 190 of file fcdprogui.cpp.

References displaySettings(), FCDProSettings::m_centerFrequency, m_settings, and sendSettings().

191 {
192  m_settings.m_centerFrequency = centerFrequency;
193  displaySettings();
194  sendSettings();
195 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
void displaySettings()
Definition: fcdprogui.cpp:294
void sendSettings()
Definition: fcdprogui.cpp:325
quint64 m_centerFrequency
+ Here is the call graph for this function:

◆ setName()

void FCDProGui::setName ( const QString &  name)
virtual

Implements PluginInstanceGUI.

Definition at line 168 of file fcdprogui.cpp.

169 {
170  setObjectName(name);
171 }

◆ updateFrequencyLimits()

void FCDProGui::updateFrequencyLimits ( )
private

Definition at line 279 of file fcdprogui.cpp.

References m_settings, FCDProSettings::m_transverterDeltaFrequency, FCDProSettings::m_transverterMode, and ui.

Referenced by displaySettings(), FCDProGui(), and on_transverter_clicked().

280 {
281  // values in kHz
282  qint64 deltaFrequency = m_settings.m_transverterMode ? m_settings.m_transverterDeltaFrequency/1000 : 0;
283  qint64 minLimit = fcd_traits<Pro>::loLowLimitFreq/1000 + deltaFrequency;
284  qint64 maxLimit = fcd_traits<Pro>::loHighLimitFreq/1000 + deltaFrequency;
285 
286  minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
287  maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
288 
289  qDebug("FCDProGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
290 
291  ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
292 }
FCDProSettings m_settings
Definition: fcdprogui.h:61
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
qint64 m_transverterDeltaFrequency
+ Here is the caller graph for this function:

◆ updateHardware

void FCDProGui::updateHardware ( )
privateslot

Definition at line 558 of file fcdprogui.cpp.

References FCDProInput::MsgConfigureFCDPro::create(), DeviceSampleSource::getInputMessageQueue(), m_forceSettings, m_sampleSource, m_settings, m_updateTimer, and MessageQueue::push().

Referenced by FCDProGui().

559 {
562  m_forceSettings = false;
563  m_updateTimer.stop();
564 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
QTimer m_updateTimer
Definition: fcdprogui.h:62
bool m_forceSettings
Definition: fcdprogui.h:60
FCDProSettings m_settings
Definition: fcdprogui.h:61
static MsgConfigureFCDPro * create(const FCDProSettings &settings, bool force)
Definition: fcdproinput.h:55
DeviceSampleSource * m_sampleSource
Definition: fcdprogui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSampleRateAndFrequency()

void FCDProGui::updateSampleRateAndFrequency ( )
private

Definition at line 272 of file fcdprogui.cpp.

References arg(), DeviceUISet::getSpectrum(), m_deviceCenterFrequency, m_deviceUISet, m_sampleRate, GLSpectrum::setCenterFrequency(), GLSpectrum::setSampleRate(), and ui.

Referenced by handleInputMessages().

273 {
276  ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
277 }
void setSampleRate(qint32 sampleRate)
Definition: glspectrum.cpp:211
DeviceUISet * m_deviceUISet
Definition: fcdprogui.h:58
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
GLSpectrum * getSpectrum()
Direct spectrum getter.
Definition: deviceuiset.h:57
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: fcdprogui.h:67
void setCenterFrequency(qint64 frequency)
Definition: glspectrum.cpp:175
int m_sampleRate
Definition: fcdprogui.h:66
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateStatus

void FCDProGui::updateStatus ( )
privateslot

Definition at line 529 of file fcdprogui.cpp.

References DeviceAPI::errorMessage(), DeviceUISet::m_deviceAPI, m_deviceUISet, m_lastEngineState, DeviceAPI::state(), DeviceAPI::StError, DeviceAPI::StIdle, DeviceAPI::StNotStarted, DeviceAPI::StRunning, and ui.

Referenced by FCDProGui().

530 {
531  int state = m_deviceUISet->m_deviceAPI->state();
532 
533  if(m_lastEngineState != state)
534  {
535  switch(state)
536  {
538  ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
539  break;
540  case DeviceAPI::StIdle:
541  ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
542  break;
544  ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
545  break;
546  case DeviceAPI::StError:
547  ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
548  QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceAPI->errorMessage());
549  break;
550  default:
551  break;
552  }
553 
554  m_lastEngineState = state;
555  }
556 }
DeviceUISet * m_deviceUISet
Definition: fcdprogui.h:58
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
QString errorMessage()
Last error message from the device engine.
Definition: deviceapi.cpp:290
engine is before initialization
Definition: deviceapi.h:53
EngineState state() const
Return the state of the device engine corresponding to the stream type.
Definition: deviceapi.cpp:277
DeviceAPI * m_deviceAPI
Definition: deviceuiset.h:48
engine is idle
Definition: deviceapi.h:54
engine is running
Definition: deviceapi.h:56
int m_lastEngineState
Definition: fcdprogui.h:68
engine is in error
Definition: deviceapi.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceCenterFrequency

quint64 FCDProGui::m_deviceCenterFrequency
private

Center frequency in device.

Definition at line 67 of file fcdprogui.h.

Referenced by handleInputMessages(), and updateSampleRateAndFrequency().

◆ m_deviceUISet

DeviceUISet* FCDProGui::m_deviceUISet
private

Definition at line 58 of file fcdprogui.h.

Referenced by FCDProGui(), updateSampleRateAndFrequency(), and updateStatus().

◆ m_doApplySettings

bool FCDProGui::m_doApplySettings
private

Definition at line 59 of file fcdprogui.h.

Referenced by on_startStop_toggled().

◆ m_forceSettings

bool FCDProGui::m_forceSettings
private

Definition at line 60 of file fcdprogui.h.

Referenced by deserialize(), and updateHardware().

◆ m_gains

std::vector<int> FCDProGui::m_gains
private

Definition at line 64 of file fcdprogui.h.

◆ m_inputMessageQueue

MessageQueue FCDProGui::m_inputMessageQueue
private

Definition at line 69 of file fcdprogui.h.

Referenced by FCDProGui(), and handleInputMessages().

◆ m_lastEngineState

int FCDProGui::m_lastEngineState
private

Definition at line 68 of file fcdprogui.h.

Referenced by updateStatus().

◆ m_sampleRate

int FCDProGui::m_sampleRate
private

Definition at line 66 of file fcdprogui.h.

Referenced by handleInputMessages(), and updateSampleRateAndFrequency().

◆ m_sampleSource

DeviceSampleSource* FCDProGui::m_sampleSource
private

Definition at line 65 of file fcdprogui.h.

Referenced by FCDProGui(), on_record_toggled(), on_startStop_toggled(), and updateHardware().

◆ m_settings

FCDProSettings FCDProGui::m_settings
private

◆ m_statusTimer

QTimer FCDProGui::m_statusTimer
private

Definition at line 63 of file fcdprogui.h.

Referenced by FCDProGui().

◆ m_updateTimer

QTimer FCDProGui::m_updateTimer
private

Definition at line 62 of file fcdprogui.h.

Referenced by FCDProGui(), sendSettings(), and updateHardware().

◆ ui

Ui::FCDProGui* FCDProGui::ui
private

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