diff options
Diffstat (limited to 'widgets')
| -rw-r--r-- | widgets/MultiGeometryWidget.hpp | 92 | ||||
| -rw-r--r-- | widgets/about.cpp | 4 | ||||
| -rw-r--r-- | widgets/colorhighlighting.cpp | 10 | ||||
| -rw-r--r-- | widgets/displaytext.cpp | 1 | ||||
| -rw-r--r-- | widgets/displaytext.h | 3 | ||||
| -rw-r--r-- | widgets/logqso.cpp | 4 | ||||
| -rw-r--r-- | widgets/mainwindow.cpp | 171 | ||||
| -rw-r--r-- | widgets/mainwindow.h | 11 | ||||
| -rw-r--r-- | widgets/mainwindow.ui | 1199 | ||||
| -rw-r--r-- | widgets/widegraph.cpp | 37 | ||||
| -rw-r--r-- | widgets/widegraph.h | 2 |
11 files changed, 862 insertions, 672 deletions
diff --git a/widgets/MultiGeometryWidget.hpp b/widgets/MultiGeometryWidget.hpp new file mode 100644 index 00000000..a9386189 --- /dev/null +++ b/widgets/MultiGeometryWidget.hpp @@ -0,0 +1,92 @@ +#ifndef MULTI_GEOMETRY_WIDGET_HPP__ +#define MULTI_GEOMETRY_WIDGET_HPP__ + +#include <cstddef> +#include <utility> +#include <array> + +#include <QWidget> +#include <QByteArray> +#include <QEvent> + +// +// Class MultiGeometryWidget<N, Widget> - Decorate a QWidget type with +// switchable geometries +// +// The abstract base class imbues a Qt Widget type with N alternative +// geometries. Sub-classes can initialise the currently selected +// geometry and the initial geometries using geometries. To switch +// geometry call select_geometry(n) which saves the current geometry +// and switches to the n'th saved geometry. +// +template<std::size_t N, typename Widget=QWidget> +class MultiGeometryWidget + : public Widget +{ +public: + template<typename... Args> + explicit MultiGeometryWidget (Args&&... args) + : Widget {std::forward<Args> (args)...} + , current_geometry_ {0} + { + } + + void geometries (std::size_t current + , std::array<QByteArray, N> const& the_geometries = std::array<QByteArray, N> {}) + { + Q_ASSERT (current < the_geometries.size ()); + saved_geometries_ = the_geometries; + current_geometry_ = current; + Widget::restoreGeometry (saved_geometries_[current_geometry_]); + } + + std::array<QByteArray, N> const& geometries () const {return saved_geometries_;} + std::size_t current () {return current_geometry_;} + + // Call this to select a new geometry denoted by the 'n' argument, + // any actual layout changes should be made in the implementation of + // the change_layout operation below. + void select_geometry (std::size_t n) + { + Q_ASSERT (n < N); + auto geometry = Widget::saveGeometry (); + change_layout (n); + saved_geometries_[current_geometry_] = geometry; + current_geometry_ = n; + + // Defer restoration of the window geometry until the layour + // request event has been processed, this is necessary otherwise + // the final geometry may be affected by widgets not shown in the + // new layout. + desired_geometry_ = saved_geometries_[n]; + } + +protected: + virtual ~MultiGeometryWidget () {} + +private: + // Override this operation to implement any layout changes for the + // geometry specified by the argument 'n'. + virtual void change_layout (std::size_t n) = 0; + + bool event (QEvent * e) override + { + auto ret = Widget::event (e); + if (QEvent::LayoutRequest == e->type () + && desired_geometry_.size ()) + { + // Restore the new desired geometry and flag that we have done + // so by clearing the desired_geometry_ member variable. + QByteArray geometry; + std::swap (geometry, desired_geometry_); + Widget::restoreGeometry (geometry); + } + return ret; + } + + std::size_t current_geometry_; + std::array<QByteArray, N> saved_geometries_; + QByteArray desired_geometry_; +}; + +#endif diff --git a/widgets/about.cpp b/widgets/about.cpp index b8e0fab4..7989f5c9 100644 --- a/widgets/about.cpp +++ b/widgets/about.cpp @@ -18,12 +18,12 @@ CAboutDlg::CAboutDlg(QWidget *parent) : + " " + revision ()}.simplified () + "</h2><br />" "WSJT-X implements a number of digital modes designed for <br />" "weak-signal Amateur Radio communication. <br /><br />" - "© 2001-2020 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />" + "© 2001-2021 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />" "and Steve Franke, K9AN. <br /><br />" "We gratefully acknowledge contributions from AC6SL, AE4JY,<br />" "DF2ET, DJ0OT, G3WDG, G4KLA, IV3NWV, IW3RAB, KA1GT, K3WYC,<br />" "KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KI7MT, KK1D, ND0B, PY2SDR,<br />" - "VE1SKY, VK3ACF, VK4BDJ, VK7MO, W4TI, W4TV, and W9MDB.<br /><br />" + "VE1SKY, VK3ACF, VK4BDJ, VK7MO, W3DJS, W4TI, W4TV, and W9MDB.<br /><br />" "WSJT-X is licensed under the terms of Version 3 <br />" "of the GNU General Public License (GPL) <br /><br />" "<a href=" TO_STRING__ (PROJECT_HOMEPAGE) ">" diff --git a/widgets/colorhighlighting.cpp b/widgets/colorhighlighting.cpp index 6ad0bd4d..e7e9dedd 100644 --- a/widgets/colorhighlighting.cpp +++ b/widgets/colorhighlighting.cpp @@ -1,7 +1,7 @@ #include "colorhighlighting.h" #include <QApplication> -#include <QDebug> +#include <QString> #include "SettingsGroup.hpp" #include "models/DecodeHighlightingModel.hpp" @@ -113,16 +113,16 @@ void ColorHighlighting::set_items (DecodeHighlightingModel const& highlighting_m default: continue; } - auto palette = example->parentWidget ()->palette (); + auto style_sheet = example->parentWidget ()->styleSheet (); if (Qt::NoBrush != item.background_.style ()) { - palette.setColor (QPalette::Window, item.background_.color ()); + style_sheet += QString {"; background-color: #%1"}.arg (item.background_.color ().rgb (), 8, 16, QLatin1Char {'0'}); } if (Qt::NoBrush != item.foreground_.style ()) { - palette.setColor (QPalette::WindowText, item.foreground_.color ()); + style_sheet += QString {"; color: #%1"}.arg (item.foreground_.color ().rgb (), 8, 16, QLatin1Char {'0'}); } - example->setPalette (palette); + example->setStyleSheet (style_sheet); example->setEnabled (item.enabled_); label->setText (DecodeHighlightingModel::highlight_name (item.type_)); label->setEnabled (item.enabled_); diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index d498f180..b083defc 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -15,6 +15,7 @@ #include <QScrollBar> #include "Configuration.hpp" +#include "Decoder/decodedtext.h" #include "Network/LotWUsers.hpp" #include "models/DecodeHighlightingModel.hpp" #include "logbook/logbook.h" diff --git a/widgets/displaytext.h b/widgets/displaytext.h index 3b577e61..773901ce 100644 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -8,11 +8,10 @@ #include <QPair> #include <QString> -#include "Decoder/decodedtext.h" - class QAction; class Configuration; class LogBook; +class DecodedText; class DisplayText : public QTextEdit diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp index 7a74b86c..f4927449 100644 --- a/widgets/logqso.cpp +++ b/widgets/logqso.cpp @@ -1,5 +1,6 @@ #include "logqso.h" +#include <QLocale> #include <QString> #include <QSettings> #include <QStandardPaths> @@ -61,6 +62,9 @@ LogQSO::LogQSO(QString const& programTitle, QSettings * settings ui->comboBoxPropMode->addItem (prop_mode.name_, prop_mode.id_); } loadSettings (); + auto date_time_format = QLocale {}.dateFormat (QLocale::ShortFormat) + " hh:mm:ss"; + ui->start_date_time->setDisplayFormat (date_time_format); + ui->end_date_time->setDisplayFormat (date_time_format); ui->grid->setValidator (new MaidenheadLocatorValidator {this}); } diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index cd260df5..bec116e6 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -211,8 +211,8 @@ namespace QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"}; auto quint32_max = std::numeric_limits<quint32>::max (); constexpr int N_WIDGETS {36}; - constexpr int rx_chunk_size {3456}; // audio samples at 12000 Hz - constexpr int tx_audio_buffer_size {48000 / 5}; // audio frames at 48000 Hz + constexpr int default_rx_audio_buffer_frames {-1}; // lets Qt decide + constexpr int default_tx_audio_buffer_frames {-1}; // lets Qt decide bool message_is_73 (int type, QStringList const& msg_parts) { @@ -236,7 +236,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, MultiSettings * multi_settings, QSharedMemory *shdmem, unsigned downSampleFactor, QSplashScreen * splash, QProcessEnvironment const& env, QWidget *parent) : - QMainWindow(parent), + MultiGeometryWidget {parent}, m_env {env}, m_network_manager {this}, m_valid {true}, @@ -265,6 +265,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_soundInput {new SoundInput}, m_modulator {new Modulator {TX_SAMPLE_RATE, NTMAX}}, m_soundOutput {new SoundOutput}, + m_rx_audio_buffer_frames {0}, + m_tx_audio_buffer_frames {0}, m_msErase {0}, m_secBandChanged {0}, m_freqNominal {0}, @@ -455,6 +457,11 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_modulator->moveToThread (&m_audioThread); m_soundInput->moveToThread (&m_audioThread); m_detector->moveToThread (&m_audioThread); + bool ok; + auto buffer_size = env.value ("WSJT_RX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok); + m_rx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_rx_audio_buffer_frames; + buffer_size = env.value ("WSJT_TX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok); + m_tx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_tx_audio_buffer_frames; // hook up sound output stream slots & signals and disposal connect (this, &MainWindow::initializeAudioOutputStream, m_soundOutput, &SoundOutput::setFormat); @@ -935,14 +942,14 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, if (!m_config.audio_input_device ().isNull ()) { Q_EMIT startAudioInputStream (m_config.audio_input_device () - , rx_chunk_size * m_downSampleFactor + , m_rx_audio_buffer_frames , m_detector, m_downSampleFactor, m_config.audio_input_channel ()); } if (!m_config.audio_output_device ().isNull ()) { Q_EMIT initializeAudioOutputStream (m_config.audio_output_device () , AudioDevice::Mono == m_config.audio_output_channel () ? 1 : 2 - , tx_audio_buffer_size); + , m_tx_audio_buffer_frames); } Q_EMIT transmitFrequency (ui->TxFreqSpinBox->value () - m_XIT); @@ -1022,10 +1029,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } ui->pbBestSP->setVisible(m_mode=="FT4"); - if(!ui->cbMenus->isChecked()) { - ui->cbMenus->setChecked(true); - ui->cbMenus->setChecked(false); - } + // this must be the last statement of constructor if (!m_valid) throw std::runtime_error {"Fatal initialization exception"}; } @@ -1035,9 +1039,9 @@ void MainWindow::not_GA_warning_message () MessageBox::critical_message (this, "This is a pre-release version of WSJT-X 2.3.0 made\n" "available for testing purposes. By design it will\n" - "be nonfunctional after 0000 UTC on Jan 19, 2021."); + "be nonfunctional after 0000 UTC on Jan 26, 2021."); auto now = QDateTime::currentDateTimeUtc (); - if (now >= QDateTime {{2021, 1, 19}, {0, 0}, Qt::UTC}) { + if (now >= QDateTime {{2021, 1, 26}, {0, 0}, Qt::UTC}) { Q_EMIT finished (); } } @@ -1094,8 +1098,33 @@ MainWindow::~MainWindow() void MainWindow::writeSettings() { m_settings->beginGroup("MainWindow"); - m_settings->setValue ("geometry", saveGeometry ()); - m_settings->setValue ("geometryNoControls", m_geometryNoControls); + if (ui->actionSWL_Mode->isChecked ()) + { + m_settings->setValue ("SWLView", true); + m_settings->setValue ("ShowMenus", ui->cbMenus->isChecked ()); + m_settings->setValue ("geometry", geometries ()[0]); + m_settings->setValue ("SWLModeGeometry", saveGeometry ()); + m_settings->setValue ("geometryNoControls", geometries ()[2]); + } + else + { + if (ui->cbMenus->isChecked()) + { + m_settings->setValue ("SWLView", ui->actionSWL_Mode->isChecked ()); + m_settings->setValue ("ShowMenus", true); + m_settings->setValue ("geometry", saveGeometry ()); + m_settings->setValue ("SWLModeGeometry", geometries ()[1]); + m_settings->setValue ("geometryNoControls", geometries ()[2]); + } + else + { + m_settings->setValue ("SWLView", ui->actionSWL_Mode->isChecked ()); + m_settings->setValue ("ShowMenus", false); + m_settings->setValue ("geometry", geometries ()[0]); + m_settings->setValue ("SWLModeGeometry", geometries ()[1]); + m_settings->setValue ("geometryNoControls", saveGeometry ()); + } + } m_settings->setValue ("state", saveState ()); m_settings->setValue("MRUdir", m_path); m_settings->setValue("TxFirst",m_txFirst); @@ -1105,7 +1134,6 @@ void MainWindow::writeSettings() m_settings->setValue ("MsgAvgDisplayed", m_msgAvgWidget && m_msgAvgWidget->isVisible ()); m_settings->setValue ("FoxLogDisplayed", m_foxLogWindow && m_foxLogWindow->isVisible ()); m_settings->setValue ("ContestLogDisplayed", m_contestLogWindow && m_contestLogWindow->isVisible ()); - m_settings->setValue("ShowMenus",ui->cbMenus->isChecked()); m_settings->setValue("CallFirst",ui->cbFirst->isChecked()); m_settings->setValue("HoundSort",ui->comboBoxHoundSort->currentIndex()); m_settings->setValue("FoxNlist",ui->sbNlist->value()); @@ -1159,9 +1187,8 @@ void MainWindow::writeSettings() m_settings->setValue("pwrBandTuneMemory",m_pwrBandTuneMemory); m_settings->setValue ("FT8AP", ui->actionEnable_AP_FT8->isChecked ()); m_settings->setValue ("JT65AP", ui->actionEnable_AP_JT65->isChecked ()); - m_settings->setValue("SplitterState",ui->splitter->saveState()); + m_settings->setValue("SplitterState",ui->decodes_splitter->saveState()); m_settings->setValue("Blanker",ui->sbNB->value()); - m_settings->setValue ("SWLView", ui->actionSWL_Mode->isChecked ()); { QList<QVariant> coeffs; // suitable for QSettings @@ -1180,8 +1207,17 @@ void MainWindow::readSettings() ui->cbAutoSeq->setVisible(false); ui->cbFirst->setVisible(false); m_settings->beginGroup("MainWindow"); - restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ()); - m_geometryNoControls = m_settings->value ("geometryNoControls",saveGeometry()).toByteArray(); + std::array<QByteArray, 3> the_geometries; + the_geometries[0] = m_settings->value ("geometry", saveGeometry ()).toByteArray (); + the_geometries[1] = m_settings->value ("SWLModeGeometry", saveGeometry ()).toByteArray (); + the_geometries[2] = m_settings->value ("geometryNoControls", saveGeometry ()).toByteArray (); + auto SWL_mode = m_settings->value ("SWLView", false).toBool (); + auto show_menus = m_settings->value ("ShowMenus", true).toBool (); + ui->actionSWL_Mode->setChecked (SWL_mode); + ui->cbMenus->setChecked (show_menus); + auto current_view_mode = SWL_mode ? 1 : show_menus ? 0 : 2; + change_layout (current_view_mode); + geometries (current_view_mode, the_geometries); restoreState (m_settings->value ("state", saveState ()).toByteArray ()); ui->dxCallEntry->setText (m_settings->value ("DXcall", QString {}).toString ()); ui->dxGridEntry->setText (m_settings->value ("DXgrid", QString {}).toString ()); @@ -1191,7 +1227,6 @@ void MainWindow::readSettings() auto displayMsgAvg = m_settings->value ("MsgAvgDisplayed", false).toBool (); auto displayFoxLog = m_settings->value ("FoxLogDisplayed", false).toBool (); auto displayContestLog = m_settings->value ("ContestLogDisplayed", false).toBool (); - ui->cbMenus->setChecked(m_settings->value("ShowMenus",true).toBool()); ui->cbFirst->setChecked(m_settings->value("CallFirst",true).toBool()); ui->comboBoxHoundSort->setCurrentIndex(m_settings->value("HoundSort",3).toInt()); ui->sbNlist->setValue(m_settings->value("FoxNlist",12).toInt()); @@ -1265,10 +1300,8 @@ void MainWindow::readSettings() m_pwrBandTuneMemory=m_settings->value("pwrBandTuneMemory").toHash(); ui->actionEnable_AP_FT8->setChecked (m_settings->value ("FT8AP", false).toBool()); ui->actionEnable_AP_JT65->setChecked (m_settings->value ("JT65AP", false).toBool()); - ui->splitter->restoreState(m_settings->value("SplitterState").toByteArray()); + ui->decodes_splitter->restoreState(m_settings->value("SplitterState").toByteArray()); ui->sbNB->setValue(m_settings->value("Blanker",0).toInt()); - ui->actionSWL_Mode->setChecked (m_settings->value ("SWLView", false).toBool ()); - on_actionSWL_Mode_triggered (ui->actionSWL_Mode->isChecked ()); { auto const& coeffs = m_settings->value ("PhaseEqualizationCoefficients" , QList<QVariant> {0., 0., 0., 0., 0.}).toList (); @@ -1567,7 +1600,7 @@ void MainWindow::dataSink(qint64 frames) m_saveWAVWatcher.setFuture (QtConcurrent::run (std::bind (&MainWindow::save_wave_file, this, m_fnameWE, &dec_data.d2[0], samples, m_config.my_callsign(), m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid))); - if (m_mode=="WSPR" or m_mode=="FST4W") { + if (m_mode=="WSPR") { QString c2name_string {m_fnameWE + ".c2"}; int len1=c2name_string.length(); char c2name[80]; @@ -1821,7 +1854,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog if(m_config.restart_audio_input () && !m_config.audio_input_device ().isNull ()) { Q_EMIT startAudioInputStream (m_config.audio_input_device () - , rx_chunk_size * m_downSampleFactor + , m_rx_audio_buffer_frames , m_detector, m_downSampleFactor , m_config.audio_input_channel ()); } @@ -1829,7 +1862,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog if(m_config.restart_audio_output () && !m_config.audio_output_device ().isNull ()) { Q_EMIT initializeAudioOutputStream (m_config.audio_output_device () , AudioDevice::Mono == m_config.audio_output_channel () ? 1 : 2 - , tx_audio_buffer_size); + , m_tx_audio_buffer_frames); } displayDialFrequency (); @@ -2561,44 +2594,59 @@ void MainWindow::on_actionCopyright_Notice_triggered() "\"The algorithms, source code, look-and-feel of WSJT-X and related " "programs, and protocol specifications for the modes FSK441, FT8, JT4, " "JT6M, JT9, JT65, JTMS, QRA64, ISCAT, MSK144 are Copyright (C) " - "2001-2020 by one or more of the following authors: Joseph Taylor, " + "2001-2021 by one or more of the following authors: Joseph Taylor, " "K1JT; Bill Somerville, G4WJS; Steven Franke, K9AN; Nico Palermo, " "IV3NWV; Greg Beam, KI7MT; Michael Black, W9MDB; Edson Pereira, PY2SDR; " "Philip Karn, KA9Q; and other members of the WSJT Development Group.\""); MessageBox::warning_message(this, message); } -void MainWindow::on_actionSWL_Mode_triggered (bool checked) +// Implement the MultiGeometryWidget::change_layout() operation. +void MainWindow::change_layout (std::size_t n) { - ui->lower_panel_widget->setVisible (!checked); - if (checked) + switch (n) { - hideMenus (false); // make sure we can be turned off + case 1: // SWL view + ui->menuBar->show (); + ui->lower_panel_widget->hide (); + trim_view (false); // ensure we can switch back + break; + + case 2: // hide menus view + ui->menuBar->hide (); + ui->lower_panel_widget->show (); + trim_view (true); + break; + + default: // normal view + ui->menuBar->setVisible (ui->cbMenus->isChecked ()); + ui->lower_panel_widget->show (); + trim_view (!ui->cbMenus->isChecked ()); + break; } } +void MainWindow::on_actionSWL_Mode_triggered (bool checked) +{ + select_geometry (checked ? 1 : ui->cbMenus->isChecked () ? 0 : 2); +} + // This allows the window to shrink by removing certain things // and reducing space used by controls -void MainWindow::hideMenus(bool checked) +void MainWindow::trim_view (bool checked) { int spacing = checked ? 1 : 6; if (checked) { statusBar ()->removeWidget (&auto_tx_label); - minimumSize().setHeight(450); - minimumSize().setWidth(700); - restoreGeometry(m_geometryNoControls); - updateGeometry(); } else { - m_geometryNoControls = saveGeometry(); statusBar ()->addWidget(&auto_tx_label); - minimumSize().setHeight(520); - minimumSize().setWidth(770); } - ui->menuBar->setVisible(!checked); - if(m_mode!="FreqCal" and m_mode!="WSPR" and m_mode!="FST4W") { + if (m_mode != "FreqCal" && m_mode != "WSPR" && m_mode != "FST4W") { ui->lh_decodes_title_label->setVisible(!checked); + ui->rh_decodes_title_label->setVisible(!checked); } ui->lh_decodes_headings_label->setVisible(!checked); + ui->rh_decodes_headings_label->setVisible(!checked); ui->gridLayout_5->layout()->setSpacing(spacing); ui->horizontalLayout_2->layout()->setSpacing(spacing); ui->horizontalLayout_5->layout()->setSpacing(spacing); @@ -3025,8 +3073,8 @@ void MainWindow::decode() //decode() dec_data.params.nutc=dec_data.params.nutc/100; } if(dec_data.params.nagain==0 && dec_data.params.newdat==1 && (!m_diskData)) { - auto t_start = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc (), m_TRperiod * 1.e3); - auto t = t_start.time (); + m_dateTimeSeqStart = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc (), m_TRperiod * 1.e3); + auto t = m_dateTimeSeqStart.time (); dec_data.params.nutc = t.hour () * 100 + t.minute (); if (m_TRperiod < 60.) { @@ -3400,19 +3448,21 @@ void MainWindow::readFromStdout() //readFromStdout ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(), haveFSpread, fSpread); - if(m_bBestSPArmed and m_mode=="FT4") { + if(m_bBestSPArmed && m_mode=="FT4" && CALLING == m_QSOProgress) { QString messagePriority=ui->decodedTextBrowser->CQPriority(); if(messagePriority!="") { if(messagePriority=="New Call on Band" and m_BestCQpriority!="New Call on Band" and m_BestCQpriority!="New Multiplier") { m_BestCQpriority="New Call on Band"; + m_bDoubleClicked = true; processMessage(decodedtext0); } if(messagePriority=="New DXCC" and m_BestCQpriority!="New DXCC" and m_BestCQpriority!="New Multiplier") { m_BestCQpriority="New DXCC"; + m_bDoubleClicked = true; processMessage(decodedtext0); } } @@ -3521,7 +3571,16 @@ void MainWindow::readFromStdout() //readFromStdout decodedtext.deCallAndGrid(/*out*/deCall,grid); { auto t = Radio::base_callsign (ui->dxCallEntry->text ()); - if ((t == deCall || ui->dxCallEntry->text () == deCall || !t.size ()) && rpt.size ()) m_rptRcvd = rpt; + auto const& dx_call = decodedtext.call (); + if (rpt.size () // report in message + && (m_baseCall == Radio::base_callsign (dx_call) // for us + || "DE" == dx_call) // probably for us + && (t == deCall // DX station base call is QSO partner + || ui->dxCallEntry->text () == deCall // DX station full call is QSO partner + || !t.size ())) // not in QSO + { + m_rptRcvd = rpt; + } } // extract details and send to PSKreporter int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged; @@ -4085,7 +4144,14 @@ void MainWindow::guiUpdate() } } - m_currentMessage = QString::fromLatin1(msgsent); + { + auto temp = m_currentMessage; + m_currentMessage = QString::fromLatin1(msgsent); + if (m_currentMessage != temp) // check if tx message changed + { + statusUpdate (); + } + } m_bCallingCQ = CALLING == m_QSOProgress || m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "}); if(m_mode=="FT8" or m_mode=="FT4") { @@ -5918,7 +5984,11 @@ void MainWindow::displayWidgets(qint64 n) if(i==31) ui->cbRxAll->setVisible(b); if(i==32) ui->cbCQonly->setVisible(b); if(i==33) ui->sbTR_FST4W->setVisible(b); - if(i==34) ui->sbF_Low->setVisible(b); + if (34 == i) // adjust the stacked widget + { + ui->opt_controls_stack->setCurrentIndex (b ? 1 : 0); + ui->sbF_Low->setVisible(b); + } if(i==35) ui->sbF_High->setVisible(b); j=j>>1; } @@ -7562,10 +7632,6 @@ void MainWindow::on_sbTR_valueChanged(int value) progressBar.setMaximum (value); } if(m_mode=="FST4") chk_FST4_freq_range(); - if(m_monitoring) { - on_stopButton_clicked(); - on_monitorButton_clicked(true); - } if(m_transmitting) { on_stopTxButton_clicked(); } @@ -8348,7 +8414,8 @@ void MainWindow::statusUpdate () const m_hisGrid, m_tx_watchdog, submode != QChar::Null ? QString {submode} : QString {}, m_bFastMode, static_cast<quint8> (m_config.special_op_id ()), - ftol, tr_period, m_multi_settings->configuration_name ()); + ftol, tr_period, m_multi_settings->configuration_name (), + m_currentMessage); } void MainWindow::childEvent (QChildEvent * e) @@ -8431,7 +8498,7 @@ void MainWindow::update_watchdog_label () void MainWindow::on_cbMenus_toggled(bool b) { - hideMenus(!b); + select_geometry (!b ? 2 : ui->actionSWL_Mode->isChecked () ? 1 : 0); } void MainWindow::on_cbCQonly_toggled(bool) diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index c51a418d..7dfbf8a7 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -26,6 +26,7 @@ #include <QFuture> #include <QFutureWatcher> +#include "MultiGeometryWidget.hpp" #include "NonInheritingProcess.hpp" #include "Audio/AudioDevice.hpp" #include "commons.h" @@ -94,7 +95,8 @@ class MultiSettings; class EqualizationToolsDialog; class DecodedText; -class MainWindow : public QMainWindow +class MainWindow + : public MultiGeometryWidget<3, QMainWindow> { Q_OBJECT; @@ -130,7 +132,8 @@ public slots: void msgAvgDecode2(); void fastPick(int x0, int x1, int y); -protected: +private: + void change_layout (std::size_t) override; void keyPressEvent (QKeyEvent *) override; void closeEvent(QCloseEvent *) override; void childEvent(QChildEvent *) override; @@ -353,7 +356,7 @@ private: void astroUpdate (); void writeAllTxt(QString message); void auto_sequence (DecodedText const& message, unsigned start_tolerance, unsigned stop_tolerance); - void hideMenus(bool b); + void trim_view (bool b); void foxTest(); void setColorHighlighting(); void chkFT4(); @@ -401,6 +404,8 @@ private: SoundInput * m_soundInput; Modulator * m_modulator; SoundOutput * m_soundOutput; + int m_rx_audio_buffer_frames; + int m_tx_audio_buffer_frames; QThread m_audioThread; qint64 m_msErase; diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 6ffcf9a2..948bfc68 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2,20 +2,6 @@ <ui version="4.0"> <class>MainWindow</class> <widget class="QMainWindow" name="MainWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>805</width> - <height>589</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Ignored" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> <property name="windowTitle"> <string>WSJT-X by K1JT</string> </property> @@ -25,13 +11,7 @@ <widget class="QWidget" name="centralWidget"> <layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,0"> <item> - <widget class="QSplitter" name="splitter"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>2</verstretch> - </sizepolicy> - </property> + <widget class="QSplitter" name="decodes_splitter"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> @@ -154,18 +134,6 @@ </item> <item> <widget class="DisplayText" name="decodedTextBrowser"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>10</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>200</width> - <height>100</height> - </size> - </property> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> @@ -313,18 +281,6 @@ <property name="enabled"> <bool>true</bool> </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>10</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>200</width> - <height>100</height> - </size> - </property> <property name="verticalScrollBarPolicy"> <enum>Qt::ScrollBarAlwaysOn</enum> </property> @@ -342,6 +298,12 @@ </item> <item> <widget class="QWidget" name="lower_panel_widget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <layout class="QVBoxLayout" name="verticalLayout_4"> <property name="leftMargin"> <number>0</number> @@ -590,7 +552,7 @@ </layout> </item> <item> - <layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0,0"> + <layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0" columnstretch="0,0,0,1,0"> <item row="0" column="2"> <widget class="QLabel" name="labDialFreq"> <property name="sizePolicy"> @@ -773,7 +735,7 @@ Yellow when too low</string> <property name="bottomMargin"> <number>0</number> </property> - <item row="1" column="0"> + <item row="0" column="0"> <widget class="QLabel" name="label_3"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> @@ -865,7 +827,17 @@ Yellow when too low</string> </property> </widget> </item> - <item row="3" column="0" colspan="2"> + <item row="3" column="1"> + <widget class="QPushButton" name="addButton"> + <property name="toolTip"> + <string>Add callsign and locator to database</string> + </property> + <property name="text"> + <string>Add</string> + </property> + </widget> + </item> + <item row="2" column="0" colspan="2"> <widget class="QLabel" name="labAz"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> @@ -887,20 +859,17 @@ Yellow when too low</string> </property> </widget> </item> - <item row="2" column="0"> - <widget class="QLineEdit" name="dxCallEntry"> + <item row="3" column="0"> + <widget class="QPushButton" name="lookupButton"> <property name="toolTip"> - <string>Callsign of station to be worked</string> + <string>Search for callsign in database</string> </property> <property name="text"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <string>&Lookup</string> </property> </widget> </item> - <item row="1" column="1"> + <item row="0" column="1"> <widget class="QLabel" name="label_4"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> @@ -992,17 +961,20 @@ Yellow when too low</string> </property> </widget> </item> - <item row="4" column="0"> - <widget class="QPushButton" name="lookupButton"> + <item row="1" column="0"> + <widget class="QLineEdit" name="dxCallEntry"> <property name="toolTip"> - <string>Search for callsign in database</string> + <string>Callsign of station to be worked</string> </property> <property name="text"> - <string>&Lookup</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> - <item row="2" column="1"> + <item row="1" column="1"> <widget class="QLineEdit" name="dxGridEntry"> <property name="toolTip"> <string>Locator of station to be worked</string> @@ -1015,16 +987,6 @@ Yellow when too low</string> </property> </widget> </item> - <item row="4" column="1"> - <widget class="QPushButton" name="addButton"> - <property name="toolTip"> - <string>Add callsign and locator to database</string> - </property> - <property name="text"> - <string>Add</string> - </property> - </widget> - </item> </layout> </widget> </item> @@ -1116,7 +1078,7 @@ Yellow when too low</string> </property> <item> <widget class="QWidget" name="QSO_controls_widget" native="true"> - <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,0"> + <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,1"> <property name="leftMargin"> <number>0</number> </property> @@ -1130,187 +1092,140 @@ Yellow when too low</string> <number>0</number> </property> <item> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="4" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_4"> + <layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0"> + <item row="1" column="0" colspan="2"> + <layout class="QHBoxLayout" name="horizontalLayout_11"> <item> - <widget class="QPushButton" name="pbR2T"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <widget class="QSpinBox" name="sbCQTxFreq"> + <property name="enabled"> + <bool>false</bool> </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>0</height> - </size> + <property name="toolTip"> + <string><html><head/><body><p>Frequency to call CQ on in kHz above the current MHz</p></body></html></string> </property> - <property name="maximumSize"> - <size> - <width>50</width> - <height>20</height> - </size> + <property name="accessibleDescription"> + <string>Frequency to call CQ on in kHz above the current MHz</string> </property> - <property name="toolTip"> - <string>Set Tx frequency to Rx Frequency</string> + <property name="prefix"> + <string>Tx CQ </string> + </property> + <property name="minimum"> + <number>1</number> </property> - <property name="accessibleName"> - <string>Set Tx frequency to Rx Frequency</string> + <property name="maximum"> + <number>999</number> </property> - <property name="text"> - <string>â–²</string> + <property name="value"> + <number>260</number> </property> </widget> </item> <item> - <widget class="HintedSpinBox" name="sbFtol"> - <property name="toolTip"> - <string>Frequency tolerance (Hz)</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <widget class="QCheckBox" name="cbCQTx"> + <property name="enabled"> + <bool>false</bool> </property> - <property name="prefix"> - <string>F Tol </string> + <property name="toolTip"> + <string><html><head/><body><p>Check this to call CQ on the &quot;Tx CQ&quot; frequency. Rx will be on the current frequency and the CQ message wiill include the current Rx frequency so callers know which frequency to reply on.</p><p>Not available to nonstandard callsign holders.</p></body></html></string> </property> - <property name="minimum"> - <number>1</number> + <property name="accessibleDescription"> + <string>Check this to call CQ on the "Tx CQ" frequency. Rx will be on the current frequency and the CQ message wiill include the current Rx frequency so callers know which frequency to reply on. +Not available to nonstandard callsign holders.</string> </property> - <property name="maximum"> - <number>1000</number> + <property name="text"> + <string/> </property> - <property name="value"> - <number>10</number> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cbRxAll"> + <property name="text"> + <string>Rx All Freqs</string> </property> </widget> </item> + </layout> + </item> + <item row="3" column="0" colspan="2"> + <layout class="QHBoxLayout" name="horizontalLayout_15"> <item> - <widget class="QPushButton" name="pbT2R"> + <widget class="QLabel" name="labDXped"> <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> <property name="maximumSize"> <size> - <width>50</width> - <height>20</height> + <width>100</width> + <height>16777215</height> </size> </property> + <property name="text"> + <string>Fox</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cbSWL"> + <property name="toolTip"> + <string><html><head/><body><p>Check to monitor Sh messages.</p></body></html></string> + </property> + <property name="accessibleDescription"> + <string>Check to monitor Sh messages.</string> + </property> + <property name="text"> + <string>SWL</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pbBestSP"> + <property name="toolTip"> + <string>Enable auto response to the first decode from a new DXCC or new call on the current band.</string> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton:checked { + color: rgb(0, 0, 0); + background-color: red; + border-style: outset; + border-width: 1px; + border-radius: 5px; + border-color: black; + min-width: 5em; + padding: 3px; +}</string> + </property> + <property name="text"> + <string>Best S+P</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="measure_check_box"> <property name="toolTip"> - <string>Set Rx frequency to Tx Frequency</string> + <string><html><head/><body><p>Check this to start recording calibration data.<br/>While measuring calibration correction is disabled.<br/>When not checked you can view the calibration results.</p></body></html></string> </property> - <property name="accessibleName"> - <string>Set Rx frequency to Tx Frequency</string> + <property name="accessibleDescription"> + <string>Check this to start recording calibration data. +While measuring calibration correction is disabled. +When not checked you can view the calibration results.</string> </property> <property name="text"> - <string>â–¼</string> + <string>Measure</string> </property> </widget> </item> </layout> </item> - <item row="0" column="1"> - <widget class="QPushButton" name="pbTxMode"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Toggle Tx mode</string> - </property> - <property name="text"> - <string>Tx JT9 @</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QSpinBox" name="TxFreqSpinBox"> - <property name="toolTip"> - <string>Audio Tx frequency</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="suffix"> - <string> Hz</string> - </property> - <property name="prefix"> - <string>Tx </string> - </property> - <property name="minimum"> - <number>200</number> - </property> - <property name="maximum"> - <number>5000</number> - </property> - <property name="value"> - <number>1500</number> - </property> - </widget> - </item> - <item row="8" column="1"> - <widget class="LettersSpinBox" name="sbSubmode"> - <property name="toolTip"> - <string><html><head/><body><p>Submode determines tone spacing; A is narrowest.</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Submode determines tone spacing; A is narrowest.</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="prefix"> - <string>Submode </string> - </property> - <property name="minimum"> - <number>0</number> - </property> - <property name="maximum"> - <number>7</number> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QSpinBox" name="sbF_High"> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="suffix"> - <string/> - </property> - <property name="prefix"> - <string>F High </string> - </property> - <property name="minimum"> - <number>100</number> - </property> - <property name="maximum"> - <number>5000</number> - </property> - <property name="singleStep"> - <number>50</number> - </property> - <property name="value"> - <number>1400</number> - </property> - </widget> - </item> - <item row="18" column="0" colspan="2"> + <item row="2" column="0" colspan="2"> <layout class="QHBoxLayout" name="horizontalLayout_5"> <item> <widget class="QCheckBox" name="cbShMsgs"> @@ -1379,319 +1294,429 @@ Yellow when too low</string> </item> </layout> </item> - <item row="4" column="1"> - <widget class="QSpinBox" name="sbF_Low"> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="prefix"> - <string>F Low </string> - </property> - <property name="minimum"> - <number>100</number> - </property> - <property name="maximum"> - <number>5000</number> - </property> - <property name="singleStep"> - <number>50</number> - </property> - <property name="value"> - <number>600</number> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QLabel" name="labNextCall"> - <property name="toolTip"> - <string><html><head/><body><p>Double-click on another caller to queue that call for your next QSO.</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Double-click on another caller to queue that call for your next QSO.</string> - </property> - <property name="text"> - <string>Next Call</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QSpinBox" name="RxFreqSpinBox"> - <property name="toolTip"> - <string>Audio Rx frequency</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="suffix"> - <string> Hz</string> - </property> - <property name="prefix"> - <string>Rx </string> - </property> - <property name="minimum"> - <number>200</number> - </property> - <property name="maximum"> - <number>5000</number> - </property> - <property name="value"> - <number>1500</number> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="RestrictedSpinBox" name="sbTR"> - <property name="toolTip"> - <string><html><head/><body><p>Tx/Rx or Frequency calibration sequence length</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Tx/Rx or Frequency calibration sequence length</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="suffix"> - <string> s</string> - </property> - <property name="prefix"> - <string>T/R </string> - </property> - <property name="minimum"> - <number>5</number> - </property> - <property name="maximum"> - <number>1800</number> - </property> - <property name="value"> - <number>30</number> - </property> - </widget> - </item> - <item row="17" column="0" colspan="2"> - <layout class="QHBoxLayout" name="horizontalLayout_11"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_14"> <item> - <widget class="QSpinBox" name="sbCQTxFreq"> - <property name="enabled"> - <bool>false</bool> - </property> + <widget class="QCheckBox" name="txFirstCheckBox"> <property name="toolTip"> - <string><html><head/><body><p>Frequency to call CQ on in kHz above the current MHz</p></body></html></string> + <string><html><head/><body><p>Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences.</p></body></html></string> </property> <property name="accessibleDescription"> - <string>Frequency to call CQ on in kHz above the current MHz</string> + <string>Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences.</string> + </property> + <property name="text"> + <string>Tx even/1st</string> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="TxFreqSpinBox"> + <property name="toolTip"> + <string>Audio Tx frequency</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="suffix"> + <string> Hz</string> </property> <property name="prefix"> - <string>Tx CQ </string> + <string>Tx </string> </property> <property name="minimum"> - <number>1</number> + <number>200</number> </property> <property name="maximum"> - <number>999</number> + <number>5000</number> </property> <property name="value"> - <number>260</number> + <number>1500</number> </property> </widget> </item> <item> - <widget class="QCheckBox" name="cbCQTx"> - <property name="enabled"> - <bool>false</bool> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QPushButton" name="pbR2T"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>50</width> + <height>20</height> + </size> + </property> + <property name="toolTip"> + <string>Set Tx frequency to Rx Frequency</string> + </property> + <property name="accessibleName"> + <string>Set Tx frequency to Rx Frequency</string> + </property> + <property name="text"> + <string>â–²</string> + </property> + </widget> + </item> + <item> + <widget class="HintedSpinBox" name="sbFtol"> + <property name="toolTip"> + <string>Frequency tolerance (Hz)</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="prefix"> + <string>F Tol </string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>1000</number> + </property> + <property name="value"> + <number>10</number> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pbT2R"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>50</width> + <height>20</height> + </size> + </property> + <property name="toolTip"> + <string>Set Rx frequency to Tx Frequency</string> + </property> + <property name="accessibleName"> + <string>Set Rx frequency to Tx Frequency</string> + </property> + <property name="text"> + <string>â–¼</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QSpinBox" name="RxFreqSpinBox"> + <property name="toolTip"> + <string>Audio Rx frequency</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> + <property name="suffix"> + <string> Hz</string> + </property> + <property name="prefix"> + <string>Rx </string> + </property> + <property name="minimum"> + <number>200</number> + </property> + <property name="maximum"> + <number>5000</number> + </property> + <property name="value"> + <number>1500</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="rptSpinBox"> <property name="toolTip"> - <string><html><head/><body><p>Check this to call CQ on the &quot;Tx CQ&quot; frequency. Rx will be on the current frequency and the CQ message wiill include the current Rx frequency so callers know which frequency to reply on.</p><p>Not available to nonstandard callsign holders.</p></body></html></string> + <string><html><head/><body><p>Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB).</p></body></html></string> </property> <property name="accessibleDescription"> - <string>Check this to call CQ on the "Tx CQ" frequency. Rx will be on the current frequency and the CQ message wiill include the current Rx frequency so callers know which frequency to reply on. -Not available to nonstandard callsign holders.</string> + <string>Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB).</string> </property> - <property name="text"> - <string/> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="prefix"> + <string> Report </string> + </property> + <property name="minimum"> + <number>-50</number> + </property> + <property name="maximum"> + <number>49</number> + </property> + <property name="value"> + <number>-15</number> </property> </widget> </item> <item> - <widget class="QCheckBox" name="cbRxAll"> - <property name="text"> - <string>Rx All Freqs</string> + <widget class="RestrictedSpinBox" name="sbTR"> + <property name="toolTip"> + <string><html><head/><body><p>Tx/Rx or Frequency calibration sequence length</p></body></html></string> + </property> + <property name="accessibleDescription"> + <string>Tx/Rx or Frequency calibration sequence length</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="suffix"> + <string> s</string> + </property> + <property name="prefix"> + <string>T/R </string> + </property> + <property name="minimum"> + <number>5</number> + </property> + <property name="maximum"> + <number>1800</number> + </property> + <property name="value"> + <number>30</number> </property> </widget> </item> </layout> </item> - <item row="7" column="1"> - <widget class="QSpinBox" name="sbSerialNumber"> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - <property name="prefix"> - <string>Tx# </string> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>4095</number> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QCheckBox" name="cbHoldTxFreq"> - <property name="toolTip"> - <string><html><head/><body><p>Check to keep Tx frequency fixed when double-clicking on decoded text.</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Check to keep Tx frequency fixed when double-clicking on decoded text.</string> - </property> - <property name="text"> - <string>Hold Tx Freq</string> - </property> - </widget> - </item> - <item row="9" column="1"> - <widget class="QSpinBox" name="syncSpinBox"> - <property name="toolTip"> - <string><html><head/><body><p>Synchronizing threshold. Lower numbers accept weaker sync signals.</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Synchronizing threshold. Lower numbers accept weaker sync signals.</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="prefix"> - <string>Sync </string> - </property> - <property name="minimum"> - <number>-1</number> - </property> - <property name="maximum"> - <number>10</number> - </property> - <property name="value"> - <number>1</number> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="txFirstCheckBox"> - <property name="toolTip"> - <string><html><head/><body><p>Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences.</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences.</string> - </property> - <property name="text"> - <string>Tx even/1st</string> - </property> - </widget> - </item> - <item row="19" column="0" colspan="2"> - <layout class="QHBoxLayout" name="horizontalLayout_15"> + <item row="0" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_13"> <item> - <widget class="QLabel" name="labDXped"> + <widget class="QPushButton" name="pbTxMode"> + <property name="enabled"> + <bool>true</bool> + </property> <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> + <property name="toolTip"> + <string>Toggle Tx mode</string> </property> <property name="text"> - <string>Fox</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <string>Tx JT9 @</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="cbSWL"> + <widget class="QCheckBox" name="cbHoldTxFreq"> <property name="toolTip"> - <string><html><head/><body><p>Check to monitor Sh messages.</p></body></html></string> + <string><html><head/><body><p>Check to keep Tx frequency fixed when double-clicking on decoded text.</p></body></html></string> </property> <property name="accessibleDescription"> - <string>Check to monitor Sh messages.</string> + <string>Check to keep Tx frequency fixed when double-clicking on decoded text.</string> </property> <property name="text"> - <string>SWL</string> + <string>Hold Tx Freq</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="pbBestSP"> - <property name="styleSheet"> - <string notr="true">QPushButton:checked { - color: rgb(0, 0, 0); - background-color: red; - border-style: outset; - border-width: 1px; - border-radius: 5px; - border-color: black; - min-width: 5em; - padding: 3px; -}</string> + <widget class="QStackedWidget" name="opt_controls_stack"> + <property name="currentIndex"> + <number>0</number> </property> - <property name="text"> - <string>Best S+P</string> + <widget class="QWidget" name="page_0"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="labNextCall"> + <property name="toolTip"> + <string><html><head/><body><p>Double-click on another caller to queue that call for your next QSO.</p></body></html></string> + </property> + <property name="accessibleDescription"> + <string>Double-click on another caller to queue that call for your next QSO.</string> + </property> + <property name="text"> + <string>Next Call</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="sbSerialNumber"> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="prefix"> + <string>Tx# </string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>4095</number> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="page_1"> + <layout class="QVBoxLayout" name="verticalLayout_10"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QSpinBox" name="sbF_Low"> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="prefix"> + <string>F Low </string> + </property> + <property name="minimum"> + <number>100</number> + </property> + <property name="maximum"> + <number>5000</number> + </property> + <property name="singleStep"> + <number>50</number> + </property> + <property name="value"> + <number>600</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="sbF_High"> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="suffix"> + <string/> + </property> + <property name="prefix"> + <string>F High </string> + </property> + <property name="minimum"> + <number>100</number> + </property> + <property name="maximum"> + <number>5000</number> + </property> + <property name="singleStep"> + <number>50</number> + </property> + <property name="value"> + <number>1400</number> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <widget class="LettersSpinBox" name="sbSubmode"> + <property name="toolTip"> + <string><html><head/><body><p>Submode determines tone spacing; A is narrowest.</p></body></html></string> </property> - <property name="checkable"> - <bool>true</bool> + <property name="accessibleDescription"> + <string>Submode determines tone spacing; A is narrowest.</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="prefix"> + <string>Submode </string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>7</number> </property> </widget> </item> <item> - <widget class="QCheckBox" name="measure_check_box"> + <widget class="QSpinBox" name="syncSpinBox"> <property name="toolTip"> - <string><html><head/><body><p>Check this to start recording calibration data.<br/>While measuring calibration correction is disabled.<br/>When not checked you can view the calibration results.</p></body></html></string> + <string><html><head/><body><p>Synchronizing threshold. Lower numbers accept weaker sync signals.</p></body></html></string> </property> <property name="accessibleDescription"> - <string>Check this to start recording calibration data. -While measuring calibration correction is disabled. -When not checked you can view the calibration results.</string> + <string>Synchronizing threshold. Lower numbers accept weaker sync signals.</string> </property> - <property name="text"> - <string>Measure</string> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="prefix"> + <string>Sync </string> + </property> + <property name="minimum"> + <number>-1</number> + </property> + <property name="maximum"> + <number>10</number> + </property> + <property name="value"> + <number>1</number> </property> </widget> </item> + <item> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> </layout> </item> - <item row="6" column="0"> - <widget class="QSpinBox" name="rptSpinBox"> - <property name="toolTip"> - <string><html><head/><body><p>Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB).</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB).</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="prefix"> - <string> Report </string> - </property> - <property name="minimum"> - <number>-50</number> - </property> - <property name="maximum"> - <number>49</number> - </property> - <property name="value"> - <number>-15</number> - </property> - </widget> - </item> - <item row="20" column="0"> + <item row="4" column="0"> <spacer name="verticalSpacer_4"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -1730,8 +1755,8 @@ When not checked you can view the calibration results.</string> <layout class="QGridLayout" name="gridLayout_7"> <item row="0" column="0"> <layout class="QGridLayout" name="gridLayout_6"> - <item row="2" column="1"> - <widget class="QRadioButton" name="txrb2"> + <item row="6" column="1"> + <widget class="QRadioButton" name="txrb6"> <property name="toolTip"> <string>Send this message in next Tx interval</string> </property> @@ -1742,18 +1767,42 @@ When not checked you can view the calibration results.</string> <string/> </property> <property name="shortcut"> - <string>Ctrl+2</string> + <string>Ctrl+6</string> + </property> + <property name="checked"> + <bool>true</bool> </property> </widget> </item> - <item row="1" column="1"> - <widget class="DoubleClickableRadioButton" name="txrb1"> + <item row="0" column="1"> + <widget class="QLabel" name="label_5"> <property name="toolTip"> - <string><html><head/><body><p>Send this message in next Tx interval</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</p></body></html></string> + <string>Queue up the next Tx message</string> + </property> + <property name="text"> + <string>Next</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLineEdit" name="tx1"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="DoubleClickableRadioButton" name="txrb4"> + <property name="toolTip"> + <string><html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type 2 compound call holders)</p><p>RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</p></body></html></string> </property> <property name="accessibleDescription"> <string>Send this message in next Tx interval -Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</string> +Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type 2 compound call holders) +RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</string> </property> <property name="styleSheet"> <string notr="true">margin-left: 10%; margin-right: 0%</string> @@ -1762,96 +1811,91 @@ Double click to toggle the use of the Tx1 message to start a QSO with a station <string/> </property> <property name="shortcut"> - <string>Ctrl+1</string> + <string>Ctrl+4</string> </property> </widget> </item> - <item row="2" column="2"> - <widget class="QPushButton" name="txb2"> + <item row="1" column="1"> + <widget class="DoubleClickableRadioButton" name="txrb1"> <property name="toolTip"> - <string>Switch to this Tx message NOW</string> + <string><html><head/><body><p>Send this message in next Tx interval</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</p></body></html></string> + </property> + <property name="accessibleDescription"> + <string>Send this message in next Tx interval +Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</string> </property> <property name="styleSheet"> - <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> + <string notr="true">margin-left: 10%; margin-right: 0%</string> </property> <property name="text"> - <string>Tx &2</string> + <string/> </property> <property name="shortcut"> - <string>Alt+2</string> + <string>Ctrl+1</string> </property> </widget> </item> - <item row="2" column="0"> - <widget class="QLineEdit" name="tx2"/> + <item row="6" column="0"> + <widget class="QLineEdit" name="tx6"> + <property name="text"> + <string/> + </property> + </widget> </item> - <item row="1" column="2"> - <widget class="DoubleClickablePushButton" name="txb1"> + <item row="5" column="2"> + <widget class="DoubleClickablePushButton" name="txb5"> <property name="toolTip"> - <string><html><head/><body><p>Switch to this Tx message NOW</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</p></body></html></string> + <string><html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to reset to the standard 73 message</p></body></html></string> </property> <property name="accessibleDescription"> <string>Switch to this Tx message NOW -Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</string> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> +Double-click to reset to the standard 73 message</string> </property> <property name="styleSheet"> <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> </property> <property name="text"> - <string>Tx &1</string> + <string>Tx &5</string> </property> <property name="shortcut"> - <string>Alt+1</string> + <string>Alt+5</string> </property> </widget> </item> - <item row="6" column="1"> - <widget class="QRadioButton" name="txrb6"> + <item row="2" column="2"> + <widget class="QPushButton" name="txb2"> <property name="toolTip"> - <string>Send this message in next Tx interval</string> + <string>Switch to this Tx message NOW</string> </property> <property name="styleSheet"> - <string notr="true">margin-left: 10%; margin-right: 0%</string> + <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> </property> <property name="text"> - <string/> + <string>Tx &2</string> </property> <property name="shortcut"> - <string>Ctrl+6</string> - </property> - <property name="checked"> - <bool>true</bool> + <string>Alt+2</string> </property> </widget> </item> - <item row="3" column="0"> - <widget class="QLineEdit" name="tx3"/> + <item row="2" column="0"> + <widget class="QLineEdit" name="tx2"/> </item> - <item row="5" column="1"> - <widget class="DoubleClickableRadioButton" name="txrb5"> + <item row="0" column="2"> + <widget class="QLabel" name="label_2"> <property name="toolTip"> - <string><html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to reset to the standard 73 message</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Send this message in next Tx interval -Double-click to reset to the standard 73 message</string> - </property> - <property name="styleSheet"> - <string notr="true">margin-left: 10%; margin-right: 0%</string> + <string>Switch to this Tx message NOW</string> </property> <property name="text"> - <string/> + <string>Now</string> </property> - <property name="shortcut"> - <string>Ctrl+5</string> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> - <item row="3" column="1"> - <widget class="QRadioButton" name="txrb3"> + <item row="2" column="1"> + <widget class="QRadioButton" name="txrb2"> <property name="toolTip"> <string>Send this message in next Tx interval</string> </property> @@ -1862,44 +1906,39 @@ Double-click to reset to the standard 73 message</string> <string/> </property> <property name="shortcut"> - <string>Ctrl+3</string> + <string>Ctrl+2</string> </property> </widget> </item> - <item row="3" column="2"> - <widget class="QPushButton" name="txb3"> + <item row="4" column="0"> + <widget class="QLineEdit" name="tx4"/> + </item> + <item row="3" column="0"> + <widget class="QLineEdit" name="tx3"/> + </item> + <item row="0" column="0"> + <widget class="QPushButton" name="genStdMsgsPushButton"> <property name="toolTip"> - <string>Switch to this Tx message NOW</string> - </property> - <property name="styleSheet"> - <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> + <string>Generate standard messages for minimal QSO</string> </property> <property name="text"> - <string>Tx &3</string> - </property> - <property name="shortcut"> - <string>Alt+3</string> + <string>Generate Std Msgs</string> </property> </widget> </item> - <item row="4" column="1"> - <widget class="DoubleClickableRadioButton" name="txrb4"> + <item row="3" column="2"> + <widget class="QPushButton" name="txb3"> <property name="toolTip"> - <string><html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type 2 compound call holders)</p><p>RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</p></body></html></string> - </property> - <property name="accessibleDescription"> - <string>Send this message in next Tx interval -Double-click to toggle between RRR and RR73 messages in Tx4 (not allowed for type 2 compound call holders) -RR73 messages should only be used when you are reasonably confident that no message repetitions will be required</string> + <string>Switch to this Tx message NOW</string> </property> <property name="styleSheet"> - <string notr="true">margin-left: 10%; margin-right: 0%</string> + <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> </property> <property name="text"> - <string/> + <string>Tx &3</string> </property> <property name="shortcut"> - <string>Ctrl+4</string> + <string>Alt+3</string> </property> </widget> </item> @@ -1924,65 +1963,58 @@ RR73 messages should only be used when you are reasonably confident that no mess </property> </widget> </item> - <item row="5" column="2"> - <widget class="DoubleClickablePushButton" name="txb5"> + <item row="1" column="2"> + <widget class="DoubleClickablePushButton" name="txb1"> <property name="toolTip"> - <string><html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to reset to the standard 73 message</p></body></html></string> + <string><html><head/><body><p>Switch to this Tx message NOW</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</p></body></html></string> </property> <property name="accessibleDescription"> <string>Switch to this Tx message NOW -Double-click to reset to the standard 73 message</string> +Double click to toggle the use of the Tx1 message to start a QSO with a station (not allowed for type 1 compound call holders)</string> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> </property> <property name="styleSheet"> <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> </property> <property name="text"> - <string>Tx &5</string> + <string>Tx &1</string> </property> <property name="shortcut"> - <string>Alt+5</string> + <string>Alt+1</string> </property> </widget> </item> - <item row="4" column="0"> - <widget class="QLineEdit" name="tx4"/> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_2"> + <item row="6" column="2"> + <widget class="QPushButton" name="txb6"> <property name="toolTip"> <string>Switch to this Tx message NOW</string> </property> - <property name="text"> - <string>Now</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QPushButton" name="genStdMsgsPushButton"> - <property name="toolTip"> - <string>Generate standard messages for minimal QSO</string> + <property name="styleSheet"> + <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> </property> <property name="text"> - <string>Generate Std Msgs</string> + <string>Tx &6</string> + </property> + <property name="shortcut"> + <string>Alt+6</string> </property> </widget> </item> - <item row="6" column="2"> - <widget class="QPushButton" name="txb6"> + <item row="3" column="1"> + <widget class="QRadioButton" name="txrb3"> <property name="toolTip"> - <string>Switch to this Tx message NOW</string> + <string>Send this message in next Tx interval</string> </property> <property name="styleSheet"> - <string notr="true">padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3%</string> + <string notr="true">margin-left: 10%; margin-right: 0%</string> </property> <property name="text"> - <string>Tx &6</string> + <string/> </property> <property name="shortcut"> - <string>Alt+6</string> + <string>Ctrl+3</string> </property> </widget> </item> @@ -2002,30 +2034,23 @@ list. The list can be maintained in Settings (F2).</string> </property> </widget> </item> - <item row="6" column="0"> - <widget class="QLineEdit" name="tx6"> - <property name="text"> - <string/> + <item row="5" column="1"> + <widget class="DoubleClickableRadioButton" name="txrb5"> + <property name="toolTip"> + <string><html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to reset to the standard 73 message</p></body></html></string> </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLineEdit" name="tx1"> - <property name="text"> - <string/> + <property name="accessibleDescription"> + <string>Send this message in next Tx interval +Double-click to reset to the standard 73 message</string> </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_5"> - <property name="toolTip"> - <string>Queue up the next Tx message</string> + <property name="styleSheet"> + <string notr="true">margin-left: 10%; margin-right: 0%</string> </property> <property name="text"> - <string>Next</string> + <string/> </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <property name="shortcut"> + <string>Ctrl+5</string> </property> </widget> </item> @@ -2803,7 +2828,7 @@ list. The list can be maintained in Settings (F2).</string> <rect> <x>0</x> <y>0</y> - <width>805</width> + <width>834</width> <height>21</height> </rect> </property> diff --git a/widgets/widegraph.cpp b/widgets/widegraph.cpp index a369f629..fa3f1320 100644 --- a/widgets/widegraph.cpp +++ b/widgets/widegraph.cpp @@ -13,12 +13,6 @@ #include "SettingsGroup.hpp" #include "moc_widegraph.cpp" -namespace -{ - auto user_defined = QObject::tr ("User Defined"); - float swide[MAX_SCREENSIZE]; -} - WideGraph::WideGraph(QSettings * settings, QWidget *parent) : QDialog(parent), ui(new Ui::WideGraph), @@ -26,7 +20,8 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) : m_palettes_path {":/Palettes"}, m_tr0 {0.0}, m_n {0}, - m_bHaveTransmitted {false} + m_bHaveTransmitted {false}, + m_user_defined {tr ("User Defined")} { ui->setupUi(this); @@ -103,8 +98,8 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) : if(t==m_waterfallPalette) ui->paletteComboBox->setCurrentIndex(index); index++; } - ui->paletteComboBox->addItem (user_defined); - if (user_defined == m_waterfallPalette) ui->paletteComboBox->setCurrentIndex(index); + ui->paletteComboBox->addItem (m_user_defined); + if (m_user_defined == m_waterfallPalette) ui->paletteComboBox->setCurrentIndex(index); readPalette (); } @@ -147,7 +142,7 @@ void WideGraph::saveSettings() //saveS void WideGraph::drawRed(int ia, int ib) { - ui->widePlot->drawRed(ia,ib,swide); + ui->widePlot->drawRed(ia,ib,m_swide); } void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dataSink2 @@ -181,8 +176,8 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dat ss += sp; smax=qMax(smax,sp); } -// swide[j]=nbpp*smax; - swide[j]=nbpp*ss; +// m_swide[j]=nbpp*smax; + m_swide[j]=nbpp*ss; } // Time according to this computer @@ -192,7 +187,7 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dat float flagValue=1.0e30; if(m_bHaveTransmitted) flagValue=2.0e30; for(int i=0; i<MAX_SCREENSIZE; i++) { - swide[i] = flagValue; + m_swide[i] = flagValue; } for(int i=0; i<NSMAX; i++) { splot[i] = flagValue; @@ -200,7 +195,7 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dat m_bHaveTransmitted=false; } m_tr0=tr; - ui->widePlot->draw(swide,true,false); + ui->widePlot->draw(m_swide,true,false); } } @@ -238,7 +233,7 @@ void WideGraph::keyPressEvent(QKeyEvent *e) //F1 void WideGraph::setRxFreq(int n) //setRxFreq { ui->widePlot->setRxFreq(n); - ui->widePlot->draw(swide,false,false); + ui->widePlot->draw(m_swide,false,false); } int WideGraph::rxFreq() //rxFreq @@ -384,7 +379,7 @@ void WideGraph::readPalette () //readPalette { try { - if (user_defined == m_waterfallPalette) + if (m_user_defined == m_waterfallPalette) { ui->widePlot->setColours (WFPalette {m_userPalette}.interpolate ()); } @@ -437,7 +432,7 @@ void WideGraph::on_adjust_palette_push_button_clicked (bool) //Adjust Palette { if (m_userPalette.design ()) { - m_waterfallPalette = user_defined; + m_waterfallPalette = m_user_defined; ui->paletteComboBox->setCurrentText (m_waterfallPalette); readPalette (); } @@ -479,8 +474,8 @@ void WideGraph::on_gain2dSlider_valueChanged(int value) //Gain2 { ui->widePlot->setPlot2dGain(value); if(ui->widePlot->scaleOK ()) { - ui->widePlot->draw(swide,false,false); - if(m_mode=="QRA64") ui->widePlot->draw(swide,false,true); + ui->widePlot->draw(m_swide,false,false); + if(m_mode=="QRA64") ui->widePlot->draw(m_swide,false,true); } } @@ -488,8 +483,8 @@ void WideGraph::on_zero2dSlider_valueChanged(int value) //Zero2 { ui->widePlot->setPlot2dZero(value); if(ui->widePlot->scaleOK ()) { - ui->widePlot->draw(swide,false,false); - if(m_mode=="QRA64") ui->widePlot->draw(swide,false,true); + ui->widePlot->draw(m_swide,false,false); + if(m_mode=="QRA64") ui->widePlot->draw(m_swide,false,true); } } diff --git a/widgets/widegraph.h b/widgets/widegraph.h index f5f70c28..421fc821 100644 --- a/widgets/widegraph.h +++ b/widgets/widegraph.h @@ -117,6 +117,8 @@ private: QString m_mode; QString m_modeTx; QString m_waterfallPalette; + float m_swide[MAX_SCREENSIZE]; + QString m_user_defined; }; #endif // WIDEGRAPH_H |
