1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-30 03:38:55 -05:00
sdrangel/plugins/channelrx/demodssb/ssbdemodgui.h

120 lines
3.8 KiB
C
Raw Normal View History

2014-05-21 13:31:14 -04:00
#ifndef INCLUDE_SSBDEMODGUI_H
#define INCLUDE_SSBDEMODGUI_H
#include <QIcon>
#include "channel/channelgui.h"
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
2017-10-01 19:45:19 -04:00
#include "ssbdemodsettings.h"
2014-05-21 13:31:14 -04:00
class PluginAPI;
class DeviceUISet;
2014-05-21 13:31:14 -04:00
class AudioFifo;
class SSBDemod;
class SpectrumVis;
class BasebandSampleSink;
2014-05-21 13:31:14 -04:00
namespace Ui {
class SSBDemodGUI;
}
class SSBDemodGUI : public ChannelGUI {
2014-05-21 13:31:14 -04:00
Q_OBJECT
public:
static SSBDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
virtual void destroy();
2014-05-21 13:31:14 -04:00
void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; };
virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; };
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; };
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; };
virtual QString getTitle() const { return m_settings.m_title; };
virtual QColor getTitleColor() const { return m_settings.m_rgbColor; };
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
virtual bool getHidden() const { return m_settings.m_hidden; }
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; }
2014-05-21 13:31:14 -04:00
public slots:
void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor();
2014-05-21 13:31:14 -04:00
private:
Ui::SSBDemodGUI* ui;
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
2017-10-01 19:45:19 -04:00
SSBDemodSettings m_settings;
qint64 m_deviceCenterFrequency;
int m_basebandSampleRate;
bool m_doApplySettings;
2017-11-03 14:29:48 -04:00
int m_spectrumRate;
2015-12-05 12:48:15 -05:00
bool m_audioBinaural;
bool m_audioFlipChannels;
bool m_audioMute;
bool m_squelchOpen;
int m_audioSampleRate;
uint32_t m_tickCount;
2014-05-21 13:31:14 -04:00
SSBDemod* m_ssbDemod;
SpectrumVis* m_spectrumVis;
MessageQueue m_inputMessageQueue;
2014-05-21 13:31:14 -04:00
QIcon m_iconDSBUSB;
QIcon m_iconDSBLSB;
explicit SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet* deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
virtual ~SSBDemodGUI();
2014-05-21 13:31:14 -04:00
bool blockApplySettings(bool block);
2017-10-01 19:45:19 -04:00
void applySettings(bool force = false);
2019-12-03 12:49:52 -05:00
void applyBandwidths(unsigned int spanLog2, bool force = false);
unsigned int spanLog2Max();
2017-07-27 15:14:50 -04:00
void displaySettings();
void displayAGCPowerThreshold(int value);
void displayAGCThresholdGate(int value);
bool handleMessage(const Message& message);
void makeUIConnections();
void updateAbsoluteCenterFrequency();
void leaveEvent(QEvent*);
void enterEvent(QEvent*);
private slots:
void on_deltaFrequency_changed(qint64 value);
void on_audioBinaural_toggled(bool binaural);
void on_audioFlipChannels_toggled(bool flip);
void on_dsb_toggled(bool dsb);
void on_BW_valueChanged(int value);
void on_lowCut_valueChanged(int value);
void on_volume_valueChanged(int value);
void on_agc_toggled(bool checked);
void on_agcClamping_toggled(bool checked);
void on_agcTimeLog2_valueChanged(int value);
void on_agcPowerThreshold_valueChanged(int value);
void on_agcThresholdGate_valueChanged(int value);
void on_audioMute_toggled(bool checked);
void on_spanLog2_valueChanged(int value);
void on_flipSidebands_clicked(bool checked);
void on_fftWindow_currentIndexChanged(int index);
void on_filterIndex_valueChanged(int value);
void onWidgetRolled(QWidget* widget, bool rollDown);
void onMenuDialogCalled(const QPoint& p);
void handleInputMessages();
void audioSelect();
void tick();
2014-05-21 13:31:14 -04:00
};
#endif // INCLUDE_SSBDEMODGUI_H