2017-03-06 02:39:34 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2017 Edouard Griffiths, F4EXB //
|
|
|
|
// //
|
|
|
|
// 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 //
|
|
|
|
// //
|
|
|
|
// 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 PLUGINS_CHANNELTX_MODTV_ATVMODGUI_H_
|
|
|
|
#define PLUGINS_CHANNELTX_MODTV_ATVMODGUI_H_
|
|
|
|
|
2017-09-25 22:22:08 +00:00
|
|
|
#include <plugin/plugininstancegui.h>
|
2017-03-06 02:39:34 +00:00
|
|
|
#include "gui/rollupwidget.h"
|
|
|
|
#include "dsp/channelmarker.h"
|
|
|
|
#include "dsp/movingaverage.h"
|
2017-09-16 20:23:31 +00:00
|
|
|
#include "util/messagequeue.h"
|
|
|
|
|
2017-03-06 02:39:34 +00:00
|
|
|
#include "atvmod.h"
|
|
|
|
|
|
|
|
class PluginAPI;
|
|
|
|
class DeviceSinkAPI;
|
|
|
|
|
|
|
|
class ThreadedBasebandSampleSource;
|
|
|
|
class UpChannelizer;
|
|
|
|
class ATVMod;
|
2017-03-12 02:51:22 +00:00
|
|
|
class QMessageBox;
|
2017-03-06 02:39:34 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ATVModGUI;
|
|
|
|
}
|
|
|
|
|
2017-09-25 22:22:08 +00:00
|
|
|
class ATVModGUI : public RollupWidget, public PluginInstanceGUI {
|
2017-03-06 02:39:34 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
2017-09-16 08:45:08 +00:00
|
|
|
virtual void destroy();
|
2017-03-06 02:39:34 +00:00
|
|
|
|
|
|
|
void setName(const QString& name);
|
|
|
|
QString getName() const;
|
|
|
|
virtual qint64 getCenterFrequency() const;
|
|
|
|
virtual void setCenterFrequency(qint64 centerFrequency);
|
|
|
|
|
|
|
|
void resetToDefaults();
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
2017-09-16 20:23:31 +00:00
|
|
|
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
2017-03-06 02:39:34 +00:00
|
|
|
virtual bool handleMessage(const Message& message);
|
|
|
|
|
|
|
|
static const QString m_channelID;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void viewChanged();
|
2017-03-12 00:26:12 +00:00
|
|
|
void channelizerOutputSampleRateChanged();
|
2017-03-06 02:39:34 +00:00
|
|
|
void handleSourceMessages();
|
|
|
|
|
2017-05-17 22:16:07 +00:00
|
|
|
void on_deltaFrequency_changed(qint64 value);
|
2017-03-14 17:59:49 +00:00
|
|
|
void on_channelMute_toggled(bool checked);
|
2017-03-22 12:10:42 +00:00
|
|
|
void on_forceDecimator_toggled(bool checked);
|
2017-03-07 18:19:54 +00:00
|
|
|
void on_modulation_currentIndexChanged(int index);
|
2017-03-21 20:59:44 +00:00
|
|
|
void on_rfScaling_valueChanged(int value);
|
2017-03-21 22:29:42 +00:00
|
|
|
void on_fmExcursion_valueChanged(int value);
|
2017-03-06 02:39:34 +00:00
|
|
|
void on_rfBW_valueChanged(int value);
|
2017-03-16 09:44:31 +00:00
|
|
|
void on_rfOppBW_valueChanged(int value);
|
2017-03-21 02:56:01 +00:00
|
|
|
void on_nbLines_currentIndexChanged(int index);
|
|
|
|
void on_fps_currentIndexChanged(int index);
|
2017-03-12 20:41:01 +00:00
|
|
|
void on_standard_currentIndexChanged(int index);
|
2017-03-19 09:49:02 +00:00
|
|
|
void on_invertVideo_clicked();
|
2017-03-06 02:39:34 +00:00
|
|
|
void on_uniformLevel_valueChanged(int value);
|
|
|
|
void on_inputSelect_currentIndexChanged(int index);
|
2017-03-08 00:35:18 +00:00
|
|
|
void on_imageFileDialog_clicked(bool checked);
|
2017-03-09 01:09:31 +00:00
|
|
|
void on_videoFileDialog_clicked(bool checked);
|
2017-03-06 02:39:34 +00:00
|
|
|
|
2017-03-11 05:57:22 +00:00
|
|
|
void on_playVideo_toggled(bool checked);
|
2017-03-09 23:30:15 +00:00
|
|
|
void on_playLoop_toggled(bool checked);
|
|
|
|
void on_navTimeSlider_valueChanged(int value);
|
|
|
|
|
2017-03-11 07:21:26 +00:00
|
|
|
void on_playCamera_toggled(bool checked);
|
|
|
|
void on_camSelect_currentIndexChanged(int index);
|
2017-03-24 18:06:29 +00:00
|
|
|
void on_cameraManualFPSEnable_toggled(bool checked);
|
|
|
|
void on_cameraManualFPS_valueChanged(int value);
|
2017-03-11 07:21:26 +00:00
|
|
|
|
2017-03-12 14:10:59 +00:00
|
|
|
void on_overlayTextShow_toggled(bool checked);
|
|
|
|
void on_overlayText_textEdited(const QString& arg1);
|
|
|
|
|
2017-03-06 02:39:34 +00:00
|
|
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
|
|
|
void onMenuDoubleClicked();
|
|
|
|
|
2017-03-08 00:35:18 +00:00
|
|
|
void configureImageFileName();
|
2017-03-09 01:09:31 +00:00
|
|
|
void configureVideoFileName();
|
2017-03-06 02:39:34 +00:00
|
|
|
void tick();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::ATVModGUI* ui;
|
|
|
|
PluginAPI* m_pluginAPI;
|
|
|
|
DeviceSinkAPI* m_deviceAPI;
|
|
|
|
ChannelMarker m_channelMarker;
|
|
|
|
bool m_basicSettingsShown;
|
|
|
|
bool m_doApplySettings;
|
|
|
|
|
|
|
|
ThreadedBasebandSampleSource* m_threadedChannelizer;
|
|
|
|
UpChannelizer* m_channelizer;
|
|
|
|
ATVMod* m_atvMod;
|
2017-05-11 22:03:56 +00:00
|
|
|
MovingAverage<double> m_channelPowerDbAvg;
|
2017-03-06 02:39:34 +00:00
|
|
|
|
2017-03-08 00:35:18 +00:00
|
|
|
QString m_imageFileName;
|
2017-03-09 01:09:31 +00:00
|
|
|
QString m_videoFileName;
|
2017-03-09 22:17:14 +00:00
|
|
|
quint32 m_videoLength; //!< video file length in seconds
|
|
|
|
float m_videoFrameRate; //!< video file frame rate
|
|
|
|
int m_frameCount;
|
2017-03-06 02:39:34 +00:00
|
|
|
std::size_t m_tickCount;
|
|
|
|
bool m_enableNavTime;
|
2017-03-12 02:51:22 +00:00
|
|
|
QMessageBox *m_camBusyFPSMessageBox;
|
2017-03-20 03:31:57 +00:00
|
|
|
int m_rfSliderDivisor;
|
2017-09-16 20:23:31 +00:00
|
|
|
MessageQueue m_inputMessageQueue;
|
2017-03-06 02:39:34 +00:00
|
|
|
|
|
|
|
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
|
|
|
virtual ~ATVModGUI();
|
|
|
|
|
|
|
|
void blockApplySettings(bool block);
|
|
|
|
void applySettings();
|
2017-03-09 22:17:14 +00:00
|
|
|
void updateWithStreamData();
|
|
|
|
void updateWithStreamTime();
|
2017-03-20 02:35:27 +00:00
|
|
|
void setRFFiltersSlidersRange(int sampleRate);
|
2017-03-21 11:16:43 +00:00
|
|
|
void setChannelMarkerBandwidth();
|
2017-03-21 02:56:01 +00:00
|
|
|
int getNbLines();
|
|
|
|
int getFPS();
|
2017-03-06 02:39:34 +00:00
|
|
|
|
|
|
|
void leaveEvent(QEvent*);
|
|
|
|
void enterEvent(QEvent*);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* PLUGINS_CHANNELTX_MODAM_AMMODGUI_H_ */
|