From 4e96e58d57ef2cb2ebe287da45b56a15a2a47f16 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 11 Mar 2022 14:58:13 -0500 Subject: [PATCH] Starting to change arrl_digi to activeStations. --- widgets/arrl_digi.cpp | 36 ++++++++++++++++++------------------ widgets/arrl_digi.h | 12 ++++++------ widgets/arrl_digi.ui | 6 +++--- widgets/mainwindow.cpp | 12 ++++++------ widgets/mainwindow.h | 4 ++-- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/widgets/arrl_digi.cpp b/widgets/arrl_digi.cpp index b42738f28..9dc80ab3d 100644 --- a/widgets/arrl_digi.cpp +++ b/widgets/arrl_digi.cpp @@ -10,40 +10,40 @@ #include "moc_arrl_digi.cpp" -ARRL_Digi::ARRL_Digi(QSettings * settings, QFont const& font, QWidget *parent) : +ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget *parent) : QWidget(parent), settings_ {settings}, - ui(new Ui::ARRL_Digi) + ui(new Ui::ActiveStations) { ui->setupUi(this); setWindowTitle (QApplication::applicationName () + " - " + tr ("ARRL International Digital Contest")); - ui->ARRL_DigiPlainTextEdit->setReadOnly (true); + ui->ActiveStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); ui->header_label->setText("Pts Call Grid Az S/N Dial Freq"); } -ARRL_Digi::~ARRL_Digi() +ActiveStations::~ActiveStations() { write_settings (); } -void ARRL_Digi::changeFont (QFont const& font) +void ActiveStations::changeFont (QFont const& font) { ui->header_label->setStyleSheet (font_as_stylesheet (font)); - ui->ARRL_DigiPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); + ui->ActiveStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); setContentFont (font); updateGeometry (); } -void ARRL_Digi::setContentFont(QFont const& font) +void ActiveStations::setContentFont(QFont const& font) { - ui->ARRL_DigiPlainTextEdit->setFont (font); + ui->ActiveStationsPlainTextEdit->setFont (font); QTextCharFormat charFormat; charFormat.setFont (font); - ui->ARRL_DigiPlainTextEdit->selectAll (); - auto cursor = ui->ARRL_DigiPlainTextEdit->textCursor (); + ui->ActiveStationsPlainTextEdit->selectAll (); + auto cursor = ui->ActiveStationsPlainTextEdit->textCursor (); cursor.mergeCharFormat (charFormat); cursor.clearSelection (); cursor.movePosition (QTextCursor::End); @@ -52,23 +52,23 @@ void ARRL_Digi::setContentFont(QFont const& font) cursor.movePosition (QTextCursor::Up); cursor.movePosition (QTextCursor::StartOfLine); - ui->ARRL_DigiPlainTextEdit->setTextCursor (cursor); - ui->ARRL_DigiPlainTextEdit->ensureCursorVisible (); + ui->ActiveStationsPlainTextEdit->setTextCursor (cursor); + ui->ActiveStationsPlainTextEdit->ensureCursorVisible (); } -void ARRL_Digi::read_settings () +void ActiveStations::read_settings () { - SettingsGroup group {settings_, "ARRL_Digi"}; + SettingsGroup group {settings_, "ActiveStations"}; restoreGeometry (settings_->value ("window/geometry").toByteArray ()); } -void ARRL_Digi::write_settings () +void ActiveStations::write_settings () { - SettingsGroup group {settings_, "ARRL_Digi"}; + SettingsGroup group {settings_, "ActiveStations"}; settings_->setValue ("window/geometry", saveGeometry ()); } -void ARRL_Digi::displayARRL_Digi(QString const& t) +void ActiveStations::displayActiveStations(QString const& t) { - ui->ARRL_DigiPlainTextEdit->setPlainText(t); + ui->ActiveStationsPlainTextEdit->setPlainText(t); } diff --git a/widgets/arrl_digi.h b/widgets/arrl_digi.h index 443803d30..24bda01ac 100644 --- a/widgets/arrl_digi.h +++ b/widgets/arrl_digi.h @@ -8,18 +8,18 @@ class QSettings; class QFont; namespace Ui { - class ARRL_Digi; + class ActiveStations; } -class ARRL_Digi +class ActiveStations : public QWidget { Q_OBJECT public: - explicit ARRL_Digi(QSettings *, QFont const&, QWidget * parent = 0); - ~ARRL_Digi(); - void displayARRL_Digi(QString const&); + explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0); + ~ActiveStations(); + void displayActiveStations(QString const&); void changeFont (QFont const&); private: @@ -28,7 +28,7 @@ private: void setContentFont (QFont const&); QSettings * settings_; - QScopedPointer ui; + QScopedPointer ui; }; #endif diff --git a/widgets/arrl_digi.ui b/widgets/arrl_digi.ui index 9a598b236..4ab3ea464 100644 --- a/widgets/arrl_digi.ui +++ b/widgets/arrl_digi.ui @@ -1,7 +1,7 @@ - ARRL_Digi - + ActiveStations + 0 @@ -17,7 +17,7 @@ - + QPlainTextEdit::NoWrap diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 70d98198a..53a72fe0b 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2758,15 +2758,15 @@ void MainWindow::on_actionMessage_averaging_triggered() void MainWindow::on_actionARRL_Intl_Digi_triggered() { - if(m_ARRL_DigiWidget == NULL) { - m_ARRL_DigiWidget.reset (new ARRL_Digi {m_settings, m_config.decoded_text_font ()}); + if(m_ActiveStationsWidget == NULL) { + m_ActiveStationsWidget.reset (new ActiveStations {m_settings, m_config.decoded_text_font ()}); // Connect signals from Message Averaging window - connect (this, &MainWindow::finished, m_ARRL_DigiWidget.data (), &ARRL_Digi::close); + connect (this, &MainWindow::finished, m_ActiveStationsWidget.data (), &ActiveStations::close); } - m_ARRL_DigiWidget->showNormal(); - m_ARRL_DigiWidget->raise(); - m_ARRL_DigiWidget->activateWindow(); + m_ActiveStationsWidget->showNormal(); + m_ActiveStationsWidget->raise(); + m_ActiveStationsWidget->activateWindow(); } void MainWindow::on_actionOpen_triggered() //Open File diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index fd115e66d..fc28bbc34 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -78,7 +78,7 @@ class WideGraph; class LogQSO; class Transceiver; class MessageAveraging; -class ARRL_Digi; +class ActiveStations; class FoxLogWindow; class CabrilloLogWindow; class ColorHighlighting; @@ -400,7 +400,7 @@ private: QScopedPointer m_prefixes; QScopedPointer m_mouseCmnds; QScopedPointer m_msgAvgWidget; - QScopedPointer m_ARRL_DigiWidget; + QScopedPointer m_ActiveStationsWidget; QScopedPointer m_foxLogWindow; QScopedPointer m_contestLogWindow; QScopedPointer m_colorHighlighting;