2017-01-29 13:51:45 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2017 F4EXB //
|
|
|
|
// 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 //
|
|
|
|
// //
|
|
|
|
// 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 SDRBASE_GUI_GLSCOPENGGUI_H_
|
|
|
|
#define SDRBASE_GUI_GLSCOPENGGUI_H_
|
|
|
|
|
|
|
|
#include <QWidget>
|
2017-02-04 22:41:32 -05:00
|
|
|
#include <QComboBox>
|
|
|
|
|
2017-01-29 13:51:45 -05:00
|
|
|
#include "dsp/dsptypes.h"
|
|
|
|
#include "util/export.h"
|
|
|
|
#include "util/message.h"
|
2017-02-04 22:41:32 -05:00
|
|
|
#include "dsp/scopevisng.h"
|
2017-01-29 13:51:45 -05:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class GLScopeNGGUI;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MessageQueue;
|
|
|
|
class GLScopeNG;
|
|
|
|
|
|
|
|
class SDRANGEL_API GLScopeNGGUI : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit GLScopeNGGUI(QWidget* parent = 0);
|
|
|
|
~GLScopeNGGUI();
|
|
|
|
|
|
|
|
void setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScopeNG* glScope);
|
|
|
|
|
|
|
|
void setSampleRate(int sampleRate);
|
|
|
|
void resetToDefaults();
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
|
|
|
|
|
|
|
bool handleMessage(Message* message);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::GLScopeNGGUI* ui;
|
|
|
|
|
|
|
|
MessageQueue* m_messageQueue;
|
|
|
|
ScopeVisNG* m_scopeVis;
|
|
|
|
GLScopeNG* m_glScope;
|
|
|
|
|
|
|
|
int m_sampleRate;
|
2017-02-04 22:41:32 -05:00
|
|
|
int m_timeBase;
|
|
|
|
int m_timeOffset;
|
|
|
|
int m_traceLenMult;
|
|
|
|
|
|
|
|
static const double amps[11];
|
2017-01-29 13:51:45 -05:00
|
|
|
|
|
|
|
void applySettings();
|
2017-02-06 12:40:15 -05:00
|
|
|
// First row
|
2017-02-09 12:44:20 -05:00
|
|
|
void setTraceIndexDisplay();
|
2017-02-04 22:41:32 -05:00
|
|
|
void setTimeScaleDisplay();
|
|
|
|
void setTraceLenDisplay();
|
|
|
|
void setTimeOfsDisplay();
|
2017-02-06 12:40:15 -05:00
|
|
|
// Second row
|
2017-02-05 07:26:07 -05:00
|
|
|
void setAmpScaleDisplay();
|
2017-02-06 12:40:15 -05:00
|
|
|
void setAmpOfsDisplay();
|
|
|
|
// Third row
|
2017-02-09 12:44:20 -05:00
|
|
|
void setTrigIndexDisplay();
|
2017-02-09 22:35:08 -05:00
|
|
|
void setTrigCountDisplay();
|
2017-02-06 12:40:15 -05:00
|
|
|
void setTrigLevelDisplay();
|
|
|
|
void setTrigDelayDisplay();
|
|
|
|
void setTrigPreDisplay();
|
2017-02-05 07:26:07 -05:00
|
|
|
|
|
|
|
void changeCurrentTrace();
|
2017-02-06 12:40:15 -05:00
|
|
|
void changeCurrentTrigger();
|
2017-02-04 22:41:32 -05:00
|
|
|
|
|
|
|
void fillTraceData(ScopeVisNG::TraceData& traceData);
|
|
|
|
void fillTriggerData(ScopeVisNG::TriggerData& triggerData);
|
2017-02-09 20:45:49 -05:00
|
|
|
void setTriggerUI(ScopeVisNG::TriggerData& triggerData);
|
2017-02-04 22:41:32 -05:00
|
|
|
|
|
|
|
void fillProjectionCombo(QComboBox* comboBox);
|
2017-01-29 13:51:45 -05:00
|
|
|
|
2017-01-29 16:52:38 -05:00
|
|
|
private slots:
|
|
|
|
void on_scope_sampleRateChanged(int value);
|
2017-02-05 20:40:31 -05:00
|
|
|
// First row
|
2017-02-03 02:27:03 -05:00
|
|
|
void on_onlyX_toggled(bool checked);
|
|
|
|
void on_onlyY_toggled(bool checked);
|
|
|
|
void on_horizontalXY_toggled(bool checked);
|
|
|
|
void on_verticalXY_toggled(bool checked);
|
|
|
|
void on_polar_toggled(bool checked);
|
|
|
|
void on_traceIntensity_valueChanged(int value);
|
|
|
|
void on_gridIntensity_valueChanged(int value);
|
|
|
|
void on_time_valueChanged(int value);
|
|
|
|
void on_timeOfs_valueChanged(int value);
|
|
|
|
void on_traceLen_valueChanged(int value);
|
2017-02-05 20:40:31 -05:00
|
|
|
// Second row
|
2017-02-05 07:26:07 -05:00
|
|
|
void on_traceMode_currentIndexChanged(int index);
|
|
|
|
void on_amp_valueChanged(int value);
|
2017-02-06 12:40:15 -05:00
|
|
|
void on_ofsCoarse_valueChanged(int value);
|
|
|
|
void on_ofsFine_valueChanged(int value);
|
|
|
|
void on_traceDelay_valueChanged(int value);
|
2017-02-05 20:40:31 -05:00
|
|
|
// Third row
|
2017-02-09 20:45:49 -05:00
|
|
|
void on_trig_valueChanged(int value);
|
|
|
|
void on_trigAdd_clicked(bool checked);
|
|
|
|
void on_trigDel_clicked(bool checked);
|
2017-02-06 12:40:15 -05:00
|
|
|
void on_trigMode_currentIndexChanged(int index);
|
|
|
|
void on_trigCount_valueChanged(int value);
|
|
|
|
void on_trigPos_toggled(bool checked);
|
|
|
|
void on_trigNeg_toggled(bool checked);
|
|
|
|
void on_trigBoth_toggled(bool checked);
|
|
|
|
void on_trigLevelCoarse_valueChanged(int value);
|
|
|
|
void on_trigLevelFine_valueChanged(int value);
|
2017-02-09 16:22:56 -05:00
|
|
|
void on_trigDelayCoarse_valueChanged(int value);
|
|
|
|
void on_trigDelayFine_valueChanged(int value);
|
2017-02-06 12:40:15 -05:00
|
|
|
void on_trigPre_valueChanged(int value);
|
|
|
|
void on_trigOneShot_toggled(bool checked);
|
2017-02-05 20:40:31 -05:00
|
|
|
void on_freerun_toggled(bool checked);
|
2017-01-29 13:51:45 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* SDRBASE_GUI_GLSCOPENGGUI_H_ */
|