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.
chanalyzergui.h
Go to the documentation of this file.
1 // Copyright (C) 2017 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 INCLUDE_CHANNELANALYZERNGGUI_H
19 #define INCLUDE_CHANNELANALYZERNGGUI_H
20 
22 #include "gui/rollupwidget.h"
23 #include "dsp/channelmarker.h"
24 #include "dsp/dsptypes.h"
25 #include "util/movingaverage.h"
26 #include "util/messagequeue.h"
27 
28 #include "chanalyzersettings.h"
29 
30 class PluginAPI;
31 class DeviceUISet;
32 class BasebandSampleSink;
33 class ChannelAnalyzer;
35 class SpectrumVis;
36 class ScopeVis;
37 
38 namespace Ui {
39  class ChannelAnalyzerGUI;
40 }
41 
43  Q_OBJECT
44 
45 public:
46  static ChannelAnalyzerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
47  virtual void destroy();
48 
49  void setName(const QString& name);
50  QString getName() const;
51  virtual qint64 getCenterFrequency() const;
52  virtual void setCenterFrequency(qint64 centerFrequency);
53 
54  void resetToDefaults();
55  QByteArray serialize() const;
56  bool deserialize(const QByteArray& data);
57  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
58  virtual bool handleMessage(const Message& message);
59 
60 public slots:
61  void channelMarkerChangedByCursor();
62  void channelMarkerHighlightedByCursor();
63 
64 private:
65  Ui::ChannelAnalyzerGUI* ui;
71  int m_rate;
73 
79 
80  explicit ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
81  virtual ~ChannelAnalyzerGUI();
82 
83  int getRequestedChannelSampleRate();
84  void setNewFinalRate();
85  void setFiltersUIBoundaries();
86 
87  void blockApplySettings(bool block);
88  void applySettings(bool force = false);
89  void displaySettings();
90  void displayPLLSettings();
91  void setSpectrumDisplay();
92 
93  void leaveEvent(QEvent*);
94  void enterEvent(QEvent*);
95 
96 private slots:
97  void on_deltaFrequency_changed(qint64 value);
98  void on_channelSampleRate_changed(quint64 value);
99  void on_pll_toggled(bool checked);
100  void on_pllPskOrder_currentIndexChanged(int index);
101  void on_useRationalDownsampler_toggled(bool checked);
102  void on_signalSelect_currentIndexChanged(int index);
103  void on_rrcFilter_toggled(bool checked);
104  void on_rrcRolloff_valueChanged(int value);
105  void on_BW_valueChanged(int value);
106  void on_lowCut_valueChanged(int value);
107  void on_spanLog2_currentIndexChanged(int index);
108  void on_ssb_toggled(bool checked);
109  void onWidgetRolled(QWidget* widget, bool rollDown);
110  void onMenuDialogCalled(const QPoint& p);
111  void handleInputMessages();
112  void tick();
113 };
114 
115 #endif // INCLUDE_CHANNELANALYZERNGGUI_H
SpectrumScopeComboVis * m_spectrumScopeComboVis
Definition: chanalyzergui.h:75
DeviceUISet * m_deviceUISet
Definition: chanalyzergui.h:67
int m_rate
sample rate after final in-channel decimation (spanlog2)
Definition: chanalyzergui.h:71
SpectrumVis * m_spectrumVis
Definition: chanalyzergui.h:76
MovingAverageUtil< double, double, 40 > m_channelPowerAvg
Definition: chanalyzergui.h:72
PluginAPI * m_pluginAPI
Definition: chanalyzergui.h:66
void * create(QString type)
ScopeVis * m_scopeVis
Definition: chanalyzergui.h:77
MessageQueue m_inputMessageQueue
Definition: chanalyzergui.h:78
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
virtual MessageQueue * getInputMessageQueue()
Definition: chanalyzergui.h:57
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74