2021-07-31 20:57:31 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2021 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 //
|
|
|
|
// (at your option) any later version. //
|
|
|
|
// //
|
|
|
|
// 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_SPECTRUMMARKERSDIALOG_H_
|
|
|
|
#define SDRBASE_GUI_SPECTRUMMARKERSDIALOG_H_
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QList>
|
|
|
|
|
2021-08-04 17:28:52 +00:00
|
|
|
#include "dsp/spectrumsettings.h"
|
2021-08-07 17:45:48 +00:00
|
|
|
#include "dsp/spectrummarkers.h"
|
2021-07-31 20:57:31 +00:00
|
|
|
#include "export.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SpectrumMarkersDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SDRGUI_API SpectrumMarkersDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit SpectrumMarkersDialog(
|
|
|
|
QList<SpectrumHistogramMarker>& histogramMarkers,
|
|
|
|
QList<SpectrumWaterfallMarker>& waterfallMarkers,
|
2022-01-20 23:18:41 +00:00
|
|
|
QList<SpectrumAnnotationMarker>& annotationMarkers,
|
2021-08-04 17:28:52 +00:00
|
|
|
SpectrumSettings::MarkersDisplay& markersDisplay,
|
2021-07-31 20:57:31 +00:00
|
|
|
QWidget* parent = nullptr
|
|
|
|
);
|
|
|
|
~SpectrumMarkersDialog();
|
|
|
|
void setCenterFrequency(qint64 centerFrequency) { m_centerFrequency = centerFrequency; }
|
|
|
|
void setPower(float power) { m_power = power; }
|
2021-08-02 22:28:14 +00:00
|
|
|
void setTime(float time) { m_time = time; }
|
2021-07-31 20:57:31 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::SpectrumMarkersDialog* ui;
|
|
|
|
QList<SpectrumHistogramMarker>& m_histogramMarkers;
|
|
|
|
QList<SpectrumWaterfallMarker>& m_waterfallMarkers;
|
2022-01-20 23:18:41 +00:00
|
|
|
QList<SpectrumAnnotationMarker>& m_annotationMarkers;
|
2021-08-04 17:28:52 +00:00
|
|
|
SpectrumSettings::MarkersDisplay& m_markersDisplay;
|
2021-07-31 20:57:31 +00:00
|
|
|
int m_histogramMarkerIndex;
|
2021-08-02 22:28:14 +00:00
|
|
|
int m_waterfallMarkerIndex;
|
2022-01-20 23:18:41 +00:00
|
|
|
int m_annotationMarkerIndex;
|
2021-07-31 20:57:31 +00:00
|
|
|
qint64 m_centerFrequency;
|
|
|
|
float m_power;
|
2021-08-02 22:28:14 +00:00
|
|
|
float m_time;
|
2022-01-20 23:18:41 +00:00
|
|
|
bool m_annoFreqStartElseCenter;
|
2021-07-31 20:57:31 +00:00
|
|
|
|
|
|
|
void displayHistogramMarker();
|
2021-08-02 22:28:14 +00:00
|
|
|
void displayWaterfallMarker();
|
2022-01-20 23:18:41 +00:00
|
|
|
void displayAnnotationMarker();
|
2021-08-02 22:28:14 +00:00
|
|
|
void displayTime(float time);
|
|
|
|
float getTime() const;
|
2021-07-31 20:57:31 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_markerFrequency_changed(qint64 value);
|
2021-08-01 18:26:24 +00:00
|
|
|
void on_centerFrequency_clicked();
|
|
|
|
void on_markerColor_clicked();
|
2021-08-04 17:28:52 +00:00
|
|
|
void on_showMarker_clicked(bool clicked);
|
2021-07-31 20:57:31 +00:00
|
|
|
void on_fixedPower_valueChanged(int value);
|
|
|
|
void on_marker_valueChanged(int value);
|
2021-08-01 18:26:24 +00:00
|
|
|
void on_setReference_clicked();
|
|
|
|
void on_markerAdd_clicked();
|
|
|
|
void on_markerDel_clicked();
|
2021-08-01 03:02:45 +00:00
|
|
|
void on_powerMode_currentIndexChanged(int index);
|
2021-08-03 21:12:13 +00:00
|
|
|
void on_powerHoldReset_clicked();
|
2022-01-20 23:18:41 +00:00
|
|
|
|
2021-08-02 22:28:14 +00:00
|
|
|
void on_wMarkerFrequency_changed(qint64 value);
|
|
|
|
void on_timeCoarse_valueChanged(int value);
|
|
|
|
void on_timeFine_valueChanged(int value);
|
|
|
|
void on_timeExp_valueChanged(int value);
|
|
|
|
void on_wCenterFrequency_clicked();
|
|
|
|
void on_wMarkerColor_clicked();
|
2021-08-04 17:28:52 +00:00
|
|
|
void on_wShowMarker_clicked(bool clicked);
|
2021-08-02 22:28:14 +00:00
|
|
|
void on_wMarker_valueChanged(int value);
|
|
|
|
void on_wSetReference_clicked();
|
|
|
|
void on_wMarkerAdd_clicked();
|
|
|
|
void on_wMarkerDel_clicked();
|
2022-01-20 23:18:41 +00:00
|
|
|
|
|
|
|
void on_aMarkerToggleFrequency_toggled(bool checked);
|
|
|
|
void on_aMarkerFrequency_changed(qint64 value);
|
|
|
|
void on_aCenterFrequency_clicked();
|
|
|
|
void on_aMakerDuplicate_clicked();
|
|
|
|
void on_aMakersSort_clicked();
|
|
|
|
void on_aMarkerColor_clicked();
|
2022-01-22 05:10:57 +00:00
|
|
|
void on_aMarkerShowState_currentIndexChanged(int state);
|
|
|
|
void on_aMarkerShowStateAll_clicked();
|
2022-01-20 23:18:41 +00:00
|
|
|
void on_aMarkerText_editingFinished();
|
|
|
|
void on_aMarker_valueChanged(int value);
|
|
|
|
void on_aMarkerAdd_clicked();
|
|
|
|
void on_aMarkerDel_clicked();
|
|
|
|
void on_aMarkerBandwidth_changed(qint64 value);
|
|
|
|
void on_aMarkersExport_clicked();
|
|
|
|
void on_aMarkersImport_clicked();
|
|
|
|
|
|
|
|
static bool annotationMarkerLessThan(const SpectrumAnnotationMarker& m1, const SpectrumAnnotationMarker& m2) {
|
|
|
|
return m1.m_startFrequency < m2.m_startFrequency;
|
|
|
|
}
|
|
|
|
|
2021-08-04 17:28:52 +00:00
|
|
|
void on_showSelect_currentIndexChanged(int index);
|
2021-08-01 08:03:58 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void updateHistogram();
|
|
|
|
void updateWaterfall();
|
2022-01-20 23:18:41 +00:00
|
|
|
void updateAnnotations();
|
|
|
|
void updateMarkersDisplay();
|
2021-07-31 20:57:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SDRBASE_GUI_SPECTRUMMARKERSDIALOG_H_
|