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.
testmigui.h
Go to the documentation of this file.
1 // Copyright (C) 2019 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef _TESTMI_TESTMIGUI_H_
19 #define _TESTMI_TESTMIGUI_H_
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "testmisettings.h"
28 #include "testmi.h"
29 
30 class DeviceUISet;
31 
32 namespace Ui {
33  class TestMIGui;
34 }
35 
36 class TestMIGui : public QWidget, public PluginInstanceGUI {
37  Q_OBJECT
38 
39 public:
40  explicit TestMIGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
41  virtual ~TestMIGui();
42  virtual void destroy();
43 
44  void setName(const QString& name);
45  QString getName() const;
46 
47  void resetToDefaults();
48  virtual qint64 getCenterFrequency() const;
49  virtual void setCenterFrequency(qint64 centerFrequency);
50  QByteArray serialize() const;
51  bool deserialize(const QByteArray& data);
52  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
53  virtual bool handleMessage(const Message& message);
54 
55 private:
56  Ui::TestMIGui* ui;
57 
62  QTimer m_updateTimer;
63  QTimer m_statusTimer;
67  std::size_t m_tickCount;
68  std::vector<int> m_deviceSampleRates;
69  std::vector<quint64> m_deviceCenterFrequencies;
72 
73  void blockApplySettings(bool block) { m_doApplySettings = !block; }
74  void displaySettings();
75  void sendSettings();
76  void updateSampleRateAndFrequency();
77  void displayAmplitude();
78  void updateAmpCoarseLimit();
79  void updateAmpFineLimit();
80  void updateFrequencyShiftLimit();
81  void updateFileRecordStatus();
82 
83 private slots:
84  void handleInputMessages();
85  void on_startStop_toggled(bool checked);
86  void on_streamIndex_currentIndexChanged(int index);
87  void on_spectrumSource_currentIndexChanged(int index);
88  void on_streamLock_toggled(bool checked);
89  void on_centerFrequency_changed(quint64 value);
90  void on_autoCorr_currentIndexChanged(int index);
91  void on_frequencyShift_changed(qint64 value);
92  void on_decimation_currentIndexChanged(int index);
93  void on_fcPos_currentIndexChanged(int index);
94  void on_sampleRate_changed(quint64 value);
95  void on_sampleSize_currentIndexChanged(int index);
96  void on_amplitudeCoarse_valueChanged(int value);
97  void on_amplitudeFine_valueChanged(int value);
98  void on_modulation_currentIndexChanged(int index);
99  void on_modulationFrequency_valueChanged(int value);
100  void on_amModulation_valueChanged(int value);
101  void on_fmDeviation_valueChanged(int value);
102  void on_dcBias_valueChanged(int value);
103  void on_iBias_valueChanged(int value);
104  void on_qBias_valueChanged(int value);
105  void on_phaseImbalance_valueChanged(int value);
106  void on_record_toggled(bool checked);
107  void openDeviceSettingsDialog(const QPoint& p);
108  void updateStatus();
109  void updateHardware();
110 };
111 
112 #endif // _TESTMI_TESTMIGUI_H_
int m_spectrumStreamIndex
Index of the stream displayed on main spectrum.
Definition: testmigui.h:61
Ui::TestMIGui * ui
Definition: testmigui.h:56
int m_streamIndex
Current stream index being dealt with.
Definition: testmigui.h:60
virtual MessageQueue * getInputMessageQueue()
Definition: testmigui.h:52
bool m_forceSettings
Definition: testmigui.h:65
std::vector< int > m_deviceSampleRates
Definition: testmigui.h:68
DeviceSampleMIMO * m_sampleMIMO
Definition: testmigui.h:66
bool m_doApplySettings
Definition: testmigui.h:64
QTimer m_updateTimer
Definition: testmigui.h:62
void blockApplySettings(bool block)
Definition: testmigui.h:73
std::size_t m_tickCount
Definition: testmigui.h:67
DeviceUISet * m_deviceUISet
Definition: testmigui.h:58
int m_lastEngineState
Definition: testmigui.h:70
TestMISettings m_settings
Definition: testmigui.h:59
MessageQueue m_inputMessageQueue
Definition: testmigui.h:71
std::vector< quint64 > m_deviceCenterFrequencies
Center frequency in device.
Definition: testmigui.h:69
QTimer m_statusTimer
Definition: testmigui.h:63