1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 21:01:45 -05:00
sdrangel/plugins/channelrx/demoddatv/datvdemodgui.h

139 lines
5.0 KiB
C
Raw Normal View History

2018-02-22 16:52:49 -05:00
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2018 F4HKW //
// for F4EXB / SDRAngel //
// using LeanSDR Framework (C) 2016 F4DAV //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
2019-04-11 00:39:30 -04:00
// (at your option) any later version. //
2018-02-22 16:52:49 -05:00
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_DATVDEMODGUI_H
#define INCLUDE_DATVDEMODGUI_H
#include "gui/rollupwidget.h"
2018-03-10 19:00:27 -05:00
#include "plugin/plugininstancegui.h"
2018-02-22 16:52:49 -05:00
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "datvdemod.h"
#include <QTimer>
class PluginAPI;
class DeviceUISet;
class BasebandSampleSink;
class DownChannelizer;
namespace Ui
{
class DATVDemodGUI;
}
class DATVDemodGUI : public RollupWidget, public PluginInstanceGUI
{
Q_OBJECT
public:
static DATVDemodGUI* create(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
virtual void destroy();
void setName(const QString& strName);
QString getName() const;
virtual qint64 getCenterFrequency() const;
virtual void setCenterFrequency(qint64 intCenterFrequency);
void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& arrData);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& objMessage);
static const QString m_strChannelID;
private slots:
void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor();
void onWidgetRolled(QWidget* widget, bool rollDown);
void onMenuDoubleClicked();
2019-03-19 18:12:54 -04:00
void audioSelect();
2018-02-22 16:52:49 -05:00
void tick();
void on_cmbStandard_currentIndexChanged(const QString &arg1);
void on_cmbModulation_currentIndexChanged(const QString &arg1);
void on_cmbFEC_currentIndexChanged(const QString &arg1);
void on_chkViterbi_clicked();
void on_chkHardMetric_clicked();
2019-03-23 05:51:01 -04:00
void on_resetDefaults_clicked();
2018-02-22 16:52:49 -05:00
void on_spiSymbolRate_valueChanged(int arg1);
void on_spiNotchFilters_valueChanged(int arg1);
void on_chkAllowDrift_clicked();
2019-03-23 05:51:01 -04:00
void on_fullScreen_clicked();
2018-02-22 16:52:49 -05:00
void on_mouseEvent(QMouseEvent* obj);
void on_StreamDataAvailable(int *intPackets, int *intBytes, int *intPercent, qint64 *intTotalReceived);
2018-02-25 19:04:45 -05:00
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData);
2018-02-22 16:52:49 -05:00
void on_spiBandwidth_valueChanged(int arg1);
void on_chkFastlock_clicked();
2018-02-25 19:04:45 -05:00
void on_cmbFilter_currentIndexChanged(int index);
void on_spiRollOff_valueChanged(int arg1);
void on_spiExcursion_valueChanged(int arg1);
2018-03-10 13:30:55 -05:00
void on_deltaFrequency_changed(qint64 value);
void on_rfBandwidth_changed(qint64 value);
2019-03-22 03:05:01 -04:00
void on_audioMute_toggled(bool checked);
void on_audioVolume_valueChanged(int value);
void on_videoMute_toggled(bool checked);
2018-02-25 19:04:45 -05:00
2018-02-22 16:52:49 -05:00
private:
Ui::DATVDemodGUI* ui;
PluginAPI* m_objPluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_objChannelMarker;
ThreadedBasebandSampleSink* m_objThreadedChannelizer;
DownChannelizer* m_objChannelizer;
DATVDemod* m_objDATVDemod;
MessageQueue m_inputMessageQueue;
int m_intCenterFrequency;
DATVDemodSettings m_settings;
2018-02-22 16:52:49 -05:00
QTimer m_objTimer;
qint64 m_intPreviousDecodedData;
qint64 m_intLastDecodedData;
qint64 m_intLastSpeed;
int m_intReadyDecodedData;
bool m_blnBasicSettingsShown;
bool m_blnDoApplySettings;
bool m_blnButtonPlayClicked;
2018-03-10 17:01:03 -05:00
MovingAverageUtil<double, double, 4> m_objMagSqAverage;
2018-02-22 16:52:49 -05:00
explicit DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent = 0);
virtual ~DATVDemodGUI();
void blockApplySettings(bool blnBlock);
void applySettings(bool force = false);
void displaySettings();
2018-02-22 16:52:49 -05:00
QString formatBytes(qint64 intBytes);
2018-02-25 19:04:45 -05:00
void displayRRCParameters(bool blnVisible);
2018-02-22 16:52:49 -05:00
void leaveEvent(QEvent*);
void enterEvent(QEvent*);
};
#endif // INCLUDE_DATVDEMODGUI_H