From 061dc1a349738747489ef0c0ebeeb4443e369501 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 5 Jan 2021 22:09:50 +0100 Subject: New upstream version 2.3.0~rc3+repack --- widgets/MultiGeometryWidget.hpp | 92 +++ widgets/about.cpp | 4 +- widgets/colorhighlighting.cpp | 10 +- widgets/displaytext.cpp | 1 + widgets/displaytext.h | 3 +- widgets/logqso.cpp | 4 + widgets/mainwindow.cpp | 171 ++++-- widgets/mainwindow.h | 11 +- widgets/mainwindow.ui | 1209 ++++++++++++++++++++------------------- widgets/widegraph.cpp | 37 +- widgets/widegraph.h | 2 + 11 files changed, 867 insertions(+), 677 deletions(-) create mode 100644 widgets/MultiGeometryWidget.hpp (limited to 'widgets') 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 +#include +#include + +#include +#include +#include + +// +// Class MultiGeometryWidget - 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 +class MultiGeometryWidget + : public Widget +{ +public: + template + explicit MultiGeometryWidget (Args&&... args) + : Widget {std::forward (args)...} + , current_geometry_ {0} + { + } + + void geometries (std::size_t current + , std::array const& the_geometries = std::array {}) + { + Q_ASSERT (current < the_geometries.size ()); + saved_geometries_ = the_geometries; + current_geometry_ = current; + Widget::restoreGeometry (saved_geometries_[current_geometry_]); + } + + std::array 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 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 () + "
" "WSJT-X implements a number of digital modes designed for
" "weak-signal Amateur Radio communication.

" - "© 2001-2020 by Joe Taylor, K1JT, Bill Somerville, G4WJS,
" + "© 2001-2021 by Joe Taylor, K1JT, Bill Somerville, G4WJS,
" "and Steve Franke, K9AN.

" "We gratefully acknowledge contributions from AC6SL, AE4JY,
" "DF2ET, DJ0OT, G3WDG, G4KLA, IV3NWV, IW3RAB, KA1GT, K3WYC,
" "KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KI7MT, KK1D, ND0B, PY2SDR,
" - "VE1SKY, VK3ACF, VK4BDJ, VK7MO, W4TI, W4TV, and W9MDB.

" + "VE1SKY, VK3ACF, VK4BDJ, VK7MO, W3DJS, W4TI, W4TV, and W9MDB.

" "WSJT-X is licensed under the terms of Version 3
" "of the GNU General Public License (GPL)

" "" 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 -#include +#include #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 #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 #include -#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 #include #include #include @@ -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::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 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 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 {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 (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 #include +#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 @@ MainWindow - - - 0 - 0 - 805 - 589 - - - - - 0 - 0 - - WSJT-X by K1JT @@ -25,13 +11,7 @@ - - - - 0 - 2 - - + Qt::Horizontal @@ -154,18 +134,6 @@ - - - 0 - 10 - - - - - 200 - 100 - - QFrame::StyledPanel @@ -313,18 +281,6 @@ true - - - 0 - 10 - - - - - 200 - 100 - - Qt::ScrollBarAlwaysOn @@ -342,6 +298,12 @@ + + + 0 + 0 + + 0 @@ -590,7 +552,7 @@ - + @@ -773,7 +735,7 @@ Yellow when too low 0 - + @@ -865,7 +827,17 @@ Yellow when too low - + + + + Add callsign and locator to database + + + Add + + + + @@ -887,20 +859,17 @@ Yellow when too low - - + + - Callsign of station to be worked + Search for callsign in database - - - - Qt::AlignCenter + &Lookup - + @@ -992,17 +961,20 @@ Yellow when too low - - + + - Search for callsign in database + Callsign of station to be worked - &Lookup + + + + Qt::AlignCenter - + Locator of station to be worked @@ -1015,16 +987,6 @@ Yellow when too low - - - - Add callsign and locator to database - - - Add - - - @@ -1116,7 +1078,7 @@ Yellow when too low - + 0 @@ -1130,187 +1092,140 @@ Yellow when too low 0 - - - + + + - - - - 0 - 0 - + + + false - - - 20 - 0 - + + <html><head/><body><p>Frequency to call CQ on in kHz above the current MHz</p></body></html> - - - 50 - 20 - + + Frequency to call CQ on in kHz above the current MHz - - Set Tx frequency to Rx Frequency + + Tx CQ - - Set Tx frequency to Rx Frequency + + 1 - - ▲ + + 999 + + + 260 - - - Frequency tolerance (Hz) - - - Qt::AlignCenter + + + false - - F Tol + + <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> - - 1 + + 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. - - 1000 + + - - 10 + + + + + + Rx All Freqs + + + + - + - + 0 0 - - - 20 - 0 - - - 50 - 20 + 100 + 16777215 + + Fox + + + Qt::AlignCenter + + + + + + + <html><head/><body><p>Check to monitor Sh messages.</p></body></html> + + + Check to monitor Sh messages. + + + SWL + + + + + + + Enable auto response to the first decode from a new DXCC or new call on the current band. + + + 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; +} + + + Best S+P + + + true + + + + + - Set Rx frequency to Tx Frequency + <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> - - Set Rx frequency to Tx Frequency + + Check this to start recording calibration data. +While measuring calibration correction is disabled. +When not checked you can view the calibration results. - ▼ + Measure - - - - true - - - - 0 - 0 - - - - Toggle Tx mode - - - Tx JT9 @ - - - - - - - Audio Tx frequency - - - Qt::AlignCenter - - - Hz - - - Tx - - - 200 - - - 5000 - - - 1500 - - - - - - - <html><head/><body><p>Submode determines tone spacing; A is narrowest.</p></body></html> - - - Submode determines tone spacing; A is narrowest. - - - Qt::AlignCenter - - - Submode - - - 0 - - - 7 - - - - - - - Qt::AlignCenter - - - - - - F High - - - 100 - - - 5000 - - - 50 - - - 1400 - - - - + @@ -1379,319 +1294,429 @@ Yellow when too low - - - - Qt::AlignCenter - - - F Low - - - 100 - - - 5000 - - - 50 - - - 600 - - - - - - - <html><head/><body><p>Double-click on another caller to queue that call for your next QSO.</p></body></html> - - - Double-click on another caller to queue that call for your next QSO. - - - Next Call - - - Qt::AlignCenter - - - - - - - Audio Rx frequency - - - Qt::AlignCenter - - - Hz - - - Rx - - - 200 - - - 5000 - - - 1500 - - - - - - - <html><head/><body><p>Tx/Rx or Frequency calibration sequence length</p></body></html> - - - Tx/Rx or Frequency calibration sequence length - - - Qt::AlignCenter - - - s - - - T/R - - - 5 - - - 1800 - - - 30 - - - - - + + - - - false - + - <html><head/><body><p>Frequency to call CQ on in kHz above the current MHz</p></body></html> + <html><head/><body><p>Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences.</p></body></html> - Frequency to call CQ on in kHz above the current MHz + Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences. - - Tx CQ - - - 1 + + Tx even/1st - - 999 + + + + + + Audio Tx frequency + + + Qt::AlignCenter + + + Hz + + + Tx + + + 200 + + + 5000 - 260 + 1500 - - - false + + + + + + 0 + 0 + + + + + 20 + 0 + + + + + 50 + 20 + + + + Set Tx frequency to Rx Frequency + + + Set Tx frequency to Rx Frequency + + + ▲ + + + + + + + Frequency tolerance (Hz) + + + Qt::AlignCenter + + + F Tol + + + 1 + + + 1000 + + + 10 + + + + + + + + 0 + 0 + + + + + 20 + 0 + + + + + 50 + 20 + + + + Set Rx frequency to Tx Frequency + + + Set Rx frequency to Tx Frequency + + + ▼ + + + + + + + + + Audio Rx frequency + + + Qt::AlignCenter + + + Hz + + Rx + + + 200 + + + 5000 + + + 1500 + + + + + - <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> + <html><head/><body><p>Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB).</p></body></html> - 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. + Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB). - - + + Qt::AlignCenter + + + Report + + + -50 + + + 49 + + + -15 - - - Rx All Freqs + + + <html><head/><body><p>Tx/Rx or Frequency calibration sequence length</p></body></html> + + + Tx/Rx or Frequency calibration sequence length + + + Qt::AlignCenter + + + s + + + T/R + + + 5 + + + 1800 + + + 30 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Tx# - - - 1 - - - 4095 - - - - - - - <html><head/><body><p>Check to keep Tx frequency fixed when double-clicking on decoded text.</p></body></html> - - - Check to keep Tx frequency fixed when double-clicking on decoded text. - - - Hold Tx Freq - - - - - - - <html><head/><body><p>Synchronizing threshold. Lower numbers accept weaker sync signals.</p></body></html> - - - Synchronizing threshold. Lower numbers accept weaker sync signals. - - - Qt::AlignCenter - - - Sync - - - -1 - - - 10 - - - 1 - - - - - - - <html><head/><body><p>Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences.</p></body></html> - - - Check to Tx in even-numbered minutes or sequences, starting at 0; uncheck for odd sequences. - - - Tx even/1st - - - - - + + - + + + true + - + 0 0 - - - 100 - 16777215 - + + Toggle Tx mode - Fox - - - Qt::AlignCenter + Tx JT9 @ - + - <html><head/><body><p>Check to monitor Sh messages.</p></body></html> + <html><head/><body><p>Check to keep Tx frequency fixed when double-clicking on decoded text.</p></body></html> - Check to monitor Sh messages. + Check to keep Tx frequency fixed when double-clicking on decoded text. - SWL + Hold Tx Freq - - - 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; -} + + + 0 - - Best S+P + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + <html><head/><body><p>Double-click on another caller to queue that call for your next QSO.</p></body></html> + + + Double-click on another caller to queue that call for your next QSO. + + + Next Call + + + Qt::AlignCenter + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Tx# + + + 1 + + + 4095 + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::AlignCenter + + + F Low + + + 100 + + + 5000 + + + 50 + + + 600 + + + + + + + Qt::AlignCenter + + + + + + F High + + + 100 + + + 5000 + + + 50 + + + 1400 + + + + + + + + + + + <html><head/><body><p>Submode determines tone spacing; A is narrowest.</p></body></html> - - true + + Submode determines tone spacing; A is narrowest. + + + Qt::AlignCenter + + + Submode + + + 0 + + + 7 - + - <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> + <html><head/><body><p>Synchronizing threshold. Lower numbers accept weaker sync signals.</p></body></html> - Check this to start recording calibration data. -While measuring calibration correction is disabled. -When not checked you can view the calibration results. + Synchronizing threshold. Lower numbers accept weaker sync signals. - - Measure + + Qt::AlignCenter + + + Sync + + + -1 + + + 10 + + + 1 + + + + + + + Qt::Vertical + + + + 20 + 40 + - + - - - - <html><head/><body><p>Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB).</p></body></html> - - - Signal report: Signal-to-noise ratio in 2500 Hz reference bandwidth (dB). - - - Qt::AlignCenter - - - Report - - - -50 - - - 49 - - - -15 - - - - + Qt::Vertical @@ -1730,8 +1755,8 @@ When not checked you can view the calibration results. - - + + Send this message in next Tx interval @@ -1742,18 +1767,42 @@ When not checked you can view the calibration results. - Ctrl+2 + Ctrl+6 + + + true - - + + - <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> + Queue up the next Tx message + + + Next + + + Qt::AlignCenter + + + + + + + + + + + + + + <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> 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) +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 margin-left: 10%; margin-right: 0% @@ -1762,96 +1811,91 @@ Double click to toggle the use of the Tx1 message to start a QSO with a station - Ctrl+1 + Ctrl+4 - - + + - Switch to this Tx message NOW + <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> + + + 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) - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + margin-left: 10%; margin-right: 0% - Tx &2 + - Alt+2 + Ctrl+1 - - + + + + + + - - + + - <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> + <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to reset to the standard 73 message</p></body></html> 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) - - - Qt::LeftToRight +Double-click to reset to the standard 73 message padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - Tx &1 + Tx &5 - Alt+1 + Alt+5 - - + + - Send this message in next Tx interval + Switch to this Tx message NOW - margin-left: 10%; margin-right: 0% + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - + Tx &2 - Ctrl+6 - - - true + Alt+2 - - + + - - + + - <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> - - - Send this message in next Tx interval -Double-click to reset to the standard 73 message - - - margin-left: 10%; margin-right: 0% + Switch to this Tx message NOW - + Now - - Ctrl+5 + + Qt::AlignCenter - - + + Send this message in next Tx interval @@ -1862,44 +1906,39 @@ Double-click to reset to the standard 73 message - Ctrl+3 + Ctrl+2 - - + + + + + + + + - Switch to this Tx message NOW - - - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + Generate standard messages for minimal QSO - Tx &3 - - - Alt+3 + Generate Std Msgs - - + + - <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> - - - 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 + Switch to this Tx message NOW - margin-left: 10%; margin-right: 0% + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - + Tx &3 - Ctrl+4 + Alt+3 @@ -1924,65 +1963,58 @@ RR73 messages should only be used when you are reasonably confident that no mess - - + + - <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to reset to the standard 73 message</p></body></html> + <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> Switch to this Tx message NOW -Double-click to reset to the standard 73 message +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) + + + Qt::LeftToRight padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - Tx &5 + Tx &1 - Alt+5 + Alt+1 - - - - - + + Switch to this Tx message NOW - - Now - - - Qt::AlignCenter - - - - - - - Generate standard messages for minimal QSO + + padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% - Generate Std Msgs + Tx &6 + + + Alt+6 - - + + - Switch to this Tx message NOW + Send this message in next Tx interval - padding-left: 15%; padding-right: 15%; padding-top: 3%; padding-bottom: 3% + margin-left: 10%; margin-right: 0% - Tx &6 + - Alt+6 + Ctrl+3 @@ -2002,30 +2034,23 @@ list. The list can be maintained in Settings (F2). - - - - + + + + <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> - - - - - - + + Send this message in next Tx interval +Double-click to reset to the standard 73 message - - - - - - Queue up the next Tx message + + margin-left: 10%; margin-right: 0% - Next + - - Qt::AlignCenter + + Ctrl+5 @@ -2803,7 +2828,7 @@ list. The list can be maintained in Settings (F2). 0 0 - 805 + 834 21 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; iwidePlot->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 -- cgit v1.2.3