2016-04-08 12:14:50 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
2016-04-21 21:53:16 -04:00
|
|
|
// Copyright (C) 2016 F4EXB //
|
2016-04-08 12:14:50 -04:00
|
|
|
// written by Edouard Griffiths //
|
|
|
|
// //
|
|
|
|
// 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. //
|
2016-04-08 12:14:50 -04: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/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-04-07 07:05:53 -04:00
|
|
|
#ifndef INCLUDE_DSDDEMODGUI_H
|
|
|
|
#define INCLUDE_DSDDEMODGUI_H
|
|
|
|
|
2017-08-23 17:44:12 -04:00
|
|
|
#include <QMenu>
|
|
|
|
|
2020-10-04 00:16:15 -04:00
|
|
|
#include "channel/channelgui.h"
|
2016-04-07 07:05:53 -04:00
|
|
|
#include "dsp/dsptypes.h"
|
|
|
|
#include "dsp/channelmarker.h"
|
|
|
|
#include "dsp/movingaverage.h"
|
2017-09-16 16:23:31 -04:00
|
|
|
#include "util/messagequeue.h"
|
2022-01-08 23:27:12 -05:00
|
|
|
#include "settings/rollupstate.h"
|
2016-04-07 07:05:53 -04:00
|
|
|
|
2017-10-03 17:42:56 -04:00
|
|
|
#include "dsddemodsettings.h"
|
2018-04-01 16:14:11 -04:00
|
|
|
#include "dsdstatustextdialog.h"
|
2017-10-03 17:42:56 -04:00
|
|
|
|
2016-04-07 07:05:53 -04:00
|
|
|
class PluginAPI;
|
2017-10-31 03:24:05 -04:00
|
|
|
class DeviceUISet;
|
2017-11-08 19:03:05 -05:00
|
|
|
class BasebandSampleSink;
|
2018-03-12 00:07:51 -04:00
|
|
|
class ScopeVisXY;
|
2016-04-07 07:05:53 -04:00
|
|
|
class DSDDemod;
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class DSDDemodGUI;
|
|
|
|
}
|
|
|
|
|
2020-10-04 00:16:15 -04:00
|
|
|
class DSDDemodGUI : public ChannelGUI {
|
2016-04-07 07:05:53 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-11-08 19:03:05 -05:00
|
|
|
static DSDDemodGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
2017-09-16 04:45:08 -04:00
|
|
|
virtual void destroy();
|
2016-04-07 07:05:53 -04:00
|
|
|
|
|
|
|
void resetToDefaults();
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
2017-09-16 16:23:31 -04:00
|
|
|
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
2022-04-12 10:20:45 -04:00
|
|
|
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; };
|
2022-04-12 12:27:27 -04:00
|
|
|
virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; }
|
|
|
|
virtual bool getHidden() const { return m_settings.m_hidden; }
|
2022-04-16 10:45:53 -04:00
|
|
|
virtual ChannelMarker& getChannelMarker() { return m_channelMarker; }
|
2022-04-17 19:42:03 -04:00
|
|
|
virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
|
|
|
|
virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; }
|
2016-04-07 07:05:53 -04:00
|
|
|
|
2017-11-13 19:34:51 -05:00
|
|
|
public slots:
|
|
|
|
void channelMarkerChangedByCursor();
|
2017-11-14 16:58:35 -05:00
|
|
|
void channelMarkerHighlightedByCursor();
|
2016-04-07 07:05:53 -04:00
|
|
|
|
2022-04-23 19:24:22 -04:00
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent* size);
|
|
|
|
|
2016-04-07 07:05:53 -04:00
|
|
|
private:
|
2018-05-24 06:17:29 -04:00
|
|
|
// typedef enum
|
|
|
|
// {
|
|
|
|
// signalFormatNone,
|
|
|
|
// signalFormatDMR,
|
|
|
|
// signalFormatDStar,
|
|
|
|
// signalFormatDPMR,
|
|
|
|
// signalFormatYSF
|
|
|
|
// } SignalFormat;
|
2016-04-23 00:27:28 -04:00
|
|
|
|
2016-04-07 07:05:53 -04:00
|
|
|
Ui::DSDDemodGUI* ui;
|
|
|
|
PluginAPI* m_pluginAPI;
|
2017-10-31 03:24:05 -04:00
|
|
|
DeviceUISet* m_deviceUISet;
|
2016-04-07 07:05:53 -04:00
|
|
|
ChannelMarker m_channelMarker;
|
2022-01-08 23:27:12 -05:00
|
|
|
RollupState m_rollupState;
|
2017-10-03 17:42:56 -04:00
|
|
|
DSDDemodSettings m_settings;
|
2022-04-13 05:08:21 -04:00
|
|
|
qint64 m_deviceCenterFrequency;
|
|
|
|
int m_basebandSampleRate;
|
2016-04-07 07:05:53 -04:00
|
|
|
bool m_doApplySettings;
|
2022-05-24 09:18:55 -04:00
|
|
|
QList<DSDDemodSettings::AvailableAMBEFeature> m_availableAMBEFeatures;
|
2016-04-07 07:05:53 -04:00
|
|
|
|
2018-03-12 00:07:51 -04:00
|
|
|
ScopeVisXY* m_scopeVisXY;
|
2016-04-07 07:05:53 -04:00
|
|
|
|
|
|
|
DSDDemod* m_dsdDemod;
|
2016-08-18 13:38:39 -04:00
|
|
|
bool m_enableCosineFiltering;
|
2016-08-24 19:06:42 -04:00
|
|
|
bool m_syncOrConstellation;
|
2016-08-30 19:18:32 -04:00
|
|
|
bool m_slot1On;
|
|
|
|
bool m_slot2On;
|
2016-09-06 18:16:08 -04:00
|
|
|
bool m_tdmaStereo;
|
2016-04-07 07:05:53 -04:00
|
|
|
bool m_audioMute;
|
|
|
|
bool m_squelchOpen;
|
2020-08-01 04:09:39 -04:00
|
|
|
int m_audioSampleRate;
|
2017-08-17 11:48:47 -04:00
|
|
|
uint32_t m_tickCount;
|
2016-04-07 07:05:53 -04:00
|
|
|
|
2016-09-28 11:58:29 -04:00
|
|
|
float m_myLatitude;
|
|
|
|
float m_myLongitude;
|
|
|
|
|
2017-09-16 16:23:31 -04:00
|
|
|
MessageQueue m_inputMessageQueue;
|
|
|
|
|
2018-04-01 16:14:11 -04:00
|
|
|
DSDStatusTextDialog m_dsdStatusTextDialog;
|
|
|
|
|
2017-11-08 19:03:05 -05:00
|
|
|
explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
2016-04-07 07:05:53 -04:00
|
|
|
virtual ~DSDDemodGUI();
|
|
|
|
|
|
|
|
void blockApplySettings(bool block);
|
2017-08-24 02:46:14 -04:00
|
|
|
void applySettings(bool force = false);
|
2017-10-03 17:42:56 -04:00
|
|
|
void displaySettings();
|
2022-05-24 09:18:55 -04:00
|
|
|
void updateAMBEFeaturesList();
|
2016-09-28 11:58:29 -04:00
|
|
|
void updateMyPosition();
|
2020-10-03 13:51:14 -04:00
|
|
|
bool handleMessage(const Message& message);
|
2022-04-12 10:20:45 -04:00
|
|
|
void makeUIConnections();
|
2022-04-13 05:08:21 -04:00
|
|
|
void updateAbsoluteCenterFrequency();
|
2016-04-07 07:05:53 -04:00
|
|
|
|
|
|
|
void leaveEvent(QEvent*);
|
|
|
|
void enterEvent(QEvent*);
|
2017-11-13 19:34:51 -05:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_deltaFrequency_changed(qint64 value);
|
|
|
|
void on_rfBW_valueChanged(int index);
|
|
|
|
void on_demodGain_valueChanged(int value);
|
|
|
|
void on_volume_valueChanged(int value);
|
|
|
|
void on_baudRate_currentIndexChanged(int index);
|
|
|
|
void on_enableCosineFiltering_toggled(bool enable);
|
|
|
|
void on_syncOrConstellation_toggled(bool checked);
|
2018-03-12 15:39:16 -04:00
|
|
|
void on_traceLength_valueChanged(int value);
|
2018-03-12 20:39:43 -04:00
|
|
|
void on_traceStroke_valueChanged(int value);
|
|
|
|
void on_traceDecay_valueChanged(int value);
|
2017-11-13 19:34:51 -05:00
|
|
|
void on_slot1On_toggled(bool checked);
|
|
|
|
void on_slot2On_toggled(bool checked);
|
|
|
|
void on_tdmaStereoSplit_toggled(bool checked);
|
|
|
|
void on_fmDeviation_valueChanged(int value);
|
|
|
|
void on_squelchGate_valueChanged(int value);
|
|
|
|
void on_squelch_valueChanged(int value);
|
2017-12-26 14:29:23 -05:00
|
|
|
void on_highPassFilter_toggled(bool checked);
|
2017-11-13 19:34:51 -05:00
|
|
|
void on_audioMute_toggled(bool checked);
|
|
|
|
void on_symbolPLLLock_toggled(bool checked);
|
2022-05-24 09:18:55 -04:00
|
|
|
void on_ambeSupport_clicked(bool checked);
|
|
|
|
void on_ambeFeatures_currentIndexChanged(int index);
|
2017-11-13 19:34:51 -05:00
|
|
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
|
|
|
void onMenuDialogCalled(const QPoint& p);
|
2018-04-01 16:14:11 -04:00
|
|
|
void on_viewStatusLog_clicked();
|
2018-05-24 12:23:08 -04:00
|
|
|
void handleInputMessages();
|
2018-03-28 02:00:27 -04:00
|
|
|
void audioSelect();
|
2017-11-13 19:34:51 -05:00
|
|
|
void tick();
|
2016-04-07 07:05:53 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_DSDDEMODGUI_H
|