Refactor phase equalization dialog names

Now  equlization  tools   as  it  covers  both   amplitude  and  phase
equalization.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7875 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2017-07-14 15:33:17 +00:00
parent afb6d0d4e2
commit b939ff33e3
6 changed files with 25 additions and 25 deletions

View File

@ -259,7 +259,7 @@ set (wsjt_qt_CXXSRCS
MaidenheadLocatorValidator.cpp MaidenheadLocatorValidator.cpp
CallsignValidator.cpp CallsignValidator.cpp
SplashScreen.cpp SplashScreen.cpp
PhaseEqualizationDialog.cpp EqualizationToolsDialog.cpp
) )
set (wsjt_qtmm_CXXSRCS set (wsjt_qtmm_CXXSRCS

View File

@ -1,4 +1,4 @@
#include "PhaseEqualizationDialog.hpp" #include "EqualizationToolsDialog.hpp"
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
@ -22,7 +22,7 @@
namespace namespace
{ {
float constexpr PI = 3.1415927f; float constexpr PI = 3.1415927f;
char const * const title = "Phase Equalization"; char const * const title = "Equalization Tools";
size_t constexpr intervals = 144; size_t constexpr intervals = 144;
// plot data loaders - wraps a plot providing value_type and // plot data loaders - wraps a plot providing value_type and
@ -219,13 +219,13 @@ namespace
auto pi_scaling = [] (float v) -> float {return v / PI;}; auto pi_scaling = [] (float v) -> float {return v / PI;};
} }
class PhaseEqualizationDialog::impl final class EqualizationToolsDialog::impl final
: public QDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit impl (PhaseEqualizationDialog * self, QSettings * settings explicit impl (EqualizationToolsDialog * self, QSettings * settings
, QDir const& data_directory, QVector<double> const& coefficients , QDir const& data_directory, QVector<double> const& coefficients
, QWidget * parent); , QWidget * parent);
~impl () {save_window_state ();} ~impl () {save_window_state ();}
@ -248,7 +248,7 @@ private:
void plot_phase (); void plot_phase ();
void plot_amplitude (); void plot_amplitude ();
PhaseEqualizationDialog * self_; EqualizationToolsDialog * self_;
QSettings * settings_; QSettings * settings_;
QDir data_directory_; QDir data_directory_;
QHBoxLayout layout_; QHBoxLayout layout_;
@ -261,9 +261,9 @@ private:
QDialogButtonBox button_box_; QDialogButtonBox button_box_;
}; };
#include "PhaseEqualizationDialog.moc" #include "EqualizationToolsDialog.moc"
PhaseEqualizationDialog::PhaseEqualizationDialog (QSettings * settings EqualizationToolsDialog::EqualizationToolsDialog (QSettings * settings
, QDir const& data_directory , QDir const& data_directory
, QVector<double> const& coefficients , QVector<double> const& coefficients
, QWidget * parent) , QWidget * parent)
@ -271,12 +271,12 @@ PhaseEqualizationDialog::PhaseEqualizationDialog (QSettings * settings
{ {
} }
void PhaseEqualizationDialog::show () void EqualizationToolsDialog::show ()
{ {
m_->show (); m_->show ();
} }
PhaseEqualizationDialog::impl::impl (PhaseEqualizationDialog * self EqualizationToolsDialog::impl::impl (EqualizationToolsDialog * self
, QSettings * settings , QSettings * settings
, QDir const& data_directory , QDir const& data_directory
, QVector<double> const& coefficients , QVector<double> const& coefficients
@ -428,7 +428,7 @@ std::istream& operator >> (std::istream& is, PowerSpectrumPoint& r)
return is; return is;
} }
void PhaseEqualizationDialog::impl::plot_current () void EqualizationToolsDialog::impl::plot_current ()
{ {
auto phase_graph = make_plot_data_loader (&plot_, 2, wrap_pi); auto phase_graph = make_plot_data_loader (&plot_, 2, wrap_pi);
plot_.graph (2)->data ()->clear (); plot_.graph (2)->data ()->clear ();
@ -490,7 +490,7 @@ std::istream& operator >> (std::istream& is, PhasePoint& c)
return is; return is;
} }
void PhaseEqualizationDialog::impl::plot_phase () void EqualizationToolsDialog::impl::plot_phase ()
{ {
auto const& phase_file_name = QFileDialog::getOpenFileName (this auto const& phase_file_name = QFileDialog::getOpenFileName (this
, "Select Phase Response Coefficients" , "Select Phase Response Coefficients"
@ -543,4 +543,4 @@ void PhaseEqualizationDialog::impl::plot_phase ()
} }
} }
#include "moc_PhaseEqualizationDialog.cpp" #include "moc_EqualizationToolsDialog.cpp"

View File

@ -1,5 +1,5 @@
#ifndef PHASE_EQUALIZATION_DIALOG_HPP__ #ifndef EQUALIZATION_TOOLS_DIALOG_HPP__
#define PHASE_EQUALIZATION_DIALOG_HPP__ #define EQUALIZATION_TOOLS_DIALOG_HPP__
#include <QObject> #include <QObject>
@ -9,13 +9,13 @@ class QWidget;
class QSettings; class QSettings;
class QDir; class QDir;
class PhaseEqualizationDialog class EqualizationToolsDialog
: public QObject : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit PhaseEqualizationDialog (QSettings * explicit EqualizationToolsDialog (QSettings *
, QDir const& data_directory , QDir const& data_directory
, QVector<double> const& coefficients , QVector<double> const& coefficients
, QWidget * = nullptr); , QWidget * = nullptr);

View File

@ -56,7 +56,7 @@
#include "MultiSettings.hpp" #include "MultiSettings.hpp"
#include "MaidenheadLocatorValidator.hpp" #include "MaidenheadLocatorValidator.hpp"
#include "CallsignValidator.hpp" #include "CallsignValidator.hpp"
#include "PhaseEqualizationDialog.hpp" #include "EqualizationToolsDialog.hpp"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "moc_mainwindow.cpp" #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] () { 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}); m_equalizationToolsDialog.reset (new EqualizationToolsDialog {m_settings, m_config.writeable_data_dir (), m_phaseEqCoefficients, this});
connect (m_phaseEqualizationDialog.data (), &PhaseEqualizationDialog::phase_equalization_changed, connect (m_equalizationToolsDialog.data (), &EqualizationToolsDialog::phase_equalization_changed,
[this] (QVector<double> const& coeffs) { [this] (QVector<double> const& coeffs) {
m_phaseEqCoefficients = coeffs; m_phaseEqCoefficients = coeffs;
}); });
} }
m_phaseEqualizationDialog->show (); m_equalizationToolsDialog->show ();
}); });
QButtonGroup* txMsgButtonGroup = new QButtonGroup {this}; QButtonGroup* txMsgButtonGroup = new QButtonGroup {this};

View File

@ -81,7 +81,7 @@ class SoundInput;
class Detector; class Detector;
class SampleDownloader; class SampleDownloader;
class MultiSettings; class MultiSettings;
class PhaseEqualizationDialog; class EqualizationToolsDialog;
class MainWindow : public QMainWindow class MainWindow : public QMainWindow
{ {
@ -319,7 +319,7 @@ private:
bool m_WSPR_tx_next; bool m_WSPR_tx_next;
MessageBox m_rigErrorMessageBox; MessageBox m_rigErrorMessageBox;
QScopedPointer<SampleDownloader> m_sampleDownloader; QScopedPointer<SampleDownloader> m_sampleDownloader;
QScopedPointer<PhaseEqualizationDialog> m_phaseEqualizationDialog; QScopedPointer<EqualizationToolsDialog> m_equalizationToolsDialog;
QScopedPointer<WideGraph> m_wideGraph; QScopedPointer<WideGraph> m_wideGraph;
QScopedPointer<EchoGraph> m_echoGraph; QScopedPointer<EchoGraph> m_echoGraph;

View File

@ -2980,7 +2980,7 @@ QPushButton[state=&quot;ok&quot;] {
</action> </action>
<action name="view_phase_response_action"> <action name="view_phase_response_action">
<property name="text"> <property name="text">
<string>View phase response ...</string> <string>Equalization tools ...</string>
</property> </property>
</action> </action>
<action name="actionWSPR_LF"> <action name="actionWSPR_LF">