diff --git a/CMakeLists.txt b/CMakeLists.txt index de34af8b3..bc71750bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,7 +259,7 @@ set (wsjt_qt_CXXSRCS MaidenheadLocatorValidator.cpp CallsignValidator.cpp SplashScreen.cpp - PhaseEqualizationDialog.cpp + EqualizationToolsDialog.cpp ) set (wsjt_qtmm_CXXSRCS diff --git a/PhaseEqualizationDialog.cpp b/EqualizationToolsDialog.cpp similarity index 96% rename from PhaseEqualizationDialog.cpp rename to EqualizationToolsDialog.cpp index 21c8f7644..8b40d9d34 100644 --- a/PhaseEqualizationDialog.cpp +++ b/EqualizationToolsDialog.cpp @@ -1,4 +1,4 @@ -#include "PhaseEqualizationDialog.hpp" +#include "EqualizationToolsDialog.hpp" #include #include @@ -22,7 +22,7 @@ namespace { float constexpr PI = 3.1415927f; - char const * const title = "Phase Equalization"; + char const * const title = "Equalization Tools"; size_t constexpr intervals = 144; // plot data loaders - wraps a plot providing value_type and @@ -219,13 +219,13 @@ namespace auto pi_scaling = [] (float v) -> float {return v / PI;}; } -class PhaseEqualizationDialog::impl final +class EqualizationToolsDialog::impl final : public QDialog { Q_OBJECT public: - explicit impl (PhaseEqualizationDialog * self, QSettings * settings + explicit impl (EqualizationToolsDialog * self, QSettings * settings , QDir const& data_directory, QVector const& coefficients , QWidget * parent); ~impl () {save_window_state ();} @@ -248,7 +248,7 @@ private: void plot_phase (); void plot_amplitude (); - PhaseEqualizationDialog * self_; + EqualizationToolsDialog * self_; QSettings * settings_; QDir data_directory_; QHBoxLayout layout_; @@ -261,9 +261,9 @@ private: QDialogButtonBox button_box_; }; -#include "PhaseEqualizationDialog.moc" +#include "EqualizationToolsDialog.moc" -PhaseEqualizationDialog::PhaseEqualizationDialog (QSettings * settings +EqualizationToolsDialog::EqualizationToolsDialog (QSettings * settings , QDir const& data_directory , QVector const& coefficients , QWidget * parent) @@ -271,12 +271,12 @@ PhaseEqualizationDialog::PhaseEqualizationDialog (QSettings * settings { } -void PhaseEqualizationDialog::show () +void EqualizationToolsDialog::show () { m_->show (); } -PhaseEqualizationDialog::impl::impl (PhaseEqualizationDialog * self +EqualizationToolsDialog::impl::impl (EqualizationToolsDialog * self , QSettings * settings , QDir const& data_directory , QVector const& coefficients @@ -428,7 +428,7 @@ std::istream& operator >> (std::istream& is, PowerSpectrumPoint& r) return is; } -void PhaseEqualizationDialog::impl::plot_current () +void EqualizationToolsDialog::impl::plot_current () { auto phase_graph = make_plot_data_loader (&plot_, 2, wrap_pi); plot_.graph (2)->data ()->clear (); @@ -490,7 +490,7 @@ std::istream& operator >> (std::istream& is, PhasePoint& c) return is; } -void PhaseEqualizationDialog::impl::plot_phase () +void EqualizationToolsDialog::impl::plot_phase () { auto const& phase_file_name = QFileDialog::getOpenFileName (this , "Select Phase Response Coefficients" @@ -543,4 +543,4 @@ void PhaseEqualizationDialog::impl::plot_phase () } } -#include "moc_PhaseEqualizationDialog.cpp" +#include "moc_EqualizationToolsDialog.cpp" diff --git a/PhaseEqualizationDialog.hpp b/EqualizationToolsDialog.hpp similarity index 75% rename from PhaseEqualizationDialog.hpp rename to EqualizationToolsDialog.hpp index 93171ba03..0a259a339 100644 --- a/PhaseEqualizationDialog.hpp +++ b/EqualizationToolsDialog.hpp @@ -1,5 +1,5 @@ -#ifndef PHASE_EQUALIZATION_DIALOG_HPP__ -#define PHASE_EQUALIZATION_DIALOG_HPP__ +#ifndef EQUALIZATION_TOOLS_DIALOG_HPP__ +#define EQUALIZATION_TOOLS_DIALOG_HPP__ #include @@ -9,13 +9,13 @@ class QWidget; class QSettings; class QDir; -class PhaseEqualizationDialog +class EqualizationToolsDialog : public QObject { Q_OBJECT public: - explicit PhaseEqualizationDialog (QSettings * + explicit EqualizationToolsDialog (QSettings * , QDir const& data_directory , QVector const& coefficients , QWidget * = nullptr); diff --git a/mainwindow.cpp b/mainwindow.cpp index b08d606ca..b209ae849 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -56,7 +56,7 @@ #include "MultiSettings.hpp" #include "MaidenheadLocatorValidator.hpp" #include "CallsignValidator.hpp" -#include "PhaseEqualizationDialog.hpp" +#include "EqualizationToolsDialog.hpp" #include "ui_mainwindow.h" #include "moc_mainwindow.cpp" @@ -524,15 +524,15 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, }); connect (ui->view_phase_response_action, &QAction::triggered, [this] () { - if (!m_phaseEqualizationDialog) + if (!m_equalizationToolsDialog) { - m_phaseEqualizationDialog.reset (new PhaseEqualizationDialog {m_settings, m_config.writeable_data_dir (), m_phaseEqCoefficients, this}); - connect (m_phaseEqualizationDialog.data (), &PhaseEqualizationDialog::phase_equalization_changed, + m_equalizationToolsDialog.reset (new EqualizationToolsDialog {m_settings, m_config.writeable_data_dir (), m_phaseEqCoefficients, this}); + connect (m_equalizationToolsDialog.data (), &EqualizationToolsDialog::phase_equalization_changed, [this] (QVector const& coeffs) { m_phaseEqCoefficients = coeffs; }); } - m_phaseEqualizationDialog->show (); + m_equalizationToolsDialog->show (); }); QButtonGroup* txMsgButtonGroup = new QButtonGroup {this}; diff --git a/mainwindow.h b/mainwindow.h index 2a585afeb..e0546871d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -81,7 +81,7 @@ class SoundInput; class Detector; class SampleDownloader; class MultiSettings; -class PhaseEqualizationDialog; +class EqualizationToolsDialog; class MainWindow : public QMainWindow { @@ -319,7 +319,7 @@ private: bool m_WSPR_tx_next; MessageBox m_rigErrorMessageBox; QScopedPointer m_sampleDownloader; - QScopedPointer m_phaseEqualizationDialog; + QScopedPointer m_equalizationToolsDialog; QScopedPointer m_wideGraph; QScopedPointer m_echoGraph; diff --git a/mainwindow.ui b/mainwindow.ui index 689fcd158..2a7cdec33 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -2980,7 +2980,7 @@ QPushButton[state="ok"] { - View phase response ... + Equalization tools ...