mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 11:31:51 -05:00
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:
parent
afb6d0d4e2
commit
b939ff33e3
@ -259,7 +259,7 @@ set (wsjt_qt_CXXSRCS
|
||||
MaidenheadLocatorValidator.cpp
|
||||
CallsignValidator.cpp
|
||||
SplashScreen.cpp
|
||||
PhaseEqualizationDialog.cpp
|
||||
EqualizationToolsDialog.cpp
|
||||
)
|
||||
|
||||
set (wsjt_qtmm_CXXSRCS
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "PhaseEqualizationDialog.hpp"
|
||||
#include "EqualizationToolsDialog.hpp"
|
||||
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
@ -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<double> 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<double> 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<double> 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"
|
@ -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 <QObject>
|
||||
|
||||
@ -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<double> const& coefficients
|
||||
, QWidget * = nullptr);
|
@ -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<double> const& coeffs) {
|
||||
m_phaseEqCoefficients = coeffs;
|
||||
});
|
||||
}
|
||||
m_phaseEqualizationDialog->show ();
|
||||
m_equalizationToolsDialog->show ();
|
||||
});
|
||||
|
||||
QButtonGroup* txMsgButtonGroup = new QButtonGroup {this};
|
||||
|
@ -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<SampleDownloader> m_sampleDownloader;
|
||||
QScopedPointer<PhaseEqualizationDialog> m_phaseEqualizationDialog;
|
||||
QScopedPointer<EqualizationToolsDialog> m_equalizationToolsDialog;
|
||||
|
||||
QScopedPointer<WideGraph> m_wideGraph;
|
||||
QScopedPointer<EchoGraph> m_echoGraph;
|
||||
|
@ -2980,7 +2980,7 @@ QPushButton[state="ok"] {
|
||||
</action>
|
||||
<action name="view_phase_response_action">
|
||||
<property name="text">
|
||||
<string>View phase response ...</string>
|
||||
<string>Equalization tools ...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWSPR_LF">
|
||||
|
Loading…
Reference in New Issue
Block a user