From b12d5488ff621d34c551893eb170c9fc65ff3a27 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 22 Mar 2024 15:02:40 -0400 Subject: [PATCH] Add GUI widgets for free text messages from SuperFox. --- widgets/mainwindow.cpp | 8 + widgets/mainwindow.h | 3 + widgets/mainwindow.ui | 321 +++++++++++++++++++++-------------------- 3 files changed, 173 insertions(+), 159 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index c93afcc57..113601437 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -9872,6 +9872,14 @@ void MainWindow::on_pbFoxReset_clicked() } } +void MainWindow::on_pbFreeText_clicked() +{ + bool ok; + m_freeTextMsg = QInputDialog::getText (this, tr("Free Text Message"), + tr("Message:"), QLineEdit::Normal, m_freeTextMsg0, &ok); + if(ok) m_freeTextMsg0=m_freeTextMsg; +} + void MainWindow::on_comboBoxHoundSort_activated(int index) { if(index!=-99) houndCallers(); //Silence compiler warning diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 6a8e44c9d..a42958ae6 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -329,6 +329,7 @@ private slots: void on_sbF_High_valueChanged(int n); void chk_FST4_freq_range(); void on_pbFoxReset_clicked(); + void on_pbFreeText_clicked(); void FoxReset(QString reason); void on_comboBoxHoundSort_activated (int index); void not_GA_warning_message (); @@ -676,6 +677,8 @@ private: QString m_BestCQpriority; QString m_deCall; QString m_deGrid; + QString m_freeTextMsg; + QString m_freeTextMsg0; QString m_ready2call[50]; QString m_callers[50]; diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 021062705..e15e543d2 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -42,6 +42,7 @@ 10 + 50 false @@ -185,6 +186,7 @@ 10 + 50 false @@ -2054,15 +2056,15 @@ Double-click to reset to the standard 73 message 4 - + 0 6 - - + + 0 @@ -2075,37 +2077,18 @@ Double-click to reset to the standard 73 message 16777215 - - Random + + Max dB - - 5 + + -15 + + + 70 + + + 30 - - - Random - - - - - Call - - - - - Grid - - - - - S/N (dB) - - - - - Distance - - @@ -2123,6 +2106,57 @@ Double-click to reset to the standard 73 message + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + N Slots + + + 1 + + + 5 + + + 1 + + + 10 + + + + + + + In Progress + + + Qt::AlignCenter + + + + + + + Reset + + + @@ -2227,6 +2261,94 @@ Double-click to reset to the standard 73 message + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + QAbstractScrollArea::AdjustToContentsOnFirstShow + + + + + + + true + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + QAbstractScrollArea::AdjustToContentsOnFirstShow + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Random + + + 5 + + + + Random + + + + + Call + + + + + Grid + + + + + S/N (dB) + + + + + Distance + + + + @@ -2255,136 +2377,17 @@ Double-click to reset to the standard 73 message - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Max dB - - - -15 - - - 70 - - - 30 - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - - - N Slots - - - 1 - - - 5 - - - 1 - - - 10 - - - - - - - Reset - - - - - - - In Progress - - - Qt::AlignCenter - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - true - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - QAbstractScrollArea::AdjustToContentsOnFirstShow + + + Free Text - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - QAbstractScrollArea::AdjustToContentsOnFirstShow + + + + Send it @@ -3189,7 +3192,7 @@ QPushButton[state="ok"] { 0 0 880 - 22 + 21