summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-25 21:27:22 +0200
committerChristoph Berg <myon@debian.org>2020-05-25 21:27:22 +0200
commit458b033b8ae7818d50e80f51b12c0c43bbd0d3e2 (patch)
tree4aabd646d028edc5e51a71762faeac6c07577642 /widgets
parent32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (diff)
New upstream version 2.2.0~rc2+repackupstream/2.2.0_rc2+repack
Diffstat (limited to 'widgets')
-rw-r--r--widgets/AbstractLogWindow.cpp2
-rw-r--r--widgets/HelpTextWindow.cpp3
-rw-r--r--widgets/displaytext.cpp114
-rw-r--r--widgets/displaytext.h2
-rw-r--r--widgets/mainwindow.cpp183
-rw-r--r--widgets/mainwindow.h2
-rw-r--r--widgets/plotter.cpp18
-rw-r--r--widgets/widegraph.ui3
-rw-r--r--widgets/widgets.pri6
9 files changed, 185 insertions, 148 deletions
diff --git a/widgets/AbstractLogWindow.cpp b/widgets/AbstractLogWindow.cpp
index bbe07a84..cbe2b873 100644
--- a/widgets/AbstractLogWindow.cpp
+++ b/widgets/AbstractLogWindow.cpp
@@ -63,7 +63,7 @@ void AbstractLogWindow::impl::delete_QSOs ()
&& MessageBox::Yes == MessageBox::query_message (self_
, tr ("Confirm Delete")
, tr ("Are you sure you want to delete the %n "
- "selected QSO(s) from the log", ""
+ "selected QSO(s) from the log?", ""
, row_indexes.size ())))
{
// We must work with source model indexes because we don't want row
diff --git a/widgets/HelpTextWindow.cpp b/widgets/HelpTextWindow.cpp
index d24a87a5..51bfc89f 100644
--- a/widgets/HelpTextWindow.cpp
+++ b/widgets/HelpTextWindow.cpp
@@ -22,10 +22,11 @@ HelpTextWindow::HelpTextWindow (QString const& title, QString const& file_name,
, tr ("Error: %1").arg (source.errorString ()));
return;
}
- setText (QTextStream {&source}.readAll ());
setWindowTitle(QApplication::applicationName () + " - " + title);
setMargin (10);
setBackgroundRole (QPalette::Base);
setAutoFillBackground (true);
setStyleSheet (font_as_stylesheet (font));
+ setText (QTextStream {&source}.readAll ());
+ setMinimumSize (sizeHint ());
}
diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp
index db00e258..b3ccf8eb 100644
--- a/widgets/displaytext.cpp
+++ b/widgets/displaytext.cpp
@@ -497,60 +497,92 @@ namespace
{
void update_selection (QTextCursor& cursor, QColor const& bg, QColor const& fg)
{
- if (!cursor.isNull ())
+ QTextCharFormat format {cursor.charFormat ()};
+ if (bg.isValid ())
{
- QTextCharFormat format {cursor.charFormat ()};
- if (bg.isValid ())
- {
- format.setBackground (bg);
- }
- else
- {
- format.clearBackground ();
- }
- if (fg.isValid ())
- {
- format.setForeground (fg);
- }
- else
- {
- format.clearForeground ();
- }
- cursor.mergeCharFormat (format);
+ format.setBackground (bg);
}
+ else
+ {
+ format.clearBackground ();
+ }
+ if (fg.isValid ())
+ {
+ format.setForeground (fg);
+ }
+ else
+ {
+ format.clearForeground ();
+ }
+ cursor.mergeCharFormat (format);
}
void reset_selection (QTextCursor& cursor)
{
- if (!cursor.isNull ())
+ // restore previous text format, we rely on the text
+ // char format at he start of the selection being the
+ // old one which should be the case
+ auto c2 = cursor;
+ c2.setPosition (c2.selectionStart ());
+ cursor.setCharFormat (c2.charFormat ());
+ }
+}
+
+namespace
+{
+ QString get_timestamp (QTextCursor& cursor)
+ {
+ QString timestamp;
+ if (cursor.movePosition (QTextCursor::PreviousCharacter)
+ && cursor.movePosition (QTextCursor::StartOfLine)
+ && cursor.movePosition (QTextCursor::EndOfWord, QTextCursor::KeepAnchor)
+ && cursor.hasSelection ())
{
- // restore previous text format, we rely on the text
- // char format at he start of the selection being the
- // old one which should be the case
- auto c2 = cursor;
- c2.setPosition (c2.selectionStart ());
- cursor.setCharFormat (c2.charFormat ());
+ timestamp = cursor.selectedText ();
+ cursor.movePosition (QTextCursor::StartOfLine);
}
+ return timestamp;
}
}
void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg,
- QColor const& fg, bool last_only)
+ QColor const& fg, bool last_period_only)
{
+ // qDebug () << "DisplayText::highlight_callsign: callsign:" << callsign << "last period:" << last_period_only;
+ if (!callsign.size ())
+ {
+ return;
+ }
+ QRegularExpression target {QString {"<?"} + callsign + QString {">?"}, QRegularExpression::DontCaptureOption};
QTextCharFormat old_format {currentCharFormat ()};
QTextCursor cursor {document ()};
- if (last_only)
+ if (last_period_only)
{
+ // highlight each instance of the given callsign (word) in the
+ // current period
cursor.movePosition (QTextCursor::End);
- cursor = document ()->find (callsign, cursor
- , QTextDocument::FindBackward | QTextDocument::FindWholeWords);
- if (bg.isValid () || fg.isValid ())
+ QTextCursor period_start {cursor};
+ QTextCursor prior {cursor};
+ auto period_timestamp = get_timestamp (period_start);
+ while (period_timestamp.size () && period_timestamp == get_timestamp (prior))
{
- update_selection (cursor, bg, fg);
+ period_start = prior;
}
- else
+ while (!cursor.isNull () && cursor > period_start)
{
- reset_selection (cursor);
+ cursor = document ()->find (target, cursor
+ , QTextDocument::FindBackward | QTextDocument::FindWholeWords);
+ if (!cursor.isNull () && cursor.hasSelection ())
+ {
+ if (bg.isValid () || fg.isValid ())
+ {
+ update_selection (cursor, bg, fg);
+ }
+ else
+ {
+ reset_selection (cursor);
+ }
+ }
}
}
else
@@ -569,8 +601,11 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg,
}
while (!cursor.isNull ())
{
- cursor = document ()->find (callsign, cursor, QTextDocument::FindWholeWords);
- update_selection (cursor, bg, fg);
+ cursor = document ()->find (target, cursor, QTextDocument::FindWholeWords);
+ if (!cursor.isNull () && cursor.hasSelection ())
+ {
+ update_selection (cursor, bg, fg);
+ }
}
}
else if (pos != highlighted_calls_.end ())
@@ -579,8 +614,11 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg,
QTextCursor cursor {document ()};
while (!cursor.isNull ())
{
- cursor = document ()->find (callsign, cursor, QTextDocument::FindWholeWords);
- reset_selection (cursor);
+ cursor = document ()->find (target, cursor, QTextDocument::FindWholeWords);
+ if (!cursor.isNull () && cursor.hasSelection ())
+ {
+ reset_selection (cursor);
+ }
}
}
}
diff --git a/widgets/displaytext.h b/widgets/displaytext.h
index 5aa8c710..fb8bb613 100644
--- a/widgets/displaytext.h
+++ b/widgets/displaytext.h
@@ -43,7 +43,7 @@ public:
Q_SLOT void appendText (QString const& text, QColor bg = QColor {}, QColor fg = QColor {}
, QString const& call1 = QString {}, QString const& call2 = QString {});
Q_SLOT void erase ();
- Q_SLOT void highlight_callsign (QString const& callsign, QColor const& bg, QColor const& fg, bool last_only);
+ Q_SLOT void highlight_callsign (QString const& callsign, QColor const& bg, QColor const& fg, bool last_period_only);
private:
void mouseDoubleClickEvent (QMouseEvent *) override;
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp
index c8bbed28..ed2fc11a 100644
--- a/widgets/mainwindow.cpp
+++ b/widgets/mainwindow.cpp
@@ -294,7 +294,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_saveAll {false},
m_widebandDecode {false},
m_dataAvailable {false},
- m_blankLine {false},
m_decodedText2 {false},
m_freeText {false},
m_sentFirst73 {false},
@@ -327,7 +326,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_nsendingsh {0},
m_onAirFreq0 {0.0},
m_first_error {true},
- tx_status_label {"Receiving"},
+ tx_status_label {tr ("Receiving")},
wsprNet {new WSPRNet {&m_network_manager, this}},
m_appDir {QApplication::applicationDirPath ()},
m_cqStr {""},
@@ -802,8 +801,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
SLOT(setFreq4(int,int)));
decodeBusy(false);
- QString t1[19]={"1 mW","2 mW","5 mW","10 mW","20 mW","50 mW","100 mW","200 mW","500 mW",
- "1 W","2 W","5 W","10 W","20 W","50 W","100 W","200 W","500 W","1 kW"};
m_msg[0][0]=0;
ui->labDXped->setVisible(false);
@@ -812,13 +809,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->labNextCall->setVisible(false);
ui->labNextCall->setToolTip(""); //### Possibly temporary ? ###
- for(int i=0; i<19; i++) { //Initialize dBm values
- float dbm=(10.0*i)/3.0;
- int ndbm=int(dbm+0.5);
- QString t;
- t = t.asprintf("%d dBm ",ndbm);
- t+=t1[i];
- ui->TxPowerComboBox->addItem(t);
+ char const * const power[] = {"1 mW","2 mW","5 mW","10 mW","20 mW","50 mW","100 mW","200 mW","500 mW",
+ "1 W","2 W","5 W","10 W","20 W","50 W","100 W","200 W","500 W","1 kW"};
+ for(auto i = 0u; i < sizeof power / sizeof power[0]; ++i) { //Initialize dBm values
+ ui->TxPowerComboBox->addItem (QString {"%1 dBm %2"}.arg (int (10. * i / 3.)).arg (power[i]));
}
m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc();
@@ -826,7 +820,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->labAz->setStyleSheet("border: 0px;");
ui->labAz->setText("");
- auto t = "UTC dB DT Freq Message";
+ auto t = "UTC dB DT Freq " + tr ("Message");
ui->decodedTextLabel->setText(t);
ui->decodedTextLabel2->setText(t);
readSettings(); //Restore user's setup parameters
@@ -936,7 +930,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_saveDecoded=ui->actionSave_decoded->isChecked();
m_saveAll=ui->actionSave_all->isChecked();
ui->sbTxPercent->setValue(m_pctx);
- ui->TxPowerComboBox->setCurrentIndex(int(0.3*(m_dBm + 30.0)+0.2));
+ ui->TxPowerComboBox->setCurrentIndex(int(.3 * m_dBm + .2));
ui->cbUploadWSPR_Spots->setChecked(m_uploadSpots);
if((m_ndepth&7)==1) ui->actionQuickDecode->setChecked(true);
if((m_ndepth&7)==2) ui->actionMediumDecode->setChecked(true);
@@ -1200,7 +1194,7 @@ void MainWindow::readSettings()
m_ndepth=m_settings->value("NDepth",3).toInt();
m_pctx=m_settings->value("PctTx",20).toInt();
m_dBm=m_settings->value("dBm",37).toInt();
- m_send_RR73=m_settings->value("RR73",37).toBool();
+ m_send_RR73=m_settings->value("RR73",false).toBool();
if(m_send_RR73) {
m_send_RR73=false;
on_txrb4_doubleClicked();
@@ -1426,15 +1420,9 @@ void MainWindow::dataSink(qint64 frames)
if(m_ihsym==40 and m_decoderBusy) {
qDebug() << "Clearing hung decoder status";
decodeDone(); //Clear a hung decoder status
- m_blankLine=true;
}
}
- /*
- if(m_ihsym==m_hsymStop or (m_mode=="FT8" and m_ihsym==m_earlyDecode and !m_diskData) or
- (m_mode=="FT8" and m_ihsym==m_earlyDecode2 and !m_diskData)) {
- */
-
bool bCallDecoder=false;
if(m_ihsym==m_hsymStop) bCallDecoder=true;
if(m_mode=="FT8" and !m_diskData) {
@@ -1786,8 +1774,8 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
m_config.transceiver_online ();
if(!m_bFastMode) setXIT (ui->TxFreqSpinBox->value ());
if(m_config.single_decode() or m_mode=="JT4") {
- ui->label_6->setText("Single-Period Decodes");
- ui->label_7->setText("Average Decodes");
+ ui->label_6->setText(tr ("Single-Period Decodes"));
+ ui->label_7->setText(tr ("Average Decodes"));
}
update_watchdog_label ();
@@ -2109,7 +2097,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
case Qt::Key_Z: //### Recover from hung decode() ?? ###
if(e->modifiers() & Qt::AltModifier) {
decodeDone();
- m_blankLine=true;
return;
}
break; case Qt::Key_PageUp:
@@ -2299,10 +2286,13 @@ void MainWindow::setup_status_bar (bool vhf)
mode_label.setStyleSheet ("QLabel{background-color: #99ff33}");
} else if ("MSK144" == m_mode) {
mode_label.setStyleSheet ("QLabel{background-color: #ff6666}");
+ } else if ("FT4" == m_mode) {
+ mode_label.setStyleSheet ("QLabel{background-color: #ff0099}");
} else if ("FT8" == m_mode) {
mode_label.setStyleSheet ("QLabel{background-color: #6699ff}");
} else if ("FreqCal" == m_mode) {
- mode_label.setStyleSheet ("QLabel{background-color: #ff9933}"); }
+ mode_label.setStyleSheet ("QLabel{background-color: #ff9933}");
+ }
last_tx_label.setText (QString {});
if (m_mode.contains (QRegularExpression {R"(^(Echo|ISCAT))"})) {
if (band_hopping_label.isVisible ()) statusBar ()->removeWidget (&band_hopping_label);
@@ -2829,7 +2819,6 @@ void MainWindow::on_DecodeButton_clicked (bool /* checked */) //Decode request
if(!m_mode.startsWith ("WSPR") && !m_decoderBusy) {
dec_data.params.newdat=0;
dec_data.params.nagain=1;
- m_blankLine=false; // don't insert the separator again
decode();
}
}
@@ -3120,11 +3109,6 @@ void MainWindow::decodeDone ()
ui->DecodeButton->setChecked (false);
decodeBusy(false);
m_RxLog=0;
- m_blankLine=true;
- if(m_mode=="FT8") {
- if(dec_data.params.nzhsym==m_earlyDecode) m_blankLine=false;
- if(dec_data.params.nzhsym==m_earlyDecode2) m_blankLine=false;
- }
if(SpecOp::FOX == m_config.special_op_id()) houndCallers();
to_jt9(m_ihsym,-1,1); //Tell jt9 we know it has finished
@@ -3180,13 +3164,19 @@ void MainWindow::readFromStdout() //readFromStdout
if(navg>=2) bAvgMsg=true;
}
write_all("Rx",line_read.trimmed());
- if (m_config.insert_blank () && m_blankLine && SpecOp::FOX != m_config.special_op_id()) {
- QString band;
- if((QDateTime::currentMSecsSinceEpoch() / 1000 - m_secBandChanged) > 4*int(m_TRperiod)/4) {
- band = ' ' + m_config.bands ()->find (m_freqNominal);
- }
- ui->decodedTextBrowser->insertLineSpacer (band.rightJustified (40, '-'));
- m_blankLine = false;
+ int ntime=6;
+ if(m_TRperiod>=60) ntime=4;
+ if (line_read.left(ntime) != m_tBlankLine) {
+ ui->decodedTextBrowser->new_period ();
+ if (m_config.insert_blank ()
+ && SpecOp::FOX != m_config.special_op_id()) {
+ QString band;
+ if((QDateTime::currentMSecsSinceEpoch() / 1000 - m_secBandChanged) > 4*int(m_TRperiod)/4) {
+ band = ' ' + m_config.bands ()->find (m_freqNominal);
+ }
+ ui->decodedTextBrowser->insertLineSpacer (band.rightJustified (40, '-'));
+ }
+ m_tBlankLine = line_read.left(ntime);
}
DecodedText decodedtext0 {QString::fromUtf8(line_read.constData())};
@@ -3504,11 +3494,6 @@ void MainWindow::decodeBusy(bool b) //decodeBusy()
{
if (!b) {
m_optimizingProgress.reset ();
- } else {
- if (!m_decoderBusy)
- {
- ui->decodedTextBrowser->new_period ();
- }
}
m_decoderBusy=b;
ui->DecodeButton->setEnabled(!b);
@@ -4123,12 +4108,11 @@ void MainWindow::guiUpdate()
} else if(m_monitoring) {
if (!m_tx_watchdog) {
tx_status_label.setStyleSheet("QLabel{background-color: #00ff00}");
- QString t;
- t="Receiving";
+ auto t = tr ("Receiving");
if(m_mode=="MSK144") {
int npct=int(100.0*m_fCPUmskrtd/0.298667);
if(npct>90) tx_status_label.setStyleSheet("QLabel{background-color: #ff0000}");
- t = t.asprintf("Receiving %2d%%",npct);
+ t += QString {" %1%"}.arg (npct, 2);
}
tx_status_label.setText (t);
}
@@ -4228,7 +4212,7 @@ void MainWindow::stopTx2()
WSPR_scheduling ();
m_ntr=0;
}
- last_tx_label.setText("Last Tx: " + m_currentMessage.trimmed());
+ last_tx_label.setText(tr ("Last Tx: %1").arg (m_currentMessage.trimmed()));
}
void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg()
@@ -4451,6 +4435,7 @@ void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers)
if(m_mode=="ISCAT") {
MessageBox::information_message (this,
"Double-click not available for ISCAT mode");
+ return;
}
if(m_decodedText2) {
cursor=ui->decodedTextBrowser->textCursor();
@@ -5147,7 +5132,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
}
if(SpecOp::EU_VHF==m_config.special_op_id()) {
QString a;
- t="<" + t0.split(" ").at(0) + "> <" + t0.split(" ").at(1) + "> ";
+ t="<" + t0s.split(" ").at(0) + "> <" + t0s.split(" ").at(1) + "> ";
a = a.asprintf("%4.4d ",ui->sbSerialNumber->value());
sent=rs + a + m_config.my_grid();
}
@@ -5233,7 +5218,8 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
case Configuration::type_2_msg_1_full:
msgtype(t + my_grid, ui->tx1);
if (!eme_short_codes) {
- if((m_mode=="MSK144" || m_mode=="FT8") && SpecOp::NA_VHF == m_config.special_op_id()) {
+ if((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4") &&
+ SpecOp::NA_VHF == m_config.special_op_id()) {
msgtype(t + "R " + my_grid, ui->tx3);
} else {
msgtype(t + "R" + rpt, ui->tx3);
@@ -5245,7 +5231,8 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
break;
case Configuration::type_2_msg_3_full:
- if ((m_mode=="MSK144" || m_mode=="FT8") && SpecOp::NA_VHF == m_config.special_op_id()) {
+ if ((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4") &&
+ SpecOp::NA_VHF == m_config.special_op_id()) {
msgtype(t + "R " + my_grid, ui->tx3);
msgtype(t + "RRR", ui->tx4);
} else {
@@ -5260,7 +5247,8 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
case Configuration::type_2_msg_5_only:
msgtype(t00 + my_grid, ui->tx1);
if (!eme_short_codes) {
- if ((m_mode=="MSK144" || m_mode=="FT8") && SpecOp::NA_VHF == m_config.special_op_id()) {
+ if ((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4") &&
+ SpecOp::NA_VHF == m_config.special_op_id()) {
msgtype(t + "R " + my_grid, ui->tx3);
msgtype(t + "RRR", ui->tx4);
} else {
@@ -5474,7 +5462,8 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
//### Check this stuff ###
if(itype==7 and m_config.enable_VHF_features() and m_mode=="JT65") shortMsg=true;
if(m_mode=="MSK144" and t.mid(0,1)=="<") text=false;
- if((m_mode=="MSK144" or m_mode=="FT8") and SpecOp::NA_VHF==m_config.special_op_id()) {
+ if((m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4") and
+ SpecOp::NA_VHF==m_config.special_op_id()) {
int i0=t.trimmed().length()-7;
if(t.mid(i0,3)==" R ") text=false;
}
@@ -5734,7 +5723,6 @@ void MainWindow::displayWidgets(qint64 n)
if(i==12) ui->pbR2T->setVisible(b);
if(i==13) ui->pbT2R->setVisible(b);
if(i==14) ui->cbHoldTxFreq->setVisible(b);
- if(i==14 and (!b)) ui->cbHoldTxFreq->setChecked(false);
if(i==15) ui->sbSubmode->setVisible(b);
if(i==16) ui->syncSpinBox->setVisible(b);
if(i==17) ui->WSPR_controls_widget->setVisible(b);
@@ -5796,13 +5784,13 @@ void MainWindow::on_actionFT4_triggered()
// ui->cbAutoSeq->setChecked(false);
m_fastGraph->hide();
m_wideGraph->show();
- ui->decodedTextLabel2->setText(" UTC dB DT Freq Message");
+ ui->decodedTextLabel2->setText(" UTC dB DT Freq " + tr ("Message"));
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
- ui->label_7->setText("Rx Frequency");
- ui->label_6->setText("Band Activity");
- ui->decodedTextLabel->setText( " UTC dB DT Freq Message");
+ ui->label_7->setText(tr ("Rx Frequency"));
+ ui->label_6->setText(tr ("Band Activity"));
+ ui->decodedTextLabel->setText( " UTC dB DT Freq " + tr ("Message"));
displayWidgets(nWidgets("111010000100111000010000000110001"));
ui->txrb2->setEnabled(true);
ui->txrb4->setEnabled(true);
@@ -5840,17 +5828,17 @@ void MainWindow::on_actionFT8_triggered()
m_TRperiod=15.0;
m_fastGraph->hide();
m_wideGraph->show();
- ui->decodedTextLabel2->setText(" UTC dB DT Freq Message");
+ ui->decodedTextLabel2->setText(" UTC dB DT Freq " + tr ("Message"));
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
- ui->label_7->setText("Rx Frequency");
+ ui->label_7->setText(tr ("Rx Frequency"));
if(SpecOp::FOX==m_config.special_op_id()) {
- ui->label_6->setText("Stations calling DXpedition " + m_config.my_callsign());
+ ui->label_6->setText(tr ("Stations calling DXpedition %1").arg (m_config.my_callsign()));
ui->decodedTextLabel->setText( "Call Grid dB Freq Dist Age Continent");
} else {
- ui->label_6->setText("Band Activity");
- ui->decodedTextLabel->setText( " UTC dB DT Freq Message");
+ ui->label_6->setText(tr ("Band Activity"));
+ ui->decodedTextLabel->setText( " UTC dB DT Freq " + tr ("Message"));
}
displayWidgets(nWidgets("111010000100111000010000100110001"));
ui->txrb2->setEnabled(true);
@@ -5871,7 +5859,7 @@ void MainWindow::on_actionFT8_triggered()
ui->tabWidget->setCurrentIndex(2);
ui->TxFreqSpinBox->setValue(300);
displayWidgets(nWidgets("111010000100111000010000000000100"));
- ui->labDXped->setText("Fox");
+ ui->labDXped->setText(tr ("Fox"));
on_fox_log_action_triggered();
}
if(SpecOp::HOUND == m_config.special_op_id()) {
@@ -5881,7 +5869,7 @@ void MainWindow::on_actionFT8_triggered()
ui->tabWidget->setCurrentIndex(0);
ui->cbHoldTxFreq->setChecked(true);
displayWidgets(nWidgets("111010000100110000010000000000110"));
- ui->labDXped->setText("Hound");
+ ui->labDXped->setText(tr ("Hound"));
ui->txrb1->setChecked(true);
ui->txrb2->setEnabled(false);
ui->txrb4->setEnabled(false);
@@ -5945,10 +5933,10 @@ void MainWindow::on_actionJT4_triggered()
m_bFast9=false;
setup_status_bar (bVHF);
ui->sbSubmode->setMaximum(6);
- ui->label_6->setText("Single-Period Decodes");
- ui->label_7->setText("Average Decodes");
- ui->decodedTextLabel->setText("UTC dB DT Freq Message");
- ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
+ ui->label_6->setText(tr ("Single-Period Decodes"));
+ ui->label_7->setText(tr ("Average Decodes"));
+ ui->decodedTextLabel->setText("UTC dB DT Freq " + tr ("Message"));
+ ui->decodedTextLabel2->setText("UTC dB DT Freq " + tr ("Message"));
if(bVHF) {
ui->sbSubmode->setValue(m_nSubMode);
} else {
@@ -5996,19 +5984,19 @@ void MainWindow::on_actionJT9_triggered()
m_fastGraph->show();
ui->TxFreqSpinBox->setValue(700);
ui->RxFreqSpinBox->setValue(700);
- ui->decodedTextLabel->setText("UTC dB T Freq Message");
- ui->decodedTextLabel2->setText("UTC dB T Freq Message");
+ ui->decodedTextLabel->setText("UTC dB T Freq " + tr ("Message"));
+ ui->decodedTextLabel2->setText("UTC dB T Freq " + tr ("Message"));
} else {
ui->cbAutoSeq->setChecked(false);
m_TRperiod=60.0;
- ui->decodedTextLabel->setText("UTC dB DT Freq Message");
- ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
+ ui->decodedTextLabel->setText("UTC dB DT Freq " + tr ("Message"));
+ ui->decodedTextLabel2->setText("UTC dB DT Freq " + tr ("Message"));
}
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
- ui->label_6->setText("Band Activity");
- ui->label_7->setText("Rx Frequency");
+ ui->label_6->setText(tr ("Band Activity"));
+ ui->label_7->setText(tr ("Rx Frequency"));
if(bVHF) {
displayWidgets(nWidgets("111110101000111110010000000000000"));
} else {
@@ -6047,10 +6035,10 @@ void MainWindow::on_actionJT9_JT65_triggered()
m_bFastMode=false;
m_bFast9=false;
ui->sbSubmode->setValue(0);
- ui->label_6->setText("Band Activity");
- ui->label_7->setText("Rx Frequency");
- ui->decodedTextLabel->setText("UTC dB DT Freq Message");
- ui->decodedTextLabel2->setText("UTC dB DT Freq Message");
+ ui->label_6->setText(tr ("Band Activity"));
+ ui->label_7->setText(tr ("Rx Frequency"));
+ ui->decodedTextLabel->setText("UTC dB DT Freq " + tr ("Message"));
+ ui->decodedTextLabel2->setText("UTC dB DT Freq " + tr ("Message"));
displayWidgets(nWidgets("111010000001111000010000000000001"));
fast_config(false);
statusChanged();
@@ -6091,12 +6079,12 @@ void MainWindow::on_actionJT65_triggered()
ui->sbSubmode->setMaximum(2);
if(bVHF) {
ui->sbSubmode->setValue(m_nSubMode);
- ui->label_6->setText("Single-Period Decodes");
- ui->label_7->setText("Average Decodes");
+ ui->label_6->setText(tr ("Single-Period Decodes"));
+ ui->label_7->setText(tr ("Average Decodes"));
} else {
ui->sbSubmode->setValue(0);
- ui->label_6->setText("Band Activity");
- ui->label_7->setText("Rx Frequency");
+ ui->label_6->setText(tr ("Band Activity"));
+ ui->label_7->setText(tr ("Rx Frequency"));
}
if(bVHF) {
displayWidgets(nWidgets("111110010000110110101100010000000"));
@@ -6215,13 +6203,13 @@ void MainWindow::on_actionMSK144_triggered()
ui->RxFreqSpinBox->setMinimum(1400);
ui->RxFreqSpinBox->setMaximum(1600);
ui->RxFreqSpinBox->setSingleStep(10);
- ui->decodedTextLabel->setText("UTC dB T Freq Message");
- ui->decodedTextLabel2->setText("UTC dB T Freq Message");
+ ui->decodedTextLabel->setText("UTC dB T Freq " + tr ("Message"));
+ ui->decodedTextLabel2->setText("UTC dB T Freq " + tr ("Message"));
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_fastGraph->setTRPeriod(m_TRperiod);
- ui->label_6->setText("Band Activity");
- ui->label_7->setText("Tx Messages");
+ ui->label_6->setText(tr ("Band Activity"));
+ ui->label_7->setText(tr ("Tx Messages"));
ui->actionMSK144->setChecked(true);
ui->rptSpinBox->setMinimum(-8);
ui->rptSpinBox->setMaximum(24);
@@ -6401,7 +6389,7 @@ void MainWindow::WSPR_config(bool b)
}
m_bSimplex = true;
} else {
- ui->decodedTextLabel->setText("UTC dB DT Freq Message");
+ ui->decodedTextLabel->setText("UTC dB DT Freq " + tr ("Message"));
m_bSimplex = false;
}
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
@@ -7638,7 +7626,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
if(!m_diskData) {
WSPR_history(m_dialFreqRxWSPR, m_nWSPRdecodes);
if(m_nWSPRdecodes==0 and ui->band_hopping_group_box->isChecked()) {
- t = " Receiving " + m_mode + " ----------------------- " +
+ t = " " + tr ("Receiving") + " " + m_mode + " ----------------------- " +
m_config.bands ()->find (m_dialFreqRxWSPR);
t=WSPR_hhmm(-60) + ' ' + t.rightJustified (66, '-');
ui->decodedTextBrowser->appendText(t);
@@ -7658,7 +7646,6 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
}
m_RxLog=0;
m_startAnother=m_loopall;
- m_blankLine=true;
m_decoderBusy = false;
statusUpdate ();
} else {
@@ -7710,12 +7697,15 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
rxLine += t1;
}
- if (m_config.insert_blank () && m_blankLine) {
- QString band;
- Frequency f=1000000.0*rxFields.at(3).toDouble()+0.5;
- band = ' ' + m_config.bands ()->find (f);
- ui->decodedTextBrowser->appendText(band.rightJustified (71, '-'));
- m_blankLine = false;
+ if (rxLine.left (4) != m_tBlankLine) {
+ ui->decodedTextBrowser->new_period ();
+ if (m_config.insert_blank ()) {
+ QString band;
+ Frequency f=1000000.0*rxFields.at(3).toDouble()+0.5;
+ band = ' ' + m_config.bands ()->find (f);
+ ui->decodedTextBrowser->appendText(band.rightJustified (71, '-'));
+ }
+ m_tBlankLine = rxLine.left(4);
}
m_nWSPRdecodes += 1;
ui->decodedTextBrowser->appendText(rxLine);
@@ -7967,7 +7957,6 @@ void MainWindow::fastPick(int x0, int x1, int y)
if(!m_decoderBusy) {
dec_data.params.newdat=0;
dec_data.params.nagain=1;
- m_blankLine=false; // don't insert the separator again
m_nPick=1;
if(y > 120) m_nPick=2;
m_t0Pick=x0/pixPerSecond;
@@ -8109,7 +8098,7 @@ void MainWindow::tx_watchdog (bool triggered)
if (m_tune) stop_tuning ();
if (m_auto) auto_tx_mode (false);
tx_status_label.setStyleSheet ("QLabel{background-color: #ff0000}");
- tx_status_label.setText ("Runaway Tx watchdog");
+ tx_status_label.setText (tr ("Runaway Tx watchdog"));
QApplication::alert (this);
}
else
@@ -8124,7 +8113,7 @@ void MainWindow::update_watchdog_label ()
{
if (m_config.watchdog () && !m_mode.startsWith ("WSPR"))
{
- watchdog_label.setText (QString {"WD:%1m"}.arg (m_config.watchdog () - m_idleMinutes));
+ watchdog_label.setText (tr ("WD:%1m").arg (m_config.watchdog () - m_idleMinutes));
watchdog_label.setVisible (true);
}
else
diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h
index b4ddee54..96999309 100644
--- a/widgets/mainwindow.h
+++ b/widgets/mainwindow.h
@@ -486,7 +486,6 @@ private:
bool m_dataAvailable;
bool m_bDecoded;
bool m_noSuffix;
- bool m_blankLine;
bool m_decodedText2;
bool m_freeText;
bool m_sentFirst73;
@@ -494,6 +493,7 @@ private:
QString m_currentMessage;
int m_lastMessageType;
QString m_lastMessageSent;
+ QString m_tBlankLine;
bool m_bShMsgs;
bool m_bSWL;
bool m_uploadSpots;
diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp
index b4aecbde..c5ade99a 100644
--- a/widgets/plotter.cpp
+++ b/widgets/plotter.cpp
@@ -488,6 +488,9 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter0.drawLine(x1,24,x1,30);
}
+ int yh=5;
+ int yTxTop=12;
+ int yRxBottom=yTxTop + 2*yh + 4;
if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65"
or m_mode=="QRA64" or m_mode=="FT8" or m_mode=="FT4") {
@@ -513,12 +516,14 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter0.drawLine(x6,24,x6,30);
} else {
+ // Draw the green "goal post"
painter0.setPen(penGreen);
x1=XfromFreq(m_rxFreq);
x2=XfromFreq(m_rxFreq+bw);
- painter0.drawLine(x1,24,x1,30);
- painter0.drawLine(x1,28,x2,28);
- painter0.drawLine(x2,24,x2,30);
+ painter0.drawLine(x1,yRxBottom-yh,x1,yRxBottom);
+ painter0.drawLine(x1,yRxBottom,x2,yRxBottom);
+ painter0.drawLine(x2,yRxBottom-yh,x2,yRxBottom);
+
}
}
@@ -538,9 +543,10 @@ void CPlotter::DrawOverlay() //DrawOverlay()
x1=XfromFreq(m_txFreq-0.5*bw);
x2=XfromFreq(m_txFreq+0.5*bw);
}
- painter0.drawLine(x1,17,x1,21);
- painter0.drawLine(x1,17,x2,17);
- painter0.drawLine(x2,17,x2,21);
+ // Draw the red "goal post"
+ painter0.drawLine(x1,yTxTop,x1,yTxTop+yh);
+ painter0.drawLine(x1,yTxTop,x2,yTxTop);
+ painter0.drawLine(x2,yTxTop,x2,yTxTop+yh);
}
if(m_mode=="JT9+JT65") {
diff --git a/widgets/widegraph.ui b/widgets/widegraph.ui
index d302fac6..fce5f107 100644
--- a/widgets/widegraph.ui
+++ b/widgets/widegraph.ui
@@ -157,6 +157,9 @@
<property name="text">
<string>Adjust...</string>
</property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
</widget>
</item>
</layout>
diff --git a/widgets/widgets.pri b/widgets/widgets.pri
index 3c2cb244..4ff058c6 100644
--- a/widgets/widgets.pri
+++ b/widgets/widgets.pri
@@ -9,8 +9,8 @@ SOURCES += \
widgets/colorhighlighting.cpp widgets/ExportCabrillo.cpp \
widgets/AbstractLogWindow.cpp \
widgets/FrequencyLineEdit.cpp widgets/FrequencyDeltaLineEdit.cpp \
- widgets/FoxLogWindow.cpp widgets/CabrilloLogWindow.cpp
-
+ widgets/FoxLogWindow.cpp widgets/CabrilloLogWindow.cpp \
+ widgets/HelpTextWindow.cpp
HEADERS += \
widgets/mainwindow.h widgets/plotter.h \
widgets/about.h widgets/widegraph.h \
@@ -21,7 +21,7 @@ HEADERS += \
widgets/fastplot.h widgets/MessageBox.hpp widgets/colorhighlighting.h \
widgets/ExportCabrillo.h widgets/AbstractLogWindow.hpp \
widgets/FoxLogWindow.hpp widgets/CabrilloLogWindow.hpp \
- widgets/DateTimeEdit.hpp
+ widgets/DateTimeEdit.hpp widgets/HelpTextWindow.hpp
FORMS += \
widgets/mainwindow.ui widgets/about.ui \