summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2022-08-08 23:08:17 +0200
committerChristoph Berg <myon@debian.org>2022-08-08 23:08:17 +0200
commit43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (patch)
treefac973fdc7378510849f4d749cd311176c023ebb /widgets
parentd47341d71ff3df889c1180eb7bfb4fc0272eb26b (diff)
New upstream version 2.6.0~rc2+repackupstream/2.6.0_rc2+repack
Diffstat (limited to 'widgets')
-rwxr-xr-xwidgets/AbstractLogWindow.cpp64
-rwxr-xr-xwidgets/CabrilloLogWindow.cpp9
-rwxr-xr-xwidgets/CabrilloLogWindow.hpp1
-rwxr-xr-xwidgets/CabrilloLogWindow.ui19
-rwxr-xr-xwidgets/FrequencyDeltaLineEdit.cpp4
-rwxr-xr-xwidgets/FrequencyLineEdit.cpp2
-rwxr-xr-xwidgets/about.cpp5
-rwxr-xr-xwidgets/activeStations.cpp125
-rwxr-xr-xwidgets/activeStations.h52
-rwxr-xr-xwidgets/activeStations.ui202
-rwxr-xr-xwidgets/astro.cpp6
-rwxr-xr-xwidgets/displaytext.cpp46
-rwxr-xr-xwidgets/displaytext.h4
-rwxr-xr-xwidgets/logqso.cpp10
-rwxr-xr-xwidgets/mainwindow.cpp877
-rwxr-xr-xwidgets/mainwindow.h55
-rwxr-xr-xwidgets/mainwindow.ui1016
-rwxr-xr-xwidgets/signalmeter.cpp2
-rwxr-xr-xwidgets/widgets.pri3
19 files changed, 1860 insertions, 642 deletions
diff --git a/widgets/AbstractLogWindow.cpp b/widgets/AbstractLogWindow.cpp
index b8e2d7e7..667573ce 100755
--- a/widgets/AbstractLogWindow.cpp
+++ b/widgets/AbstractLogWindow.cpp
@@ -10,6 +10,7 @@
#include <QSqlTableModel>
#include <QItemSelectionModel>
#include <QItemSelection>
+#include <QTimer>
#include "Configuration.hpp"
#include "SettingsGroup.hpp"
#include "MessageBox.hpp"
@@ -71,7 +72,7 @@ void AbstractLogWindow::impl::delete_QSOs ()
{
// We must work with source model indexes because we don't want row
// removes to invalidate model indexes we haven't yet processed. We
- // achieve that by processing them in decending row order.
+ // achieve that by processing them in descending row order.
for (auto& row_index : row_indexes)
{
row_index = model_.mapToSource (row_index);
@@ -79,38 +80,47 @@ void AbstractLogWindow::impl::delete_QSOs ()
// reverse sort by row
std::sort (row_indexes.begin (), row_indexes.end (), row_is_higher);
+
for (auto index : row_indexes)
{
- auto row = model_.mapFromSource (index).row ();
- model_.removeRow (row);
- self_->log_model_changed ();
+ auto row = model_.mapFromSource(index).row();
+ model_.removeRow(row);
+ self_->log_model_changed();
}
}
}
+
AbstractLogWindow::AbstractLogWindow (QString const& settings_key, QSettings * settings
, Configuration const * configuration
, QWidget * parent)
: QWidget {parent}
- , m_ {this, settings_key, settings, configuration}
-{
- // this attempt to scroll to the last new record doesn't work, some
- // sort of issue with model indexes and optimized DB fetches. For
- // now sorting by the same column and direction as the underlying DB
- // select and that DB select being in descending order so new rows
- // at the end appear at view row 0 gets the job done
-
- // // ensure view scrolls to latest new row
- // connect (&m_->model_, &QAbstractItemModel::rowsInserted, this, [this] (QModelIndex const& parent, int first, int last) {
- // // note col 0 is hidden so use col 1
- // // queued connection required otherwise row may not be available
- // // in time
- // auto index = m_->model_.index (last, 1, parent);
- // if (m_->log_view_)
- // {
- // m_->log_view_->scrollTo (index);
- // }
- // }, Qt::QueuedConnection);
+ , m_ {this, settings_key, settings, configuration} {
+ // when we're viewing the log by contact ID (visually, up/down chevron in the column heading),
+ // when we add a contact, scroll the list to the top or bottom, depending on the sort order.
+ // If the table is sorted by some other criteria, don't change anything.
+
+ connect(&m_->model_, &QAbstractItemModel::rowsInserted, this,
+ [this](QModelIndex const &parent, int first, int last) {
+ (void) (parent); // UNUSED
+ (void) (first); // UNUSED
+ (void) (last); // UNUSED
+ QTimer::singleShot(0, [=] {
+ // if we're sorting by the date, then show the most-recently logged contact.
+ // Otherwise, leave the scroll alone
+ auto horizontal_header = m_->log_view_->horizontalHeader ();
+ if (horizontal_header->sortIndicatorSection() == 3) { // sorting on date?
+ if (horizontal_header->sortIndicatorOrder() == Qt::AscendingOrder) {
+ // we're sorting oldes->newest, so go to bottom
+ m_->log_view_->scrollToBottom();
+ } else {
+ m_->log_view_->scrollToTop();
+ }
+ }
+
+ });
+ }
+ );
}
AbstractLogWindow::~AbstractLogWindow ()
@@ -134,11 +144,14 @@ void AbstractLogWindow::set_log_view (QTableView * log_view)
log_view->setVerticalScrollMode (QAbstractItemView::ScrollPerPixel);
m_->model_.setSourceModel (log_view->model ());
log_view->setModel (&m_->model_);
- log_view->setColumnHidden (0, true);
+ log_view->setColumnHidden (0, true); // hide the ID column
auto horizontal_header = log_view->horizontalHeader ();
+
horizontal_header->setResizeContentsPrecision (0); // visible region only
horizontal_header->setSectionResizeMode (QHeaderView::ResizeToContents);
horizontal_header->setSectionsMovable (true);
+ horizontal_header->setSortIndicator(3, Qt::AscendingOrder); // sort by the contact datetime oldest->newest
+
auto vertical_header = log_view->horizontalHeader ();
vertical_header->setResizeContentsPrecision (0); // visible region only
vertical_header->setSectionResizeMode (QHeaderView::ResizeToContents);
@@ -149,6 +162,9 @@ void AbstractLogWindow::set_log_view (QTableView * log_view)
connect (delete_action, &QAction::triggered, [this] (bool /*checked*/) {
m_->delete_QSOs ();
});
+
+ // scroll to bottom, since we're showing 1-N
+ log_view->scrollToBottom();
}
void AbstractLogWindow::set_log_view_font (QFont const& font)
diff --git a/widgets/CabrilloLogWindow.cpp b/widgets/CabrilloLogWindow.cpp
index 5c219fcd..89aba0cb 100755
--- a/widgets/CabrilloLogWindow.cpp
+++ b/widgets/CabrilloLogWindow.cpp
@@ -70,7 +70,9 @@ CabrilloLogWindow::CabrilloLogWindow (QSettings * settings, Configuration const
m_->ui_.log_table_view->setItemDelegateForColumn (3, new SQLiteDateTimeDelegate {this});
m_->ui_.log_table_view->setItemDelegateForColumn (4, new CallsignDelegate {this});
auto h_header = m_->ui_.log_table_view->horizontalHeader ();
+ m_->ui_.log_table_view->verticalHeader()->setVisible(false); // turn off line numbers for the table view
h_header->moveSection (7, 1); // band to first column
+
}
CabrilloLogWindow::~CabrilloLogWindow ()
@@ -88,3 +90,10 @@ void CabrilloLogWindow::log_model_changed (int row)
m_->log_model_->select ();
}
}
+
+void CabrilloLogWindow::set_nQSO(int n)
+{
+ QString t;
+ t=t.asprintf("%d QSOs",n);
+ m_->ui_.nQSO_lineEdit->setText(t);
+}
diff --git a/widgets/CabrilloLogWindow.hpp b/widgets/CabrilloLogWindow.hpp
index e2aa1627..25780bc5 100755
--- a/widgets/CabrilloLogWindow.hpp
+++ b/widgets/CabrilloLogWindow.hpp
@@ -16,6 +16,7 @@ public:
explicit CabrilloLogWindow (QSettings *, Configuration const *, QSqlTableModel * cabrillo_log_model
, QWidget * parent = nullptr);
~CabrilloLogWindow ();
+ Q_SLOT void set_nQSO(int n);
private:
void log_model_changed (int row) override;
diff --git a/widgets/CabrilloLogWindow.ui b/widgets/CabrilloLogWindow.ui
index 35b4d597..5f31b068 100755
--- a/widgets/CabrilloLogWindow.ui
+++ b/widgets/CabrilloLogWindow.ui
@@ -27,6 +27,25 @@
</attribute>
</widget>
</item>
+ <item>
+ <widget class="QLineEdit" name="nQSO_lineEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>0 QSOs</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<resources/>
diff --git a/widgets/FrequencyDeltaLineEdit.cpp b/widgets/FrequencyDeltaLineEdit.cpp
index b7ed144b..59ae9bc9 100755
--- a/widgets/FrequencyDeltaLineEdit.cpp
+++ b/widgets/FrequencyDeltaLineEdit.cpp
@@ -39,8 +39,8 @@ namespace
FrequencyDeltaLineEdit::FrequencyDeltaLineEdit (QWidget * parent)
: QLineEdit (parent)
{
- setValidator (new MHzValidator {-std::numeric_limits<FrequencyDelta>::max () / 10.e6,
- std::numeric_limits<FrequencyDelta>::max () / 10.e6, this});
+ setValidator (new MHzValidator {static_cast<double>(std::numeric_limits<FrequencyDelta>::min ()) / 10.e6,
+ static_cast<double>(std::numeric_limits<FrequencyDelta>::max ()) / 10.e6, this});
}
auto FrequencyDeltaLineEdit::frequency_delta () const -> FrequencyDelta
diff --git a/widgets/FrequencyLineEdit.cpp b/widgets/FrequencyLineEdit.cpp
index 1ca2ba20..8e74c7db 100755
--- a/widgets/FrequencyLineEdit.cpp
+++ b/widgets/FrequencyLineEdit.cpp
@@ -39,7 +39,7 @@ namespace
FrequencyLineEdit::FrequencyLineEdit (QWidget * parent)
: QLineEdit (parent)
{
- setValidator (new MHzValidator {0., std::numeric_limits<Radio::Frequency>::max () / 10.e6, this});
+ setValidator (new MHzValidator {0., static_cast<double>(std::numeric_limits<Radio::Frequency>::max ()) / 10.e6, this});
}
auto FrequencyLineEdit::frequency () const -> Frequency
diff --git a/widgets/about.cpp b/widgets/about.cpp
index 906af7c5..f6b8f0ab 100755
--- a/widgets/about.cpp
+++ b/widgets/about.cpp
@@ -21,8 +21,9 @@ CAboutDlg::CAboutDlg(QWidget *parent) :
"WSJT-X implements a number of digital modes designed for <br />"
"weak-signal Amateur Radio communication. <br /><br />"
- "&copy; 2001-2021 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />"
- "Steve Franke, K9AN, and Nico Palermo, IV3NWV. <br /><br />"
+ "&copy; 2001-2022 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />"
+ "Steve Franke, K9AN, Nico Palermo, IV3NWV, <br />"
+ "Chester Fennell, KG4IYS, and Uwe Risse, DG2YCB <br /><br />"
"We gratefully acknowledge contributions from AC6SL, AE4JY,<br />"
"DF2ET, DJ0OT, G3WDG, G4KLA, IW3RAB, K3WYC, KA1GT,<br />"
"KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KI7MT, KK1D, ND0B, PY2SDR,<br />"
diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp
new file mode 100755
index 00000000..b5ecbf73
--- /dev/null
+++ b/widgets/activeStations.cpp
@@ -0,0 +1,125 @@
+#include "activeStations.h"
+
+#include <QSettings>
+#include <QApplication>
+#include <QTextCharFormat>
+#include <QDateTime>
+#include <QDebug>
+
+#include "SettingsGroup.hpp"
+#include "qt_helpers.hpp"
+#include "ui_activeStations.h"
+
+#include "moc_activeStations.cpp"
+
+ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget *parent) :
+ QWidget(parent),
+ settings_ {settings},
+ ui(new Ui::ActiveStations)
+{
+ ui->setupUi(this);
+ setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations"));
+ ui->RecentStationsPlainTextEdit->setReadOnly (true);
+ changeFont (font);
+ read_settings ();
+ ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts");
+ connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select()));
+ connect(ui->cbReadyOnly, SIGNAL(toggled(bool)), this, SLOT(on_cbReadyOnly_toggled(bool)));
+}
+
+ActiveStations::~ActiveStations()
+{
+ write_settings ();
+}
+
+void ActiveStations::changeFont (QFont const& font)
+{
+ ui->header_label2->setStyleSheet (font_as_stylesheet (font));
+ ui->RecentStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font));
+ updateGeometry ();
+}
+
+void ActiveStations::read_settings ()
+{
+ SettingsGroup group {settings_, "ActiveStations"};
+ restoreGeometry (settings_->value ("window/geometry").toByteArray ());
+ ui->sbMaxRecent->setValue(settings_->value("MaxRecent",10).toInt());
+ ui->sbMaxAge->setValue(settings_->value("MaxAge",10).toInt());
+ ui->cbReadyOnly->setChecked(settings_->value("ReadyOnly",false).toBool());
+}
+
+void ActiveStations::write_settings ()
+{
+ SettingsGroup group {settings_, "ActiveStations"};
+ settings_->setValue ("window/geometry", saveGeometry ());
+ settings_->setValue("MaxRecent",ui->sbMaxRecent->value());
+ settings_->setValue("MaxAge",ui->sbMaxAge->value());
+ settings_->setValue("ReadyOnly",ui->cbReadyOnly->isChecked());
+}
+
+void ActiveStations::displayRecentStations(QString const& t)
+{
+ ui->RecentStationsPlainTextEdit->setPlainText(t);
+}
+
+int ActiveStations::maxRecent()
+{
+ return ui->sbMaxRecent->value();
+}
+
+int ActiveStations::maxAge()
+{
+ return ui->sbMaxAge->value();
+}
+
+void ActiveStations::select()
+{
+ if(m_clickOK) {
+ qint64 msec=QDateTime::currentMSecsSinceEpoch();
+ if((msec-m_msec0)<500) return;
+ m_msec0=msec;
+ int nline=ui->RecentStationsPlainTextEdit->textCursor().blockNumber();
+ emit callSandP(nline);
+ }
+}
+
+void ActiveStations::setClickOK(bool b)
+{
+ m_clickOK=b;
+}
+
+void ActiveStations::erase()
+{
+ ui->RecentStationsPlainTextEdit->clear();
+}
+
+bool ActiveStations::readyOnly()
+{
+ return ui->cbReadyOnly->isChecked();
+}
+
+void ActiveStations::on_cbReadyOnly_toggled(bool b)
+{
+ m_bReadyOnly=b;
+ emit activeStationsDisplay();
+}
+
+void ActiveStations::setRate(int n)
+{
+ ui->rate->setText(QString::number(n));
+}
+
+void ActiveStations::setScore(int n)
+{
+ ui->score->setText(QLocale(QLocale::English).toString(n));
+}
+
+void ActiveStations::setBandChanges(int n)
+{
+ if(n >= 8) {
+ ui->bandChanges->setStyleSheet("QLineEdit{background: rgb(255, 64, 64)}");
+ } else {
+ ui->bandChanges->setStyleSheet ("");
+ }
+ ui->bandChanges->setText(QString::number(n));
+}
diff --git a/widgets/activeStations.h b/widgets/activeStations.h
new file mode 100755
index 00000000..1897f08d
--- /dev/null
+++ b/widgets/activeStations.h
@@ -0,0 +1,52 @@
+// -*- Mode: C++ -*-
+#ifndef ARRL_DIGI_H_
+#define ARRL_DIGI_H_
+
+#include <QWidget>
+
+class QSettings;
+class QFont;
+
+namespace Ui {
+ class ActiveStations;
+}
+
+class ActiveStations
+ : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0);
+ ~ActiveStations();
+ void displayRecentStations(QString const&);
+ void changeFont (QFont const&);
+ int maxRecent();
+ int maxAge();
+ void setClickOK(bool b);
+ void erase();
+ bool readyOnly();
+ void setRate(int n);
+ void setBandChanges(int n);
+ void setScore(int n);
+ Q_SLOT void select();
+
+ bool m_clickOK=false;
+ bool m_bReadyOnly;
+
+signals:
+ void callSandP(int nline);
+ void activeStationsDisplay();
+
+private:
+ void read_settings ();
+ void write_settings ();
+ Q_SLOT void on_cbReadyOnly_toggled(bool b);
+
+ qint64 m_msec0=0;
+ QSettings * settings_;
+
+ QScopedPointer<Ui::ActiveStations> ui;
+};
+
+#endif
diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui
new file mode 100755
index 00000000..02b1f618
--- /dev/null
+++ b/widgets/activeStations.ui
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ActiveStations</class>
+ <widget class="QWidget" name="ActiveStations">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>395</width>
+ <height>339</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Message Averaging</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="2" column="0">
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QSpinBox" name="sbMaxRecent">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set maximum number of displayed lines.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="prefix">
+ <string>Max N </string>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QLineEdit" name="rate">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Points logged during the past hour.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QSpinBox" name="sbMaxAge">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set maximum elapsed number of T/R sequences.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="prefix">
+ <string>Max Age </string>
+ </property>
+ <property name="minimum">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>4</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Score:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Rate:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="5">
+ <widget class="QLineEdit" name="score">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Total score accumulated since most recent reset of Cabrillo log.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QCheckBox" name="cbReadyOnly">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check tis box to show only stations ready to be called.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>Ready only</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Band Changes:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLineEdit" name="bandChanges">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of band changes during the past hour.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPlainTextEdit" name="RecentStationsPlainTextEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on a line to call that station.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="header_label2">
+ <property name="text">
+ <string>Call Grid Age Points</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/widgets/astro.cpp b/widgets/astro.cpp
index 6437c072..d90a29ed 100755
--- a/widgets/astro.cpp
+++ b/widgets/astro.cpp
@@ -121,12 +121,6 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
AzElFileName.toLocal8Bit ().constData (),
jpleph.toLocal8Bit ().constData ());
- if(!hisgrid.size ()) {
- azmoondx=0.0;
- elmoondx=0.0;
- m_dop=0;
- width2=0.0;
- }
QString message;
{
QTextStream out {&message};
diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp
index d784ead1..65fc1d40 100755
--- a/widgets/displaytext.cpp
+++ b/widgets/displaytext.cpp
@@ -277,6 +277,8 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
gridB4onBand=true;
}
+ if(callB4onBand) m_points=0;
+
message = message.trimmed ();
highlight_types types;
@@ -372,11 +374,17 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
}
m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight);
+ if(((m_points == 00) or (m_points == -1)) and m_bDisplayPoints) return message;
return leftJustifyAppendage (message, extra);
}
-QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage) const
+QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage0) const
{
+ QString appendage=appendage0;
+ if(m_bDisplayPoints and (m_points>0)) {
+ appendage=" " + QString::number(m_points);
+ if(m_points<10) appendage=" " + appendage;
+ }
if (appendage.size ())
{
// allow for seconds
@@ -398,12 +406,15 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
QString const& mode,
bool displayDXCCEntity, LogBook const& logBook,
QString const& currentBand, bool ppfx, bool bCQonly,
- bool haveFSpread, float fSpread)
+ bool haveFSpread, float fSpread, bool bDisplayPoints, int points)
{
+ m_points=points;
+ m_bDisplayPoints=bDisplayPoints;
m_bPrincipalPrefix=ppfx;
QColor bg;
QColor fg;
bool CQcall = false;
+ auto is_73 = decodedText.messageWords().filter (QRegularExpression {"^(73|RR73)$"}).size();
if (decodedText.string ().contains (" CQ ")
|| decodedText.string ().contains (" CQDX ")
|| decodedText.string ().contains (" QRZ "))
@@ -413,19 +424,6 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
else
{
if (bCQonly) return;
- if (myCall.size ())
- {
- QString regexp {"[ <]" + myCall + "[ >]"};
- if (Radio::is_compound_callsign (myCall))
- {
- regexp = "(?:" + regexp + "|[ <]" + Radio::base_callsign (myCall) + "[ >])";
- }
- if ((decodedText.clean_string () + " ").contains (QRegularExpression {regexp}))
- {
- highlight_types types {Highlight::MyCall};
- set_colours (m_config, &bg, &fg, types);
- }
- }
}
auto message = decodedText.string();
QString dxCall;
@@ -446,14 +444,14 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
message = message.left (ap_pos).trimmed ();
}
m_CQPriority="";
- if (CQcall)
+ if (CQcall || (is_73 && (m_config->highlight_73 ())))
{
if (displayDXCCEntity)
{
// if enabled add the DXCC entity and B4 status to the end of the
// preformated text line t1
auto currentMode = mode;
- message = appendWorkedB4 (message, decodedText.CQersCall(), dxGrid, &bg, &fg
+ message = appendWorkedB4 (message, dxCall, dxGrid, &bg, &fg
, logBook, currentBand, currentMode, extra);
}
else
@@ -472,6 +470,20 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
message = leftJustifyAppendage (message, extra);
}
+ if (myCall.size ())
+ {
+ QString regexp {"[ <]" + myCall + "[ >]"};
+ if (Radio::is_compound_callsign (myCall))
+ {
+ regexp = "(?:" + regexp + "|[ <]" + Radio::base_callsign (myCall) + "[ >])";
+ }
+ if ((decodedText.clean_string () + " ").contains (QRegularExpression {regexp}))
+ {
+ highlight_types types {Highlight::MyCall};
+ set_colours (m_config, &bg, &fg, types);
+ }
+ }
+
appendText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
}
diff --git a/widgets/displaytext.h b/widgets/displaytext.h
index 773901ce..5810972c 100755
--- a/widgets/displaytext.h
+++ b/widgets/displaytext.h
@@ -30,12 +30,14 @@ public:
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, QString const& mode,
bool displayDXCCEntity, LogBook const& logBook,
QString const& currentBand=QString {}, bool ppfx=false, bool bCQonly=false,
- bool haveFSpread = false, float fSpread = 0.);
+ bool haveFSpread = false, float fSpread = 0.0, bool bDisplayPoints=false, int points=-99);
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq, bool bFastMode, double TRperiod);
void displayQSY(QString text);
void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {});
void new_period ();
QString CQPriority(){return m_CQPriority;};
+ qint32 m_points;
+ bool m_bDisplayPoints;
Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
Q_SIGNAL void erased ();
diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp
index f4927449..e87a8852 100755
--- a/widgets/logqso.cpp
+++ b/widgets/logqso.cpp
@@ -5,6 +5,7 @@
#include <QSettings>
#include <QStandardPaths>
#include <QDir>
+#include <QPushButton>
#include "logbook/logbook.h"
#include "MessageBox.hpp"
@@ -109,6 +110,15 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
Radio::Frequency dialFreq, bool noSuffix, QString xSent, QString xRcvd)
{
if(!isHidden()) return;
+
+ QPushButton* okBtn = ui->buttonBox->button(QDialogButtonBox::Ok);
+ okBtn->setAutoDefault(true);
+ okBtn->setDefault(true);
+ okBtn->setFocus();
+ QPushButton* caBtn = ui->buttonBox->button(QDialogButtonBox::Cancel);
+ caBtn->setAutoDefault(false);
+ caBtn->setDefault(false);
+
ui->call->setText (hisCall);
ui->grid->setText (hisGrid);
ui->name->clear ();
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp
index ecb5e860..8099aa7f 100755
--- a/widgets/mainwindow.cpp
+++ b/widgets/mainwindow.cpp
@@ -60,6 +60,7 @@
#include "fastgraph.h"
#include "about.h"
#include "messageaveraging.h"
+#include "activeStations.h"
#include "colorhighlighting.h"
#include "widegraph.h"
#include "sleep.h"
@@ -90,6 +91,8 @@
#include "ui_mainwindow.h"
#include "moc_mainwindow.cpp"
+#define FCL fortran_charlen_t
+
extern "C" {
//----------------------------------------------------- C and Fortran routines
void symspec_(struct dec_data *, int* k, double* trperiod, int* nsps, int* ingain,
@@ -133,8 +136,7 @@ extern "C" {
void genmsk_128_90_(char* msg, int* ichk, char* msgsent, int itone[], int* itype,
fortran_charlen_t, fortran_charlen_t);
- void gen65_(char* msg, int* ichk, char* msgsent, int itone[],
- int* itext, fortran_charlen_t, fortran_charlen_t);
+ void gen65(char* msg, int* ichk, char msgsent[], int itone[], int* itext);
void genq65_(char* msg, int* ichk, char* msgsent, int itone[],
int* i3, int* n3, fortran_charlen_t, fortran_charlen_t);
@@ -147,13 +149,11 @@ extern "C" {
void morse_(char* msg, int* icw, int* ncw, fortran_charlen_t);
- int ptt_(int nport, int ntx, int* iptt, int* nopen);
-
void wspr_downsample_(short int d2[], int* k);
int savec2_(char const * fname, int* TR_seconds, double* dial_freq, fortran_charlen_t);
- void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
+ void avecho_( short id2[], int* dop, int* nfrit, int* nauto, int* nqual, float* f1,
float* level, float* sigdb, float* snr, float* dfreq,
float* width);
@@ -170,8 +170,6 @@ extern "C" {
void freqcal_(short d2[], int* k, int* nkhz,int* noffset, int* ntol,
char line[], fortran_charlen_t);
- void fix_contest_msg_(char* MyGrid, char* msg, fortran_charlen_t, fortran_charlen_t);
-
void calibrate_(char const * data_dir, int* iz, double* a, double* b, double* rms,
double* sigmaa, double* sigmab, int* irc, fortran_charlen_t);
@@ -179,13 +177,11 @@ extern "C" {
void plotsave_(float swide[], int* m_w , int* m_h1, int* irow);
- void chkcall_(char* w, char* basc_call, bool cok, int len1, int len2);
-
- void get_ft4msg_(int* idecode, char* line, int len);
-
void chk_samples_(int* m_ihsym,int* k, int* m_hsymStop);
- void save_dxbase_(char* dxbase, int len);
+ void save_dxbase_(char* dxbase, FCL len);
+
+ void indexx_(float arr[], int* n, int indx[]);
}
int volatile itone[MAX_NUM_SYMBOLS]; //Audio tones for all Tx symbols
@@ -209,6 +205,8 @@ QVector<QColor> g_ColorTbl;
using SpecOp = Configuration::SpecialOperatingActivity;
+bool m_displayBand = false;
+
namespace
{
Radio::Frequency constexpr default_frequency {14076000};
@@ -276,6 +274,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_msErase {0},
m_secBandChanged {0},
m_freqNominal {0},
+ m_freqNominalPeriod {0},
m_freqTxNominal {0},
m_reverse_Doppler {"1" == env.value ("WSJT_REVERSE_DOPPLER", "0")},
m_tRemaining {0.},
@@ -295,6 +294,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_secID {0},
m_idleMinutes {0},
m_nSubMode {0},
+ m_nSubMode_Q65 {0},
+ m_nSubMode_JT65 {0},
+ m_nSubMode_JT4 {0},
m_nclearave {1},
m_nWSPRdecodes {0},
m_k0 {9999999},
@@ -604,6 +606,12 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->actionSave_decoded->setActionGroup(saveGroup);
ui->actionSave_all->setActionGroup(saveGroup);
+ QActionGroup* alltxtGroup = new QActionGroup(this);
+ ui->actionDon_t_split_ALL_TXT->setActionGroup(alltxtGroup);
+ ui->actionSplit_ALL_TXT_yearly->setActionGroup(alltxtGroup);
+ ui->actionSplit_ALL_TXT_monthly->setActionGroup(alltxtGroup);
+ ui->actionDisable_writing_of_ALL_TXT->setActionGroup(alltxtGroup);
+
QActionGroup* DepthGroup = new QActionGroup(this);
ui->actionQuickDecode->setActionGroup(DepthGroup);
ui->actionMediumDecode->setActionGroup(DepthGroup);
@@ -743,6 +751,24 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
}
});
+ // ensure a balanced layout of the mode buttons
+ qreal pointSize = m_config.text_font().pointSizeF();
+ if (pointSize < 11) {
+ ui->houndButton->setMaximumWidth(40);
+ ui->ft8Button->setMaximumWidth(40);
+ ui->ft4Button->setMaximumWidth(40);
+ ui->msk144Button->setMaximumWidth(40);
+ ui->q65Button->setMaximumWidth(40);
+ ui->jt65Button->setMaximumWidth(40);
+ } else {
+ ui->houndButton->setMinimumWidth(50);
+ ui->ft8Button->setMinimumWidth(50);
+ ui->ft4Button->setMinimumWidth(50);
+ ui->msk144Button->setMinimumWidth(50);
+ ui->q65Button->setMinimumWidth(50);
+ ui->jt65Button->setMinimumWidth(50);
+ }
+
// hook up save WAV file exit handling
connect (&m_saveWAVWatcher, &QFutureWatcher<QString>::finished, [this] {
// extract the promise from the future
@@ -852,6 +878,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
auto dBm = int ((10. * i / 3.) + .5);
ui->TxPowerComboBox->addItem (QString {"%1 dBm %2"}.arg (dBm).arg (power[i]), dBm);
}
+ ui->respondComboBox->addItem("CQ: None");
+ ui->respondComboBox->addItem("CQ: First");
+ ui->respondComboBox->addItem("CQ: Max Dist");
m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc();
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
@@ -954,7 +983,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->txFirstCheckBox->setChecked(m_txFirst);
morse_(const_cast<char *> (m_config.my_callsign ().toLatin1().constData()),
- const_cast<int *> (icw), &m_ncw, m_config.my_callsign ().length());
+ const_cast<int *> (icw), &m_ncw, (FCL)m_config.my_callsign().length());
on_actionWide_Waterfall_triggered();
ui->cbShMsgs->setChecked(m_bShMsgs);
ui->cbSWL->setChecked(m_bSWL);
@@ -1026,14 +1055,14 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
void MainWindow::not_GA_warning_message ()
{
- // MessageBox::critical_message (this,
- // "This is a pre-release version of WSJT-X " + version (false) + " made\n"
- // "available for testing purposes. By design it will\n"
- // "be nonfunctional after Nov 30, 2021.");
- // auto now = QDateTime::currentDateTimeUtc ();
- // if (now >= QDateTime {{2021, 11, 30}, {23, 59, 59, 999}, Qt::UTC}) {
- // Q_EMIT finished ();
- // }
+ MessageBox::critical_message (this,
+ "This is a pre-release version of WSJT-X 2.6.0 made\n"
+ "available for testing purposes. By design it will\n"
+ "be nonfunctional after Nov 30, 2022.");
+ auto now = QDateTime::currentDateTimeUtc ();
+ if (now >= QDateTime {{2022, 11, 30}, {23, 59, 59, 999}, Qt::UTC}) {
+ Q_EMIT finished ();
+ }
}
void MainWindow::initialize_fonts ()
@@ -1123,7 +1152,8 @@ 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("CallFirst",ui->cbFirst->isChecked());
+ m_settings->setValue ("ActiveStationsDisplayed", m_ActiveStationsWidget && m_ActiveStationsWidget->isVisible ());
+ m_settings->setValue("RespondCQ",ui->respondComboBox->currentIndex());
m_settings->setValue("HoundSort",ui->comboBoxHoundSort->currentIndex());
m_settings->setValue("FoxNlist",ui->sbNlist->value());
m_settings->setValue("FoxNslots",ui->sbNslots->value());
@@ -1144,7 +1174,7 @@ void MainWindow::writeSettings()
m_settings->setValue("FST4W_FTol",ui->sbFST4W_FTol->value());
m_settings->setValue("FST4_FLow",ui->sbF_Low->value());
m_settings->setValue("FST4_FHigh",ui->sbF_High->value());
- m_settings->setValue("SubMode",ui->sbSubmode->value());
+// m_settings->setValue("SubMode",ui->sbSubmode->value());
m_settings->setValue("DTtol",m_DTtol);
m_settings->setValue("Ftol", ui->sbFtol->value ());
m_settings->setValue("MinSync",m_minSync);
@@ -1166,7 +1196,7 @@ void MainWindow::writeSettings()
m_settings->setValue("UploadSpots",m_uploadWSPRSpots);
m_settings->setValue("NoOwnCall",ui->cbNoOwnCall->isChecked());
m_settings->setValue ("BandHopping", ui->band_hopping_group_box->isChecked ());
- m_settings->setValue ("TRPeriod", ui->sbTR->value ());
+// m_settings->setValue ("TRPeriod", ui->sbTR->value ());
m_settings->setValue ("MaxDrift", ui->sbMaxDrift->value());
m_settings->setValue ("TRPeriod_FST4W", ui->sbTR_FST4W->value ());
m_settings->setValue("FastMode",m_bFastMode);
@@ -1179,6 +1209,7 @@ void MainWindow::writeSettings()
m_settings->setValue ("AutoClearAvg", ui->actionAuto_Clear_Avg->isChecked ());
m_settings->setValue("SplitterState",ui->decodes_splitter->saveState());
m_settings->setValue("Blanker",ui->sbNB->value());
+ m_settings->setValue("Score",m_score);
{
QList<QVariant> coeffs; // suitable for QSettings
@@ -1188,6 +1219,10 @@ void MainWindow::writeSettings()
}
m_settings->setValue ("PhaseEqualizationCoefficients", QVariant {coeffs});
}
+ m_settings->setValue ("actionDontSplitALLTXT", ui->actionDon_t_split_ALL_TXT->isChecked() );
+ m_settings->setValue ("splitAllTxtYearly", ui->actionSplit_ALL_TXT_yearly->isChecked() );
+ m_settings->setValue ("splitAllTxtMonthly", ui->actionSplit_ALL_TXT_monthly->isChecked() );
+ m_settings->setValue ("disableWritingOfAllTxt", ui->actionDisable_writing_of_ALL_TXT->isChecked() );
m_settings->endGroup();
}
@@ -1195,7 +1230,7 @@ void MainWindow::writeSettings()
void MainWindow::readSettings()
{
ui->cbAutoSeq->setVisible(false);
- ui->cbFirst->setVisible(false);
+ ui->respondComboBox->setVisible(false);
m_settings->beginGroup("MainWindow");
std::array<QByteArray, 3> the_geometries;
the_geometries[0] = m_settings->value ("geometry", saveGeometry ()).toByteArray ();
@@ -1217,7 +1252,8 @@ 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->cbFirst->setChecked(m_settings->value("CallFirst",true).toBool());
+ bool displayActiveStations = m_settings->value ("ActiveStationsDisplayed", false).toBool ();
+ ui->respondComboBox->setCurrentIndex(m_settings->value("RespondCQ",0).toInt());
ui->comboBoxHoundSort->setCurrentIndex(m_settings->value("HoundSort",3).toInt());
ui->sbNlist->setValue(m_settings->value("FoxNlist",12).toInt());
m_Nslots=m_settings->value("FoxNslots",5).toInt();
@@ -1230,6 +1266,10 @@ void MainWindow::readSettings()
ui->actionAstronomical_data->setChecked (displayAstro);
m_settings->beginGroup("Common");
+ ui->actionDon_t_split_ALL_TXT->setChecked(m_settings->value("actionDontSplitALLTXT", true).toBool());
+ ui->actionSplit_ALL_TXT_yearly->setChecked(m_settings->value("splitAllTxtYearly", false).toBool());
+ ui->actionSplit_ALL_TXT_monthly->setChecked(m_settings->value("splitAllTxtMonthly", false).toBool());
+ ui->actionDisable_writing_of_ALL_TXT->setChecked(m_settings->value("disableWritingOfAllTxt", false).toBool());
m_mode=m_settings->value("Mode","JT9").toString();
ui->actionNone->setChecked(m_settings->value("SaveNone",true).toBool());
ui->actionSave_decoded->setChecked(m_settings->value("SaveDecoded",false).toBool());
@@ -1240,8 +1280,14 @@ void MainWindow::readSettings()
ui->sbFST4W_RxFreq->setValue(m_settings->value("FST4W_RxFreq",1500).toInt());
ui->sbF_Low->setValue(m_settings->value("FST4_FLow",600).toInt());
ui->sbF_High->setValue(m_settings->value("FST4_FHigh",1400).toInt());
- m_nSubMode=m_settings->value("SubMode",0).toInt();
- ui->sbSubmode->setValue(m_nSubMode);
+// m_nSubMode=m_settings->value("SubMode",0).toInt();
+ if (m_mode=="Q65") m_nSubMode=m_settings->value("SubMode_Q65",0).toInt();
+ if (m_mode=="JT65") m_nSubMode=m_settings->value("SubMode_JT65",0).toInt();
+ if (m_mode=="JT4") m_nSubMode=m_settings->value("SubMode_JT4",0).toInt();
+// ui->sbSubmode->setValue(m_nSubMode);
+ if (m_mode=="Q65") ui->sbSubmode->setValue(m_nSubMode_Q65);
+ if (m_mode=="JT65") ui->sbSubmode->setValue(m_nSubMode_JT65);
+ if (m_mode=="JT4") ui->sbSubmode->setValue(m_nSubMode_JT4);
ui->sbFtol->setValue (m_settings->value("Ftol", 50).toInt());
ui->sbFST4W_FTol->setValue(m_settings->value("FST4W_FTol",100).toInt());
m_minSync=m_settings->value("MinSync",0).toInt();
@@ -1252,7 +1298,10 @@ void MainWindow::readSettings()
m_bSWL=m_settings->value("SWL",false).toBool();
m_bFast9=m_settings->value("Fast9",false).toBool();
m_bFastMode=m_settings->value("FastMode",false).toBool();
- ui->sbTR->setValue (m_settings->value ("TRPeriod", 15).toInt());
+// ui->sbTR->setValue (m_settings->value ("TRPeriod", 15).toInt());
+ if (m_mode=="Q65") ui->sbTR->setValue (m_settings->value ("TRPeriod_Q65", 30).toInt());
+ if (m_mode=="MSK144") ui->sbTR->setValue (m_settings->value ("TRPeriod_MSK144", 15).toInt());
+ if (m_mode=="FST4") ui->sbTR->setValue (m_settings->value ("TRPeriod_FST4", 60).toInt());
ui->sbMaxDrift->setValue (m_settings->value ("MaxDrift",0).toInt());
ui->sbTR_FST4W->setValue (m_settings->value ("TRPeriod_FST4W", 15).toInt());
m_lastMonitoredFrequency = m_settings->value ("DialFreq",
@@ -1267,6 +1316,7 @@ void MainWindow::readSettings()
ui->RoundRobin->setCurrentText(m_settings->value("RoundRobin",tr("Random")).toString());
m_dBm=m_settings->value("dBm",37).toInt();
m_send_RR73=m_settings->value("RR73",false).toBool();
+ m_score=m_settings->value("Score",0).toInt();
if(m_send_RR73) {
m_send_RR73=false;
on_txrb4_doubleClicked();
@@ -1306,13 +1356,17 @@ void MainWindow::readSettings()
// use these initialisation settings to tune the audio o/p buffer
// size and audio thread priority
m_settings->beginGroup ("Tune");
- m_audioThreadPriority = static_cast<QThread::Priority> (m_settings->value ("Audio/ThreadPriority", QThread::HighPriority).toInt () % 8);
+ m_audioThreadPriority = static_cast<QThread::Priority> (m_settings->value ("Audio/ThreadPriority", QThread::TimeCriticalPriority).toInt () % 8);
m_settings->endGroup ();
checkMSK144ContestType();
if(displayMsgAvg) on_actionMessage_averaging_triggered();
if (displayFoxLog) on_fox_log_action_triggered ();
if (displayContestLog) on_contest_log_action_triggered ();
+ if(displayActiveStations) {
+ on_actionActiveStations_triggered();
+// QFile f {m_config.writeable_data_dir ().absoluteFilePath ("activeCalls.txt")};
+ }
}
void MainWindow::checkMSK144ContestType()
@@ -1369,6 +1423,10 @@ void MainWindow::setDecodedTextFont (QFont const& font)
}
if (m_contestLogWindow) {
m_contestLogWindow->set_log_view_font (font);
+ m_contestLogWindow->set_nQSO(m_logBook.contest_log()->n_qso());
+ }
+ if(m_ActiveStationsWidget != NULL) {
+ m_ActiveStationsWidget->changeFont(font);
}
updateGeometry ();
}
@@ -1440,7 +1498,7 @@ void MainWindow::dataSink(qint64 frames)
m_bUseRef=m_wideGraph->useRef();
if(!m_diskData) {
refspectrum_(&dec_data.d2[k-m_nsps/2],&m_bClearRefSpec,&m_bRefSpec,
- &m_bUseRef, fname.constData (), fname.size ());
+ &m_bUseRef, fname.constData (), (FCL)fname.size ());
}
m_bClearRefSpec=false;
@@ -1480,11 +1538,11 @@ void MainWindow::dataSink(qint64 frames)
int RxFreq=ui->RxFreqSpinBox->value ();
int nkhz=(m_freqNominal+RxFreq)/1000;
int ftol = ui->sbFtol->value ();
- freqcal_(&dec_data.d2[0],&k,&nkhz,&RxFreq,&ftol,&line[0],80);
+ freqcal_(&dec_data.d2[0], &k, &nkhz, &RxFreq, &ftol, &line[0], (FCL)80);
QString t=QString::fromLatin1(line);
DecodedText decodedtext {t};
- ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign (), m_mode, m_config.DXCC (),
- m_logBook, m_currentBand, m_config.ppfx ());
+ ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign(),
+ m_mode, m_config.DXCC(), m_logBook, m_currentBand, m_config.ppfx());
if (ui->measure_check_box->isChecked ()) {
// Append results text to file "fmt.all".
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")};
@@ -1529,8 +1587,10 @@ void MainWindow::dataSink(qint64 frames)
}
if(bCallDecoder) {
if(m_mode=="Echo") {
- float snr=0;
+ float dBerr=0.0;
int nfrit=0;
+ int nauto=0;
+ if(m_auto) nauto=1;
int nqual=0;
float f1=1500.0;
float xlevel=0.0;
@@ -1539,11 +1599,11 @@ void MainWindow::dataSink(qint64 frames)
float width=0.0;
echocom_.nclearave=m_nclearave;
int nDop=0;
- avecho_(dec_data.d2,&nDop,&nfrit,&nqual,&f1,&xlevel,&sigdb,
- &snr,&dfreq,&width);
+ avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&nqual,&f1,&xlevel,&sigdb,
+ &dBerr,&dfreq,&width);
QString t;
- t = t.asprintf("%3d %7.1f %7.1f %7.1f %7.1f %3d",echocom_.nsum,xlevel,sigdb,
- dfreq,width,nqual);
+ t = t.asprintf("%3d %7.1f %7.1f %7.1f %7.1f %7.1f %3d",echocom_.nsum,xlevel,sigdb,
+ dBerr,dfreq,width,nqual);
t=QDateTime::currentDateTimeUtc().toString("hh:mm:ss ") + t;
if (ui) ui->decodedTextBrowser->appendText(t);
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
@@ -1593,13 +1653,13 @@ void MainWindow::dataSink(qint64 frames)
// idea to pass pointer to be processed in another thread
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)));
+ m_config.my_grid(), m_mode, m_nSubMode, m_freqNominalPeriod, m_hisCall, m_hisGrid)));
if (m_mode=="WSPR") {
auto c2name {(m_fnameWE + ".c2").toLocal8Bit ()};
int nsec=120;
int nbfo=1500;
double f0m1500=m_freqNominal/1000000.0 + nbfo - 1500;
- int err = savec2_(c2name.constData (),&nsec,&f0m1500, c2name.size ());
+ int err = savec2_(c2name.constData (),&nsec,&f0m1500, (FCL)c2name.size());
if (err!=0) MessageBox::warning_message (this, tr ("Error saving c2 file"), c2name);
}
}
@@ -1720,9 +1780,10 @@ void MainWindow::fastSink(qint64 frames)
float rmsNoGain = 0;
int ftol = ui->sbFtol->value ();
hspec_(dec_data.d2,&k,&nutc0,&nTRpDepth,&RxFreq,&ftol,&bmsk144,
- &m_bTrain,m_phaseEqCoefficients.constData(),&m_inGain,&dec_data.params.mycall[0],
- &dec_data.params.hiscall[0],&bshmsg,&bswl,
- data_dir.constData (),fast_green,fast_s,&fast_jh,&pxmax,&rmsNoGain,&line[0],12,12,data_dir.size (),80);
+ &m_bTrain,m_phaseEqCoefficients.constData(),&m_inGain,&dec_data.params.mycall[0],
+ &dec_data.params.hiscall[0],&bshmsg,&bswl,
+ data_dir.constData (),fast_green,fast_s,&fast_jh,&pxmax,&rmsNoGain,&line[0],(FCL)12,
+ (FCL)12,(FCL)data_dir.size (),(FCL)80);
float px = fast_green[fast_jh];
QString t;
t = t.asprintf(" Rx noise: %5.1f ",px);
@@ -1824,7 +1885,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
m_baseCall = Radio::base_callsign (m_config.my_callsign ());
ui->tx1->setEnabled (elide_tx1_not_allowed () || ui->tx1->isEnabled ());
morse_(const_cast<char *> (m_config.my_callsign ().toLatin1().constData()),
- const_cast<int *> (icw), &m_ncw, m_config.my_callsign ().length());
+ const_cast<int *> (icw), &m_ncw, (FCL)m_config.my_callsign().length());
}
if (m_config.my_callsign () != callsign || m_config.my_grid () != my_grid) {
statusUpdate ();
@@ -1944,14 +2005,12 @@ void MainWindow::on_actionAbout_triggered() //Display "About"
void MainWindow::on_autoButton_clicked (bool checked)
{
m_auto = checked;
+ m_maxPoints=-1;
if (checked
- && ui->cbFirst->isVisible () && ui->cbFirst->isChecked()
+ && ui->respondComboBox->isVisible () && ui->respondComboBox->currentText() != "CQ: None"
&& CALLING == m_QSOProgress) {
m_bAutoReply = false; // ready for next
- m_bCallingCQ = true; // allows tail-enders to be picked up
- ui->cbFirst->setStyleSheet ("QCheckBox{color:red}");
- } else {
- ui->cbFirst->setStyleSheet("");
+ m_bCallingCQ = true; // allows tail-enders to be picked up
}
if (!checked) m_bCallingCQ = false;
statusUpdate ();
@@ -2014,9 +2073,10 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
}
return;
case Qt::Key_C:
- if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) {
- bool b=ui->cbFirst->isChecked();
- ui->cbFirst->setChecked(!b);
+ if(e->modifiers() & Qt::AltModifier) {
+ int n=ui->respondComboBox->currentIndex()+1;
+ if(n>2) n=0;
+ ui->respondComboBox->setCurrentIndex(n);
}
return;
case Qt::Key_D:
@@ -2077,8 +2137,9 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
}
case Qt::Key_F6:
if(bAltF1F6) {
- bool b=ui->cbFirst->isChecked();
- ui->cbFirst->setChecked(!b);
+ int n=ui->respondComboBox->currentIndex()+1;
+ if(n>2) n=0;
+ ui->respondComboBox->setCurrentIndex(n);
} else {
if(e->modifiers() & Qt::ShiftModifier) {
on_actionDecode_remaining_files_in_directory_triggered();
@@ -2234,6 +2295,13 @@ void MainWindow::displayDialFrequency ()
m_wideGraph->setRxBand (band_name);
m_lastBand = band_name;
band_changed(dial_frequency);
+ // prevent wrong frequencies for all.txt, PSK Reporter and highlighting for late decodes after band changes
+ m_displayBand = false;
+ QTimer::singleShot ((int(600.0*m_TRperiod)), [=] {
+ m_freqNominalPeriod = m_freqNominal;
+ m_currentBandPeriod = m_currentBand;
+ m_displayBand = true;
+ });
}
// search working frequencies for one we are within 10kHz of (1 Mhz
@@ -2537,7 +2605,7 @@ void MainWindow::on_actionSolve_FreqCal_triggered()
auto data_dir {QDir::toNativeSeparators(m_config.writeable_data_dir().absolutePath()).toLocal8Bit ()};
int iz,irc;
double a,b,rms,sigmaa,sigmab;
- calibrate_(data_dir.constData (),&iz,&a,&b,&rms,&sigmaa,&sigmab,&irc,data_dir.size ());
+ calibrate_(data_dir.constData(), &iz, &a, &b, &rms, &sigmaa, &sigmab, &irc, (FCL)data_dir.size());
QString t2;
if(irc==-1) t2="Cannot open " + data_dir + "/fmt.all";
if(irc==-2) t2="Cannot open " + data_dir + "/fcal2.out";
@@ -2582,10 +2650,11 @@ 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, FST4, FT8, "
"JT4, JT6M, JT9, JT65, JTMS, QRA64, Q65, MSK144 are Copyright (C) "
- "2001-2021 by one or more of the following authors: Joseph Taylor, "
+ "2001-2022 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.\"");
+ "Philip Karn, KA9Q; Chester Fennell, KG4IYS; Uwe Risse, DG2YCB; "
+ "and other members of the WSJT Development Group.\"");
MessageBox::warning_message(this, message);
}
@@ -2710,6 +2779,9 @@ void MainWindow::on_contest_log_action_triggered()
m_contestLogWindow->showNormal ();
m_contestLogWindow->raise ();
m_contestLogWindow->activateWindow ();
+ // connect signal from m_logBook.contest_log to m_contestLogWindow
+ connect(m_logBook.contest_log(), &CabrilloLog::qso_count_changed, m_contestLogWindow.data (), &CabrilloLogWindow::set_nQSO);
+ m_contestLogWindow->set_nQSO(m_logBook.contest_log()->n_qso());
}
void MainWindow::on_actionColors_triggered()
@@ -2737,6 +2809,22 @@ void MainWindow::on_actionMessage_averaging_triggered()
m_msgAvgWidget->activateWindow();
}
+void MainWindow::on_actionActiveStations_triggered()
+{
+ if(m_ActiveStationsWidget == NULL) {
+ m_ActiveStationsWidget.reset (new ActiveStations {m_settings, m_config.decoded_text_font ()});
+
+ // Connect signals from Message Averaging window
+ connect (this, &MainWindow::finished, m_ActiveStationsWidget.data (), &ActiveStations::close);
+ }
+ m_ActiveStationsWidget->showNormal();
+ m_ActiveStationsWidget->raise();
+ m_ActiveStationsWidget->activateWindow();
+ connect(m_ActiveStationsWidget.data(), SIGNAL(callSandP(int)),this,SLOT(callSandP2(int)));
+ connect(m_ActiveStationsWidget.data(), SIGNAL(activeStationsDisplay()),this,SLOT(ARRL_Digi_Display()));
+ m_ActiveStationsWidget->setScore(m_score);
+}
+
void MainWindow::on_actionOpen_triggered() //Open File
{
monitor (false);
@@ -2949,10 +3037,10 @@ void MainWindow::on_actionKeyboard_shortcuts_triggered()
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
- <tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
+ <tr><td><b>Alt+N </b></td><td>Toggle "Enable Tx"</td></tr>
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
<tr><td><b>Alt+O </b></td><td>Change operator</td></tr>
- <tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>
+ <tr><td><b>Alt+Q </b></td><td>Open "Log QSO" window</td></tr>
<tr><td><b>Ctrl+R </b></td><td>Set Tx4 message to RRR (not in FT4)</td></tr>
<tr><td><b>Alt+R </b></td><td>Set Tx4 message to RR73</td></tr>
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
@@ -3032,10 +3120,14 @@ void MainWindow::freezeDecode(int n) //freezeDecode()
void MainWindow::on_ClrAvgButton_clicked()
{
m_nclearave=1;
- if(m_msgAvgWidget != NULL) {
- if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->displayAvg("");
+ if(m_mode=="Echo") {
+ echocom_.nsum=0;
+ } else {
+ if(m_msgAvgWidget != NULL) {
+ if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->displayAvg("");
+ }
+ if(m_mode=="Q65") ndecodes_label.setText("0 0");
}
- if(m_mode=="Q65") ndecodes_label.setText("0 0");
}
void MainWindow::msgAvgDecode2()
@@ -3211,9 +3303,9 @@ void MainWindow::decode() //decode()
narg[13]=-1;
narg[14]=m_config.aggressive();
memcpy(d2b,dec_data.d2,2*360000);
- watcher3.setFuture (QtConcurrent::run (std::bind (fast_decode_,&d2b[0],
- &narg[0],&m_TRperiod,&m_msg[0][0],
- dec_data.params.mycall,dec_data.params.hiscall,8000,12,12)));
+ watcher3.setFuture (QtConcurrent::run (std::bind (fast_decode_, &d2b[0],
+ &narg[0],&m_TRperiod, &m_msg[0][0], dec_data.params.mycall,
+ dec_data.params.hiscall, (FCL)8000, (FCL)12, (FCL)12)));
} else {
mem_jt9->lock ();
memcpy(to, from, qMin(mem_jt9->size(), size));
@@ -3222,6 +3314,8 @@ void MainWindow::decode() //decode()
decodeBusy(true);
}
}
+ if((m_mode=="FT4" or (m_mode=="FT8" and m_ihsym==41) or m_diskData) and
+ m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase();
}
void::MainWindow::fast_decode_done()
@@ -3240,7 +3334,7 @@ void::MainWindow::fast_decode_done()
DecodedText decodedtext {message.replace (QChar::LineFeed, "")};
if(!m_bFastDone) {
ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign (), m_mode, m_config.DXCC (),
- m_logBook, m_currentBand, m_config.ppfx ());
+ m_logBook, m_currentBandPeriod, m_config.ppfx ());
}
t=message.mid(10,5).toFloat();
@@ -3302,15 +3396,11 @@ void MainWindow::decodeDone ()
mswait = 1000.0 * ( 1.6 * m_TRperiod - tdone );
}
m_bDecoded=m_nDecodes>0;
-// qDebug() << "aa 3316" << m_saveDecoded << m_saveAll << m_bDecoded << m_nDecodes
-// << m_TRperiod << tdone << mswait;
if(!m_diskData and !m_saveAll) {
if(m_saveDecoded and (m_nDecodes==0)) {
-// qDebug() << "bb 3319" << mswait;
killFileTimer.start(mswait); //Kill at 3/4 period
}
}
- if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0;
dec_data.params.nagain=0;
dec_data.params.ndiskdat=0;
@@ -3327,16 +3417,200 @@ void MainWindow::decodeDone ()
MessageBox::information_message(this, tr("No more files to open."));
m_bNoMoreFiles=false;
}
+
+ if((m_mode=="FT4" or m_mode=="FT8")
+ and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) {
+ if(!m_diskData and (m_nDecodes==0)) {
+ m_latestDecodeTime = (QDateTime::currentMSecsSinceEpoch()/1000) % 86400;
+ m_latestDecodeTime = int(m_latestDecodeTime/m_TRperiod);
+ m_latestDecodeTime = int(m_latestDecodeTime*m_TRperiod);
+ }
+ ARRL_Digi_Display(); // Update the ARRL_DIGI display
+ }
+ if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0;
+}
+
+void MainWindow::ARRL_Digi_Update(DecodedText dt)
+{
+ // Extract information relevant for the ARRL Digi contest
+ QString deCall;
+ QString deGrid;
+ dt.deCallAndGrid(/*out*/deCall,deGrid);
+ ActiveCall ac;
+ RecentCall rc;
+
+ if(deGrid.contains(grid_regexp)) {
+ if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) {
+ // Transmitting station's call is not already in QMap "m_activeCall", or grid has changed.
+ // Insert the call, grid, and associated fixed data into the list.
+
+ double utch=0.0;
+ int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
+ azdist_(const_cast <char *> (m_config.my_grid().left(4).toLatin1().constData()),
+ const_cast <char *> (deGrid.left(4).toLatin1().constData()),&utch,
+ &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6);
+ int points=nDkm/500;
+ if(nDkm > 500*points) points += 1;
+ points += 1;
+ ac.grid4=deGrid;
+ ac.bands=".......";
+ ac.az=nAz;
+ ac.points=points;
+ m_activeCall[deCall]=ac;
+ }
+ }
+
+ m_points=-1;
+ if(m_activeCall.contains(deCall)) {
+
+// Don't display stations we already worked on this band.
+ QString band=m_config.bands()->find(m_freqNominal);
+ if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) {m_recentCall.remove(deCall); return;}
+ if(band=="80m" and m_activeCall[deCall].bands.indexOf("b")>=0) {m_recentCall.remove(deCall); return;}
+ if(band=="40m" and m_activeCall[deCall].bands.indexOf("c")>=0) {m_recentCall.remove(deCall); return;}
+ if(band=="20m" and m_activeCall[deCall].bands.indexOf("d")>=0) {m_recentCall.remove(deCall); return;}
+ if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) {m_recentCall.remove(deCall); return;}
+ if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) {m_recentCall.remove(deCall); return;}
+ if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) {m_recentCall.remove(deCall); return;}
+
+ // Update the variable data for this deCall
+ rc.dialFreq=m_freqNominal;
+ rc.audioFreq=dt.frequencyOffset();
+ rc.snr=dt.snr();
+ m_latestDecodeTime=dt.timeInSeconds();
+ rc.txEven = (m_latestDecodeTime % int(2*m_TRperiod)) > 0;
+ rc.ready2call=false;
+ bool bCQ=dt.messageWords()[0].left(3)=="CQ ";
+ if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true;
+ rc.decodeTime=m_latestDecodeTime;
+ m_recentCall[deCall]=rc;
+ m_points=m_activeCall.value(deCall).points;
+ }
+ updateRate();
+}
+
+void MainWindow::ARRL_Digi_Display()
+{
+ QMutableMapIterator<QString,RecentCall> icall(m_recentCall);
+ QString deCall,deGrid;
+ int age=0;
+ int i=0;
+ int maxAge=m_ActiveStationsWidget->maxAge();
+ int points=0;
+ int maxPoints=0;
+ int indx[1000];
+ float pts[1000];
+ QStringList list;
+
+ while (icall.hasNext()) {
+ icall.next();
+ deCall=icall.key();
+ age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5);
+ if(age<0) age=age + int(86400/m_TRperiod);
+ int itx=1;
+ if(icall.value().txEven) itx=0;
+ int snr=icall.value().snr;
+ int freq=icall.value().audioFreq;
+ if(age>maxAge) {
+ icall.remove();
+ } else {
+ bool bReady=false;
+ if(age==0 and m_recentCall.value(deCall).ready2call) bReady=true;
+
+ QString bands=m_activeCall[deCall].bands;
+ bool bWorkedOnBand=false;
+ if(m_currentBand=="160m" and bands.mid(0,1)!=".") bWorkedOnBand=true;
+ if(m_currentBand=="80m" and bands.mid(1,1)!=".") bWorkedOnBand=true;
+ if(m_currentBand=="40m" and bands.mid(2,1)!=".") bWorkedOnBand=true;
+ if(m_currentBand=="20m" and bands.mid(3,1)!=".") bWorkedOnBand=true;
+ if(m_currentBand=="15m" and bands.mid(4,1)!=".") bWorkedOnBand=true;
+ if(m_currentBand=="10m" and bands.mid(5,1)!=".") bWorkedOnBand=true;
+ if(m_currentBand=="6m" and bands.mid(6,1)!=".") bWorkedOnBand=true;
+
+ if((bReady or !m_ActiveStationsWidget->readyOnly()) and !bWorkedOnBand) {
+ i++;
+ int az=m_activeCall[deCall].az;
+ deGrid=m_activeCall[deCall].grid4;
+ points=m_activeCall[deCall].points;
+ if(points>maxPoints) maxPoints=points;
+ float x=float(age)/(maxAge+1);
+ if(x>1.0) x=0;
+ pts[i-1]=points - x;
+ QString t1;
+ if(!bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points);
+ if(bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d*%4d",az,snr,freq,itx,age,points);
+// t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands;
+ t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1;
+ list.append(t1);
+ }
+ }
+ }
+ if(i==0) return;
+ int jz=i;
+ m_ActiveStationsWidget->setClickOK(false);
+ int maxRecent=qMin(i,m_ActiveStationsWidget->maxRecent());
+ indexx_(pts,&jz,indx);
+ QString t;
+ i=0;
+ for(int j=jz-1; j>=0; j--) {
+ int k=indx[j]-1;
+ m_ready2call[i]=list[k];
+ i++;
+ QString t1=QString::number(i) + ". ";
+ if(i<10) t1=" " + t1;
+ t += (t1 + list[k] + "\n");
+ if(i>=maxRecent) break;
+ }
+ if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t);
+ m_ActiveStationsWidget->setClickOK(true);
+}
+
+void MainWindow::callSandP2(int n)
+{
+ if(m_ready2call[n]=="") return;
+ QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
+ m_deCall=w[0];
+ m_deGrid=w[1];
+ m_bDoubleClicked=true; //### needed?
+ ui->dxCallEntry->setText(m_deCall);
+ ui->dxGridEntry->setText(m_deGrid);
+ genStdMsgs(w[3]); //### real SNR would be better here?
+ ui->RxFreqSpinBox->setValue(w[4].toInt());
+ setTxMsg(1);
+ m_txFirst = (w[5]=="0");
+ ui->txFirstCheckBox->setChecked(m_txFirst);
+ if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx
+ if(m_transmitting) m_restart=true;
+}
+
+void MainWindow::activeWorked(QString call, QString band)
+{
+ QString bands=m_activeCall[call].bands;
+ QByteArray ba=bands.toLatin1();
+ if(band=="160m") ba[0]='a';
+ if(band=="80m") ba[1]='b';
+ if(band=="40m") ba[2]='c';
+ if(band=="20m") ba[3]='d';
+ if(band=="15m") ba[4]='e';
+ if(band=="10m") ba[5]='f';
+ if(band=="6m") ba[6]='g';
+ m_activeCall[call].bands=QString::fromLatin1(ba);
}
void MainWindow::readFromStdout() //readFromStdout
{
+ bool bDisplayPoints = false;
+ if(m_ActiveStationsWidget!=NULL) {
+ bDisplayPoints=(m_mode=="FT4" or m_mode=="FT8") and
+ (m_config.special_op_id()==SpecOp::ARRL_DIGI or m_ActiveStationsWidget->isVisible());
+ }
while(proc_jt9.canReadLine()) {
auto line_read = proc_jt9.readLine ();
if (auto p = std::strpbrk (line_read.constData (), "\n\r")) {
// truncate before line ending chars
line_read = line_read.left (p - line_read.constData ());
}
+ if(bDisplayPoints) line_read=line_read.replace("a7"," ");
bool haveFSpread {false};
float fSpread {0.};
if (m_mode.startsWith ("FST4"))
@@ -3412,7 +3686,8 @@ void MainWindow::readFromStdout() //readFromStdout
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) {
+ if(((QDateTime::currentMSecsSinceEpoch() / 1000 - m_secBandChanged) > 4*int(m_TRperiod)/4)
+ or m_displayBand) {
band = ' ' + m_config.bands ()->find (m_freqNominal);
}
ui->decodedTextBrowser->insertLineSpacer (band.rightJustified (40, '-'));
@@ -3452,10 +3727,37 @@ void MainWindow::readFromStdout() //readFromStdout
}
} else {
DecodedText decodedtext1=decodedtext0;
+ if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) {
+ ARRL_Digi_Update(decodedtext1);
+ }
ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (),
- m_logBook, m_currentBand, m_config.ppfx (),
+ m_logBook, m_currentBandPeriod, m_config.ppfx (),
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
- haveFSpread, fSpread);
+ haveFSpread, fSpread, bDisplayPoints, m_points);
+ if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) {
+ QString deCall,deGrid;
+ decodedtext.deCallAndGrid(/*out*/deCall,deGrid);
+ bool bWorkedOnBand=(ui->decodedTextBrowser->CQPriority()!="New Call on Band") and ui->decodedTextBrowser->CQPriority()!="";
+ if(bWorkedOnBand) activeWorked(deCall,m_currentBand);
+ }
+
+ if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall}))
+ || (decodedtext.string().contains(QRegularExpression {"(\\w+) <" + m_hisCall +">"}))
+ || (decodedtext.string().contains(QRegularExpression {"<(\\w+)> " + m_hisCall})))) {
+ ui->decodedTextBrowser->highlight_callsign(m_hisCall, QColor(255,0,0), QColor(255,255,255), true); // highlight dxCallEntry
+ QTimer::singleShot (500, [=] { // repeated highlighting to override JTAlert
+ ui->decodedTextBrowser->highlight_callsign(m_hisCall, QColor(255,0,0), QColor(255,255,255), true);
+ });
+ QTimer::singleShot (1000, [=] { // repeated highlighting to override JTAlert
+ ui->decodedTextBrowser->highlight_callsign(m_hisCall, QColor(255,0,0), QColor(255,255,255), true);
+ });
+ QTimer::singleShot (2500, [=] { // repeated highlighting to override JTAlert
+ ui->decodedTextBrowser->highlight_callsign(m_hisCall, QColor(255,0,0), QColor(255,255,255), true);
+ });
+ }
+ if (m_config.highlight_DXgrid () && (m_hisGrid!="") && (decodedtext.string().contains(m_hisGrid))) {
+ ui->decodedTextBrowser->highlight_callsign(m_hisGrid, QColor(0,0,255), QColor(255,255,255), true); // highlight dxGridEntry
+ }
if(m_bBestSPArmed && m_mode=="FT4" && CALLING == m_QSOProgress) {
QString messagePriority=ui->decodedTextBrowser->CQPriority();
@@ -3476,7 +3778,6 @@ void MainWindow::readFromStdout() //readFromStdout
}
}
}
-
}
}
@@ -3491,29 +3792,71 @@ void MainWindow::readFromStdout() //readFromStdout
if (parts.size() > 6) {
auto for_us = parts[5].contains (m_baseCall)
|| ("DE" == parts[5] && qAbs (ui->RxFreqSpinBox->value () - audioFreq) <= ftol);
- if(m_baseCall == m_config.my_callsign())
- {
- if (m_baseCall != parts[5])
- {
- for_us=false;
- }
+ if(m_baseCall == m_config.my_callsign()) {
+ if (m_baseCall != parts[5]) for_us=false;
+ } else {
+ if (m_config.my_callsign () != parts[5]) {
+// Same base call as ours but different prefix or suffix. Rare but can happen with
+// multi-station special events.
+ for_us = false;
}
- else
- {
- if (m_config.my_callsign () != parts[5])
- {
- for_us = false; // same base call as ours but
- // different prefix or suffix, rare
- // but can happen with multi station
- // special events
+ }
+ if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) {
+ bool bProcessMsgNormally=ui->respondComboBox->currentText()=="CQ: First" or
+ (ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or
+ (m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible());
+ QString t=decodedtext.messageWords()[4];
+ if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true;
+ if(bProcessMsgNormally) {
+ m_bDoubleClicked=true;
+ m_bAutoReply = true;
+ processMessage (decodedtext);
+ }
+
+ if(!bProcessMsgNormally and m_ActiveStationsWidget and ui->respondComboBox->currentText()=="CQ: Max Dist") {
+ QString deCall;
+ QString deGrid;
+ decodedtext.deCallAndGrid(/*out*/deCall,deGrid);
+ if(deGrid.contains(grid_regexp) or
+ (deGrid.contains("+") or deGrid.contains("-"))) {
+ int points=0;
+ if(m_activeCall.contains(deCall)) {
+ points=m_activeCall[deCall].points;
+ deGrid=m_activeCall[deCall].grid4;
+ } else if(deGrid.contains(grid_regexp)) {
+ double utch=0.0;
+ int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
+ azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()),
+ const_cast <char *> ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch,
+ &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6);
+ points=nDkm/500;
+ if(nDkm > 500*points) points += 1;
+ points += 1;
+ }
+ if(points>m_maxPoints) {
+ m_maxPoints=points;
+ m_deCall=deCall;
+ m_bDoubleClicked=true;
+ ui->dxCallEntry->setText(deCall);
+ int m_ntx=2;
+ bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI;
+ if(bContest) m_ntx=3;
+ if(deGrid.contains(grid_regexp)) {
+ m_deGrid=deGrid;
+ ui->dxGridEntry->setText(deGrid);
+ } else {
+ m_ntx=3;
+ }
+ if(m_ntx==2) m_QSOProgress = REPORT;
+ if(m_ntx==3) m_QSOProgress = ROGER_REPORT;
+ genStdMsgs(QString::number(decodedtext.snr()));
+ ui->RxFreqSpinBox->setValue(decodedtext.frequencyOffset());
+ setTxMsg(m_ntx);
+ m_currentMessageType=m_ntx;
}
+ }
}
- if(m_bCallingCQ && !m_bAutoReply && for_us && ui->cbFirst->isChecked() and
- SpecOp::FOX > m_config.special_op_id()) {
- m_bDoubleClicked=true;
- m_bAutoReply = true;
- if(SpecOp::FOX != m_config.special_op_id()) processMessage (decodedtext);
- ui->cbFirst->setStyleSheet("");
+
}
if(SpecOp::FOX==m_config.special_op_id() and decodedtext.string().contains(" DE ")) for_us=true; //Hound with compound callsign
if(SpecOp::FOX==m_config.special_op_id() and for_us and (audioFreq<1000)) bDisplayRight=true;
@@ -3529,7 +3872,7 @@ void MainWindow::readFromStdout() //readFromStdout
// or contains MyCall
if(!m_bBestSPArmed or m_mode!="FT4") {
ui->decodedTextBrowser2->displayDecodedText (decodedtext0, m_config.my_callsign (), m_mode, m_config.DXCC (),
- m_logBook, m_currentBand, m_config.ppfx ());
+ m_logBook, m_currentBand, m_config.ppfx (), false, false, 0.0, bDisplayPoints, m_points);
}
m_QSOText = decodedtext.string ().trimmed ();
}
@@ -3709,7 +4052,8 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler
void MainWindow::pskPost (DecodedText const& decodedtext)
{
- if (m_diskData || !m_config.spot_to_psk_reporter() || decodedtext.isLowConfidence ()) return;
+ if (m_diskData || !m_config.spot_to_psk_reporter() || decodedtext.isLowConfidence ()
+ || (decodedtext.string().contains(m_baseCall) && decodedtext.string().contains(m_config.my_grid().left(4)))) return; // prevent self-spotting when running multiple instances
QString msgmode=m_mode;
QString deCall;
@@ -3720,7 +4064,7 @@ void MainWindow::pskPost (DecodedText const& decodedtext)
audioFrequency=decodedtext.string().mid(16,4).toInt();
}
int snr = decodedtext.snr();
- Frequency frequency = m_freqNominal + audioFrequency;
+ Frequency frequency = m_freqNominalPeriod + audioFrequency; // prevent spotting wrong band
if(grid.contains (grid_regexp)) {
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
if (!m_psk_Reporter.addRemoteStation (deCall, grid, frequency, msgmode, snr))
@@ -3732,7 +4076,6 @@ void MainWindow::pskPost (DecodedText const& decodedtext)
void MainWindow::killFile ()
{
-// qDebug() << "cc 3725" << m_saveDecoded << m_saveAll << m_bDecoded << m_nDecodes << m_fnameWE;
if (m_fnameWE.size () && !(m_saveAll || (m_saveDecoded && m_bDecoded))) {
QFile f1 {m_fnameWE + ".wav"};
if(f1.exists()) f1.remove();
@@ -4019,18 +4362,18 @@ void MainWindow::guiUpdate()
if(m_QSOProgress==REPORT || m_QSOProgress==ROGER_REPORT) m_bSentReport=true;
if(m_bSentReport and (m_QSOProgress<REPORT or m_QSOProgress>ROGER_REPORT)) m_bSentReport=false;
if(m_mode=="JT4") gen4_(message, &ichk , msgsent, const_cast<int *> (itone),
- &m_currentMessageType, 22, 22);
+ &m_currentMessageType, (FCL)22, (FCL)22);
if(m_mode=="JT9") gen9_(message, &ichk, msgsent, const_cast<int *> (itone),
- &m_currentMessageType, 22, 22);
- if(m_mode=="JT65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
- &m_currentMessageType, 22, 22);
+ &m_currentMessageType, (FCL)22, (FCL)22);
+ if(m_mode=="JT65") gen65(message, &ichk, msgsent, const_cast<int *> (itone),
+ &m_currentMessageType);
if(m_mode=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
- 22, 22);
+ (FCL)22, (FCL)22);
if(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4"
or m_mode=="FST4" or m_mode=="FST4W" || "Q65" == m_mode) {
if(m_mode=="MSK144") {
genmsk_128_90_(message, &ichk, msgsent, const_cast<int *> (itone),
- &m_currentMessageType, 37, 37);
+ &m_currentMessageType, (FCL)37, (FCL)37);
if(m_restart) {
int nsym=144;
if(itone[40]==-40) nsym=40;
@@ -4046,7 +4389,7 @@ void MainWindow::guiUpdate()
int n3=0;
char ft8msgbits[77];
genft8_(message, &i3, &n3, msgsent, const_cast<char *> (ft8msgbits),
- const_cast<int *> (itone), 37, 37);
+ const_cast<int *> (itone), (FCL)37, (FCL)37);
int nsym=79;
int nsps=4*1920;
float fsample=48000.0;
@@ -4073,7 +4416,7 @@ void MainWindow::guiUpdate()
int ichk=0;
char ft4msgbits[77];
genft4_(message, &ichk, msgsent, const_cast<char *> (ft4msgbits),
- const_cast<int *>(itone), 37, 37);
+ const_cast<int *>(itone), (FCL)37, (FCL)37);
int nsym=103;
int nsps=4*576;
float fsample=48000.0;
@@ -4095,7 +4438,7 @@ void MainWindow::guiUpdate()
ba2msg(ba,message);
}
genfst4_(message,&ichk,msgsent,const_cast<char *> (fst4msgbits),
- const_cast<int *>(itone), &iwspr, 37, 37);
+ const_cast<int *>(itone), &iwspr, (FCL)37, (FCL)37);
int hmod=1;
if(m_config.x2ToneSpacing()) hmod=2;
if(m_config.x4ToneSpacing()) hmod=4;
@@ -4122,7 +4465,7 @@ void MainWindow::guiUpdate()
if(m_mode=="Q65") {
int i3=-1;
int n3=-1;
- genq65_(message,&ichk,msgsent,const_cast<int *>(itone),&i3,&n3,37,37);
+ genq65_(message, &ichk,msgsent, const_cast<int *>(itone), &i3, &n3, (FCL)37, (FCL)37);
int nsps=1800;
if(m_TRperiod==30) nsps=3600;
if(m_TRperiod==60) nsps=7200;
@@ -4165,13 +4508,7 @@ void MainWindow::guiUpdate()
}
m_bCallingCQ = 6 == m_ntx
|| m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "});
- if(m_mode=="FT8" or m_mode=="FT4") {
- if(m_bCallingCQ && ui->cbFirst->isVisible () && ui->cbFirst->isChecked ()) {
- ui->cbFirst->setStyleSheet("QCheckBox{color:red}");
- } else {
- ui->cbFirst->setStyleSheet("");
- }
- }
+ m_maxPoints=-1;
if (m_tune) {
m_currentMessage = "TUNE";
@@ -4213,7 +4550,8 @@ void MainWindow::guiUpdate()
}
}
- bool b=("FT8"==m_mode or "FT4"==m_mode or "Q65"==m_mode) and ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ();
+ bool b=("FT8"==m_mode or "FT4"==m_mode or "Q65"==m_mode) and ui->cbAutoSeq->isVisible ()
+ && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ();
if(is_73 and (m_config.disable_TX_on_73() or b)) {
m_nextCall=""; //### Temporary: disable use of "TU;" messages;
if(m_nextCall!="") {
@@ -4326,7 +4664,8 @@ void MainWindow::guiUpdate()
(SpecOp::NA_VHF==m_config.special_op_id() or
SpecOp::FIELD_DAY==m_config.special_op_id() or
SpecOp::RTTY==m_config.special_op_id() or
- SpecOp::WW_DIGI==m_config.special_op_id()) ) {
+ SpecOp::WW_DIGI==m_config.special_op_id() or
+ SpecOp::ARRL_DIGI==m_config.special_op_id()) ) {
//We're in a contest-like mode other than EU_VHF: start QSO with Tx2.
ui->tx1->setEnabled(false);
ui->txb1->setEnabled(false);
@@ -4460,9 +4799,10 @@ void MainWindow::startTx2()
t=ui->tx6->text();
if(t.mid(0,1)=="#") snr=t.mid(1,5).toDouble();
if(snr>0.0 or snr < -50.0) snr=99.0;
- if((m_ntx==6 or m_ntx==7) and m_config.force_call_1st()) {
+ if((m_ntx==6 or m_ntx==7) and m_config.force_call_1st() and
+ ui->respondComboBox->currentIndex()==0) {
ui->cbAutoSeq->setChecked(true);
- ui->cbFirst->setChecked(true);
+ ui->respondComboBox->setCurrentIndex(1);
}
transmit (snr);
ui->signal_meter_widget->setValue(0,0);
@@ -4859,7 +5199,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
}
QString firstcall = message.call();
- if(firstcall.length()==5 and firstcall.mid(0,3)=="CQ ") firstcall="CQ";
+ if(firstcall.length()>=4 and firstcall.mid(0,3)=="CQ ") firstcall="CQ";
if(!m_bFastMode and (!m_config.enable_VHF_features() or m_mode=="FT8")) {
// Don't change Tx freq if in a fast mode, or VHF features enabled; also not if a
// station is calling me, unless CTRL or SHIFT is held down.
@@ -4943,7 +5283,9 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
&& (message_words.at(3).contains(qso_partner_base_call) or m_bDoubleClicked
or bEU_VHF_w2 or (m_QSOProgress==CALLING))) {
if(message_words.at(4).contains(grid_regexp) and SpecOp::EU_VHF!=m_config.special_op_id()) {
- if((SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::WW_DIGI==m_config.special_op_id()) and bContestOK){
+ if((SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::WW_DIGI==m_config.special_op_id() or
+ SpecOp::ARRL_DIGI==m_config.special_op_id() )
+ and bContestOK) {
setTxMsg(3);
m_QSOProgress=ROGER_REPORT;
} else {
@@ -5010,9 +5352,13 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
ui->tx3->setText(t);
m_bTUmsg=true;
} else {
- if (m_QSOProgress > CALLING && m_QSOProgress < SIGNOFF
- && SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()
- && ("RR73" == word_3 || 73 == word_3_as_number))
+
+// The following test was to skip sending 73 after receiving RR73, in a contest mode.
+// I'm disabling it so thet we always send 73 after receiving RR73.
+// if (m_QSOProgress > CALLING && m_QSOProgress < SIGNOFF
+// && SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()
+// && ("RR73" == word_3 || 73 == word_3_as_number))
+ if (false) // Always Send 73 after receiving RRR or RR73, even in contest mode.
{
if (m_config.prompt_to_log() || m_config.autoLog()) {
logQSOTimer.start(0);
@@ -5191,6 +5537,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
}
// if we get here then we are reacting to the message
if (m_bAutoReply) m_bCallingCQ = CALLING == m_QSOProgress;
+ m_maxPoints=-1;
if (ui->RxFreqSpinBox->isEnabled () and m_mode != "MSK144" and !shift) {
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
}
@@ -5316,6 +5663,7 @@ void MainWindow::genCQMsg ()
if(SpecOp::FIELD_DAY == m_config.special_op_id()) m_cqStr="FD";
if(SpecOp::RTTY == m_config.special_op_id()) m_cqStr="RU";
if(SpecOp::WW_DIGI == m_config.special_op_id()) m_cqStr="WW";
+ if(SpecOp::ARRL_DIGI == m_config.special_op_id()) m_cqStr="TEST";
if( tlist.at(1)==my_callsign ) {
t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2);
} else {
@@ -5374,7 +5722,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
auto is_type_one = !is77BitMode () && is_compound && shortList (my_callsign);
auto const& my_grid = m_config.my_grid ().left (4);
auto const& hisBase = Radio::base_callsign (hisCall);
- save_dxbase_(const_cast <char *> ((hisBase + " ").left (6).toLatin1().constData()),6);
+ save_dxbase_(const_cast <char *> ((hisBase + " ").left(6).toLatin1().constData()), (FCL)6);
auto eme_short_codes = m_config.enable_VHF_features () && ui->cbShMsgs->isChecked ()
&& m_mode == "JT65";
@@ -5425,6 +5773,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
}
if(SpecOp::NA_VHF==m_config.special_op_id()) sent=my_grid;
if(SpecOp::WW_DIGI==m_config.special_op_id()) sent=my_grid;
+ if(SpecOp::ARRL_DIGI==m_config.special_op_id()) sent=my_grid;
if(SpecOp::FIELD_DAY==m_config.special_op_id()) sent=m_config.Field_Day_Exchange();
if(SpecOp::RTTY==m_config.special_op_id()) {
sent=rst + m_config.RTTY_Exchange();
@@ -5761,7 +6110,7 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
QByteArray s=t.toUpper().toLocal8Bit();
ba2msg(s,message);
int ichk=1,itype=0;
- gen65_(message,&ichk,msgsent,const_cast<int*>(itone0),&itype,22,22);
+ gen65(message, &ichk,msgsent, const_cast<int*>(itone0), &itype);
msgsent[22]=0;
bool text=false;
bool shortMsg=false;
@@ -5859,7 +6208,7 @@ void MainWindow::on_dxCallEntry_textChanged (QString const& call)
void MainWindow::on_dxCallEntry_editingFinished()
{
auto const& dxBase = Radio::base_callsign (m_hisCall);
- save_dxbase_(const_cast <char *> ((dxBase + " ").left (6).toLatin1().constData()),6);
+ save_dxbase_(const_cast <char *> ((dxBase + " ").left (6).toLatin1().constData()), (FCL)6);
}
@@ -5880,7 +6229,7 @@ void MainWindow::on_dxGridEntry_textChanged (QString const& grid)
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1().constData()),
const_cast <char *> ((m_hisGrid + " ").left (6).toLatin1().constData()),&utch,
- &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6);
+ &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6);
QString t;
int nd=nDkm;
if(m_config.miles()) nd=nDmiles;
@@ -5960,6 +6309,10 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
m_xSent=m_config.my_grid().left(4);
m_xRcvd=m_hisGrid;
break;
+ case SpecOp::ARRL_DIGI:
+ m_xSent=m_config.my_grid().left(4);
+ m_xRcvd=m_hisGrid;
+ break;
default: break;
}
@@ -6010,8 +6363,40 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
ui->sbSerialNumber->setValue(ui->sbSerialNumber->value() + 1);
}
+ if(m_ActiveStationsWidget!=NULL) {
+ QString band=m_config.bands()->find(dial_freq);
+ activeWorked(call,band);
+ int points=m_activeCall[call].points;
+ m_score += points;
+ ARRL_logged al;
+ al.time=QDateTime::currentDateTimeUtc();
+ al.band=band;
+ al.points=points;
+ m_arrl_log.append(al);
+ updateRate();
+ }
+
m_xSent.clear ();
m_xRcvd.clear ();
+
+}
+
+void MainWindow::updateRate()
+{
+ int iz=m_arrl_log.size();
+ int rate=0;
+ int nbc=0;
+ double hrDiff;
+
+ for(int i=iz-1; i>=0; i--) {
+ hrDiff = m_arrl_log[i].time.msecsTo(QDateTime::currentDateTimeUtc())/3600000.0;
+ if(hrDiff > 1.0) break;
+ rate += m_arrl_log[i].points;
+ if(i<iz-1 and m_arrl_log[i].band != m_arrl_log[i+1].band) nbc += 1;
+ }
+ m_ActiveStationsWidget->setRate(rate);
+ m_ActiveStationsWidget->setScore(m_score);
+ m_ActiveStationsWidget->setBandChanges(nbc);
}
qint64 MainWindow::nWidgets(QString t)
@@ -6067,8 +6452,7 @@ void MainWindow::displayWidgets(qint64 n)
if(i==24) ui->actionEnable_AP_FT8->setVisible (b);
if(i==25) ui->actionEnable_AP_JT65->setVisible (b);
if(i==26) ui->actionEnable_AP_DXcall->setVisible (b);
- if(i==27) ui->cbFirst->setVisible(b);
- // if(i==28) ui->labNextCall->setVisible(b);
+ if(i==27) ui->respondComboBox->setVisible(b);
if(i==29) ui->measure_check_box->setVisible(b);
if(i==30) ui->labDXped->setVisible(b);
if(i==31) ui->cbRxAll->setVisible(b);
@@ -6101,7 +6485,11 @@ void MainWindow::displayWidgets(qint64 n)
void MainWindow::on_actionFST4_triggered()
{
- m_mode="FST4";
+ QTimer::singleShot (50, [=] {
+ ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt());
+ ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq_old",1500).toInt());
+ on_sbSubmode_valueChanged(ui->sbSubmode->value());
+ });
m_mode="FST4";
ui->actionFST4->setChecked(true);
m_bFast9=false;
@@ -6135,7 +6523,8 @@ void MainWindow::on_actionFST4_triggered()
switch_mode (Modes::FST4);
m_wideGraph->setMode(m_mode);
ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800});
- on_sbTR_valueChanged (ui->sbTR->value());
+ ui->sbTR->setValue (m_settings->value ("TRPeriod_FST4", 60).toInt()); // remember sbTR settings by mode
+ QTimer::singleShot (50, [=] {on_sbTR_valueChanged (ui->sbTR->value());});
statusChanged();
m_bOK_to_chk=true;
chk_FST4_freq_range();
@@ -6173,6 +6562,11 @@ void MainWindow::on_actionFST4W_triggered()
void MainWindow::on_actionFT4_triggered()
{
+ QTimer::singleShot (50, [=] {
+ ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt());
+ ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq_old",1500).toInt());
+ on_sbSubmode_valueChanged(ui->sbSubmode->value());
+ });
m_mode="FT4";
m_TRperiod=7.5;
bool bVHF=m_config.enable_VHF_features();
@@ -6216,12 +6610,16 @@ void MainWindow::on_actionFT4_triggered()
void MainWindow::on_actionFT8_triggered()
{
+ QTimer::singleShot (50, [=] {
+ ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt());
+ ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq_old",1500).toInt());
+ on_sbSubmode_valueChanged(ui->sbSubmode->value());
+ });
m_mode="FT8";
bool bVHF=m_config.enable_VHF_features();
m_bFast9=false;
m_bFastMode=false;
WSPR_config(false);
- switch_mode (Modes::FT8);
m_nsps=6912;
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize (m_FFTSize);
@@ -6272,6 +6670,8 @@ void MainWindow::on_actionFT8_triggered()
on_fox_log_action_triggered();
}
if(SpecOp::HOUND == m_config.special_op_id()) {
+ ui->houndButton->setChecked(true);
+ ui->houndButton->setStyleSheet("background-color: #ff0000;");
ui->txFirstCheckBox->setChecked(false);
ui->txFirstCheckBox->setEnabled(false);
ui->cbAutoSeq->setEnabled(false);
@@ -6289,15 +6689,23 @@ void MainWindow::on_actionFT8_triggered()
ui->txb4->setEnabled(false);
ui->txb5->setEnabled(false);
ui->txb6->setEnabled(false);
+ } else {
+ switch_mode (Modes::FT8);
+ }
+
+ if(m_config.special_op_id() != SpecOp::HOUND) {
+ ui->houndButton->setChecked(false);
+ ui->houndButton->setStyleSheet("");
}
if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) {
QString t0="";
- if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF";
- if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF";
- if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day";
- if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY";
- if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI";
+ if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF";
+ if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF";
+ if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day";
+ if(SpecOp::RTTY==m_config.special_op_id()) t0="RTTY";
+ if(SpecOp::WW_DIGI==m_config.special_op_id()) t0="WW_DIGI";
+ if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0="ARRL_DIGI";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
@@ -6320,6 +6728,10 @@ void MainWindow::on_actionFT8_triggered()
void MainWindow::on_actionJT4_triggered()
{
+ QTimer::singleShot (50, [=] {
+ ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt());
+ ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq_old",1500).toInt());
+ });
m_mode="JT4";
bool bVHF=m_config.enable_VHF_features();
WSPR_config(false);
@@ -6346,7 +6758,10 @@ void MainWindow::on_actionJT4_triggered()
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
if(bVHF) {
- ui->sbSubmode->setValue(m_nSubMode);
+// ui->sbSubmode->setValue(m_nSubMode);
+ QTimer::singleShot (50, [=] {m_nSubMode=m_settings->value("SubMode_JT4",0).toInt();});
+ QTimer::singleShot (75, [=] {ui->sbSubmode->setValue(m_settings->value("SubMode_JT4",0).toInt());});
+ QTimer::singleShot (100, [=] {on_sbSubmode_valueChanged(m_nSubMode);});
} else {
ui->sbSubmode->setValue(0);
}
@@ -6362,6 +6777,7 @@ void MainWindow::on_actionJT4_triggered()
void MainWindow::on_actionJT9_triggered()
{
+ QTimer::singleShot (50, [=] {on_sbSubmode_valueChanged(ui->sbSubmode->value());});
m_mode="JT9";
bool bVHF=m_config.enable_VHF_features();
m_bFast9=ui->cbFast9->isChecked();
@@ -6421,6 +6837,10 @@ void MainWindow::on_actionJT9_triggered()
void MainWindow::on_actionJT65_triggered()
{
+ QTimer::singleShot (50, [=] {
+ ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt());
+ ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq_old",1500).toInt());
+ });
on_actionJT9_triggered();
m_mode="JT65";
bool bVHF=m_config.enable_VHF_features();
@@ -6447,8 +6867,11 @@ void MainWindow::on_actionJT65_triggered()
m_bFast9=false;
ui->sbSubmode->setMaximum(2);
if(bVHF) {
- ui->sbSubmode->setValue(m_nSubMode);
- ui->lh_decodes_title_label->setText(tr ("Single-Period Decodes"));
+// ui->sbSubmode->setValue(m_nSubMode);
+ QTimer::singleShot (50, [=] {m_nSubMode=m_settings->value("SubMode_JT65",0).toInt();});
+ QTimer::singleShot (75, [=] {ui->sbSubmode->setValue(m_settings->value("SubMode_JT65",0).toInt());});
+ QTimer::singleShot (100, [=] {on_sbSubmode_valueChanged(m_nSubMode);});
+ ui->lh_decodes_title_label->setText(tr ("Single-Period Decodes"));
ui->rh_decodes_title_label->setText(tr ("Average Decodes"));
} else {
ui->sbSubmode->setValue(0);
@@ -6471,6 +6894,10 @@ void MainWindow::on_actionJT65_triggered()
void MainWindow::on_actionQ65_triggered()
{
+ QTimer::singleShot (50, [=] {
+ ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt());
+ ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq_old",1500).toInt());
+ });
m_mode="Q65";
ui->actionQ65->setChecked(true);
switch_mode(Modes::Q65);
@@ -6483,8 +6910,12 @@ void MainWindow::on_actionQ65_triggered()
Q_EMIT FFTSize(m_FFTSize);
m_hsymStop=49;
ui->sbTR->values ({15, 30, 60, 120, 300});
- on_sbTR_valueChanged (ui->sbTR->value());
- ui->sbSubmode->setValue(m_nSubMode);
+ ui->sbTR->setValue (m_settings->value ("TRPeriod_Q65", 30).toInt()); // remember sbTR settings by mode
+ QTimer::singleShot (50, [=] {on_sbTR_valueChanged (ui->sbTR->value());});
+// ui->sbSubmode->setValue(m_nSubMode);
+ QTimer::singleShot (50, [=] {m_nSubMode=m_settings->value("SubMode_Q65",0).toInt();});
+ QTimer::singleShot (75, [=] {ui->sbSubmode->setValue(m_settings->value("SubMode_Q65",0).toInt());});
+ QTimer::singleShot (100, [=] {on_sbSubmode_valueChanged(m_nSubMode);});
QString fname {QDir::toNativeSeparators(m_config.temp_dir().absoluteFilePath ("red.dat"))};
m_wideGraph->setRedFile(fname);
m_wideGraph->setMode(m_mode);
@@ -6507,8 +6938,9 @@ void MainWindow::on_actionQ65_triggered()
if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF";
if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF";
if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day";
- if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY";
- if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI";
+ if(SpecOp::RTTY==m_config.special_op_id()) t0="RTTY";
+ if(SpecOp::WW_DIGI==m_config.special_op_id()) t0="WW_DIGI";
+ if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0="ARRL_DIGI";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
@@ -6553,7 +6985,11 @@ void MainWindow::on_actionMSK144_triggered()
m_bFastMode=true;
m_bFast9=false;
ui->sbTR->values ({5, 10, 15, 30});
- on_sbTR_valueChanged (ui->sbTR->value());
+ ui->sbTR->setValue (m_settings->value ("TRPeriod_MSK144", 15).toInt()); // remember sbTR settings by mode
+ QTimer::singleShot (50, [=] {
+ on_sbTR_valueChanged (ui->sbTR->value());
+ on_sbSubmode_valueChanged(ui->sbSubmode->value());
+ });
m_wideGraph->hide();
m_fastGraph->showNormal();
ui->TxFreqSpinBox->setValue(1500);
@@ -6580,8 +7016,8 @@ void MainWindow::on_actionMSK144_triggered()
statusChanged();
QString t0="";
- if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF";
- if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF";
+ if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF";
+ if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
@@ -6645,9 +7081,9 @@ void MainWindow::on_actionEcho_triggered()
m_bFastMode=false;
m_bFast9=false;
WSPR_config(true);
- ui->lh_decodes_headings_label->setText(" UTC N Level Sig DF Width Q");
+ ui->lh_decodes_headings_label->setText(" UTC N Level SNR dBerr DF Width Q");
// 01234567890123456789012345678901234567
- displayWidgets(nWidgets("00000000000000000000001000000000000000"));
+ displayWidgets(nWidgets("00000000000000000010001000000000000000"));
fast_config(false);
statusChanged();
}
@@ -6715,7 +7151,7 @@ void MainWindow::WSPR_config(bool b)
ui->rh_decodes_widget->setVisible(!b);
ui->controls_stack_widget->setCurrentIndex (b && m_mode != "Echo" ? 1 : 0);
ui->QSO_controls_widget->setVisible (!b);
- ui->DX_controls_widget->setVisible (!b);
+ ui->DX_controls_widget->setVisible (!b or (m_mode=="Echo"));
ui->WSPR_controls_widget->setVisible (b);
ui->lh_decodes_title_label->setVisible(!b and ui->cbMenus->isChecked());
ui->logQSOButton->setVisible(!b);
@@ -6773,7 +7209,9 @@ void MainWindow::on_TxFreqSpinBox_valueChanged(int n)
ui->TxFreqSpinBox->setStyleSheet("");
}
}
-
+ if (m_mode != "MSK144" && m_mode != "FST4W" && m_mode != "WSPR" && m_mode != "Echo" && m_mode != "FreqCal") {
+ QTimer::singleShot (200, [=] {m_settings->setValue("TxFreq_old",ui->TxFreqSpinBox->value());});
+ }
statusUpdate ();
}
@@ -6783,6 +7221,9 @@ void MainWindow::on_RxFreqSpinBox_valueChanged(int n)
if (m_mode == "FreqCal") {
setRig ();
}
+ if (m_mode != "MSK144" && m_mode != "FST4W" && m_mode != "WSPR" && m_mode != "Echo" && m_mode != "FreqCal") {
+ QTimer::singleShot (200, [=] {m_settings->setValue("RxFreq_old",ui->RxFreqSpinBox->value());});
+ }
statusUpdate ();
}
@@ -6877,6 +7318,9 @@ void MainWindow::on_reset_cabrillo_log_action_triggered ()
{
if(m_config.RTTY_Exchange()!="SCC") ui->sbSerialNumber->setValue(1);
m_logBook.contest_log ()->reset ();
+ m_activeCall.clear(); //Erase the QMap of active calls
+ m_score=0;
+ m_ActiveStationsWidget->setScore(0);
}
}
@@ -7034,6 +7478,7 @@ void MainWindow::on_rptSpinBox_valueChanged(int n)
void MainWindow::on_tuneButton_clicked (bool checked)
{
+ if (!m_config.Tune_watchdog_disabled ()) tuneATU_Timer.start (90000); // tune watchdog (90s)
static bool lastChecked = false;
if (lastChecked == checked) return;
lastChecked = checked;
@@ -7093,7 +7538,7 @@ void MainWindow::on_stopTxButton_clicked() //Stop Tx
m_btxok=false;
m_bCallingCQ = false;
m_bAutoReply = false; // ready for next
- ui->cbFirst->setStyleSheet ("");
+ m_maxPoints=-1;
}
void MainWindow::rigOpen ()
@@ -7240,6 +7685,12 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const&
if (m_lastDialFreq != m_freqNominal &&
(m_mode != "MSK144"
|| !(ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () && ui->cbCQTx->isChecked()))) {
+
+ if(m_lastDialFreq != m_freqNominal and m_ActiveStationsWidget != NULL) {
+ m_recentCall.clear();
+ m_ActiveStationsWidget->erase();
+ }
+
m_lastDialFreq = m_freqNominal;
m_secBandChanged=QDateTime::currentMSecsSinceEpoch()/1000;
pskSetLocal ();
@@ -7331,6 +7782,12 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
+ if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::ARRL_DIGI==m_config.special_op_id()) {
+ ui->dxCallEntry->setText(m_deCall);
+ ui->dxGridEntry->setText(m_deGrid);
+ genStdMsgs("-10");
+ }
+
if (m_mode == "FT8") {
// toneSpacing=12000.0/1920.0;
toneSpacing=-3;
@@ -7655,7 +8112,16 @@ void MainWindow::on_sbTR_valueChanged(int value)
m_wideGraph->setPeriod (value, m_nsps);
progressBar.setMaximum (value);
}
- if(m_mode=="FST4") chk_FST4_freq_range();
+ if (m_mode=="Q65") {
+ QTimer::singleShot (200, [=] {m_settings->setValue ("TRPeriod_Q65", ui->sbTR->value ());});
+ }
+ if (m_mode=="MSK144") {
+ QTimer::singleShot (200, [=] {m_settings->setValue ("TRPeriod_MSK144", ui->sbTR->value ());});
+ }
+ if (m_mode=="FST4") {
+ chk_FST4_freq_range();
+ QTimer::singleShot (200, [=] {m_settings->setValue ("TRPeriod_FST4", ui->sbTR->value ());});
+ }
// if(m_transmitting) on_stopTxButton_clicked(); //### Is this needed or desirable? ###
on_sbSubmode_valueChanged(ui->sbSubmode->value());
statusUpdate ();
@@ -7711,6 +8177,10 @@ void MainWindow::on_sbSubmode_valueChanged(int n)
if(m_bFast9) ui->TxFreqSpinBox->setValue(700);
}
if(m_transmitting and m_bFast9 and m_nSubMode>=4) transmit (99.0);
+ if (m_mode !="Q65") ui->TxFreqSpinBox->setStyleSheet("");
+ if (m_mode=="Q65") {QTimer::singleShot (200, [=] {m_settings->setValue("SubMode_Q65",ui->sbSubmode->value());});}
+ if (m_mode=="JT65") {QTimer::singleShot (200, [=] {m_settings->setValue("SubMode_JT65",ui->sbSubmode->value());});}
+ if (m_mode=="JT4") {QTimer::singleShot (200, [=] {m_settings->setValue("SubMode_JT4",ui->sbSubmode->value());});}
statusUpdate ();
}
@@ -7814,7 +8284,7 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
showNormal ();
raise ();
}
- if (text.contains (QRegularExpression {R"(^(CQ |CQDX |QRZ ))"})) {
+ if ((text.contains (QRegularExpression {R"(^(CQ |CQDX |QRZ ))"})) || (ui->cbHoldTxFreq->isChecked ())) {
// a message we are willing to accept and auto reply to
m_bDoubleClicked = true;
}
@@ -7956,8 +8426,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
}
m_nWSPRdecodes=0;
ui->DecodeButton->setChecked (false);
- if (m_uploadWSPRSpots
- && m_config.is_transceiver_online ()) { // need working rig control
+ if(m_uploadWSPRSpots && m_config.is_transceiver_online()) { // need working rig control
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
uploadTimer.start(QRandomGenerator::global ()->bounded (0, 20000)); // Upload delay
#else
@@ -7972,7 +8441,6 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
m_decoderBusy = false;
statusUpdate ();
} else {
-
int n=t.length();
t=t.mid(0,n-2) + " ";
t.remove(QRegExp("\\s+$"));
@@ -8010,7 +8478,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()),
const_cast <char *> ((grid + " ").left (6).toLatin1 ().constData ()),&utch,
- &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6);
+ &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6);
QString t1;
if(m_config.miles()) {
t1 = t1.asprintf("%7d",nDmiles);
@@ -8530,21 +8998,9 @@ void MainWindow::on_cbCQonly_toggled(bool)
decodeBusy(true);
}
-void MainWindow::on_cbFirst_toggled(bool b)
-{
- if (b) {
- if (m_auto && CALLING == m_QSOProgress) {
- ui->cbFirst->setStyleSheet ("QCheckBox{color:red}");
- }
- } else {
- ui->cbFirst->setStyleSheet ("");
- }
-}
-
void MainWindow::on_cbAutoSeq_toggled(bool b)
{
- if(!b) ui->cbFirst->setChecked(false);
- ui->cbFirst->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4"
+ ui->respondComboBox->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4"
or m_mode=="Q65") and b);
}
@@ -9221,6 +9677,7 @@ void MainWindow::foxTest()
void MainWindow::write_all(QString txRx, QString message)
{
+ if (!(ui->actionDisable_writing_of_ALL_TXT->isChecked())) {
QString line;
QString t;
QString msg;
@@ -9249,7 +9706,7 @@ void MainWindow::write_all(QString txRx, QString message)
auto time = QDateTime::currentDateTimeUtc ();
if( txRx=="Rx" && !m_bFastMode ) time=m_dateTimeSeqStart;
- t = t.asprintf("%10.3f ",m_freqNominal/1.e6);
+ t = t.asprintf("%10.3f ",m_freqNominalPeriod/1.e6); // prevent writing of wrong frequencies
if (m_diskData) {
if (m_fileDateTime.size()==11) {
line=m_fileDateTime + " " + t + txRx + " " + mode_string + msg;
@@ -9261,6 +9718,8 @@ void MainWindow::write_all(QString txRx, QString message)
}
QString file_name="ALL.TXT";
+ if (ui->actionSplit_ALL_TXT_yearly->isChecked()) file_name=(time.toString("yyyy") + "-" + "ALL.TXT");
+ if (ui->actionSplit_ALL_TXT_monthly->isChecked()) file_name=(time.toString("yyyy-MM") + "-" + "ALL.TXT");
if (m_mode=="WSPR") file_name="ALL_WSPR.TXT";
QFile f{m_config.writeable_data_dir().absoluteFilePath(file_name)};
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
@@ -9279,24 +9738,26 @@ void MainWindow::write_all(QString txRx, QString message)
QTimer::singleShot (0, [=] { // don't block guiUpdate
MessageBox::warning_message(this, tr ("Log File Error"), message2); });
}
+ }
}
void MainWindow::chkFT4()
{
if(m_mode!="FT4") return;
ui->cbAutoSeq->setEnabled(true);
- ui->cbFirst->setVisible(true);
- ui->cbFirst->setEnabled(true);
+ ui->respondComboBox->setVisible(true);
+ ui->respondComboBox->setEnabled(true);
ui->labDXped->setVisible(m_config.special_op_id()!=SpecOp::NONE);
- ui->cbFirst->setVisible(ui->cbAutoSeq->isChecked());
+ ui->respondComboBox->setVisible(ui->cbAutoSeq->isChecked());
if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) {
QString t0="";
- if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF";
- if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF";
- if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day";
- if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY";
- if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI";
+ if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF";
+ if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF";
+ if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day";
+ if(SpecOp::RTTY==m_config.special_op_id()) t0="RTTY";
+ if(SpecOp::WW_DIGI==m_config.special_op_id()) t0="WW_DIGI";
+ if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0="ARRL_DIGI";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
@@ -9443,3 +9904,55 @@ QString MainWindow::WSPR_message()
}
return msg2;
}
+
+void MainWindow::on_houndButton_clicked (bool checked)
+{
+ if (checked) {
+ ui->houndButton->setStyleSheet("background-color: #ff0000;");
+ m_config.setSpecial_Hound();
+ } else {
+ ui->houndButton->setStyleSheet("");
+ m_config.setSpecial_None();
+ }
+ on_actionFT8_triggered();
+}
+
+void MainWindow::on_ft8Button_clicked()
+{
+ ui->houndButton->setChecked(false);
+ ui->houndButton->setStyleSheet("");
+ if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None();
+ on_actionFT8_triggered();
+}
+
+void MainWindow::on_ft4Button_clicked()
+{
+ ui->houndButton->setChecked(false);
+ ui->houndButton->setStyleSheet("");
+ if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None();
+ on_actionFT4_triggered();
+}
+
+void MainWindow::on_msk144Button_clicked()
+{
+ ui->houndButton->setChecked(false);
+ ui->houndButton->setStyleSheet("");
+ if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None();
+ on_actionMSK144_triggered();
+}
+
+void MainWindow::on_q65Button_clicked()
+{
+ ui->houndButton->setChecked(false);
+ ui->houndButton->setStyleSheet("");
+ if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None();
+ on_actionQ65_triggered();
+}
+
+void MainWindow::on_jt65Button_clicked()
+{
+ ui->houndButton->setChecked(false);
+ ui->houndButton->setStyleSheet("");
+ if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None();
+ on_actionJT65_triggered();
+}
diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h
index 139c30c3..01c142e8 100755
--- a/widgets/mainwindow.h
+++ b/widgets/mainwindow.h
@@ -78,6 +78,7 @@ class WideGraph;
class LogQSO;
class Transceiver;
class MessageAveraging;
+class ActiveStations;
class FoxLogWindow;
class CabrilloLogWindow;
class ColorHighlighting;
@@ -141,6 +142,12 @@ private:
private slots:
void initialize_fonts ();
+ void on_houndButton_clicked(bool checked);
+ void on_ft8Button_clicked();
+ void on_ft4Button_clicked();
+ void on_msk144Button_clicked();
+ void on_q65Button_clicked();
+ void on_jt65Button_clicked();
void on_tx1_editingFinished();
void on_tx2_editingFinished();
void on_tx3_editingFinished();
@@ -261,6 +268,7 @@ private slots:
void stopTuneATU();
void auto_tx_mode(bool);
void on_actionMessage_averaging_triggered();
+ void on_actionActiveStations_triggered();
void on_contest_log_action_triggered ();
void on_fox_log_action_triggered ();
void on_actionColors_triggered();
@@ -275,7 +283,6 @@ private slots:
void on_cbTx6_toggled(bool b);
void on_cbMenus_toggled(bool b);
void on_cbCQonly_toggled(bool b);
- void on_cbFirst_toggled(bool b);
void on_cbAutoSeq_toggled(bool b);
void networkError (QString const&);
void on_ClrAvgButton_clicked();
@@ -327,6 +334,7 @@ private slots:
void remote_configure (QString const& mode, quint32 frequency_tolerance, QString const& submode
, bool fast_mode, quint32 tr_period, quint32 rx_df, QString const& dx_call
, QString const& dx_grid, bool generate_messages);
+ void callSandP2(int nline);
private:
Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo,
@@ -392,6 +400,7 @@ private:
QScopedPointer<HelpTextWindow> m_prefixes;
QScopedPointer<HelpTextWindow> m_mouseCmnds;
QScopedPointer<MessageAveraging> m_msgAvgWidget;
+ QScopedPointer<ActiveStations> m_ActiveStationsWidget;
QScopedPointer<FoxLogWindow> m_foxLogWindow;
QScopedPointer<CabrilloLogWindow> m_contestLogWindow;
QScopedPointer<ColorHighlighting> m_colorHighlighting;
@@ -416,6 +425,7 @@ private:
qint64 m_fullFoxCallTime;
Frequency m_freqNominal;
+ Frequency m_freqNominalPeriod;
Frequency m_freqTxNominal;
Astro::Correction m_astroCorrection;
bool m_reverse_Doppler;
@@ -451,6 +461,9 @@ private:
qint32 m_secID;
qint32 m_idleMinutes;
qint32 m_nSubMode;
+ qint32 m_nSubMode_Q65;
+ qint32 m_nSubMode_JT65;
+ qint32 m_nSubMode_JT4;
qint32 m_nclearave;
qint32 m_minSync;
qint32 m_dBm;
@@ -483,6 +496,10 @@ private:
qint32 m_earlyDecode=41;
qint32 m_earlyDecode2=47;
qint32 m_nDecodes=0;
+ qint32 m_maxPoints=-1;
+ qint32 m_latestDecodeTime=-1;
+ qint32 m_points=-99;
+ qint32 m_score=0;
bool m_btxok; //True if OK to transmit
bool m_diskData;
@@ -629,11 +646,15 @@ private:
QString m_xSent; //Contest exchange sent
QString m_xRcvd; //Contest exchange received
QString m_currentBand;
+ QString m_currentBandPeriod;
QString m_nextCall;
QString m_nextGrid;
QString m_fileDateTime;
QString m_inQSOwith;
QString m_BestCQpriority;
+ QString m_deCall;
+ QString m_deGrid;
+ QString m_ready2call[50];
QSet<QString> m_pfx;
QSet<QString> m_sfx;
@@ -661,6 +682,34 @@ private:
};
QMap<QString,FixupQSO> m_fixupQSO; //Key = HoundCall, value = info for QSO in progress
+ struct ActiveCall
+ {
+ QString grid4;
+ QString bands;
+ qint32 az;
+ qint32 points;
+ };
+ QMap<QString,ActiveCall> m_activeCall; //Key = callsign, value = grid4, az, points for ARRL_DIGI
+
+ struct RecentCall
+ {
+ qint64 dialFreq;
+ qint32 audioFreq;
+ qint32 snr;
+ qint32 decodeTime;
+ bool txEven;
+ bool ready2call;
+ };
+ QMap<QString,RecentCall> m_recentCall; //Key = callsign, value = snr, dialFreq, audioFreq, decodeTime
+
+ struct ARRL_logged
+ {
+ QDateTime time;
+ QString band;
+ qint32 points;
+ };
+ QList<ARRL_logged> m_arrl_log;
+
QQueue<QString> m_houndQueue; //Selected Hounds available for starting a QSO
QQueue<QString> m_foxQSOinProgress; //QSOs in progress: Fox has sent a report
QQueue<qint64> m_foxRateQueue;
@@ -741,6 +790,7 @@ private:
void CQTxFreq();
void useNextCall();
void abortQSO();
+ void updateRate();
void write_all(QString txRx, QString message);
bool isWorked(int itype, QString key, float fMHz=0, QString="");
@@ -781,6 +831,9 @@ private:
void to_jt9(qint32 n, qint32 istart, qint32 idone);
bool is77BitMode () const;
void cease_auto_Tx_after_QSO ();
+ Q_SLOT void ARRL_Digi_Display();
+ void ARRL_Digi_Update(DecodedText dt);
+ void activeWorked(QString call, QString band);
};
extern int killbyname(const char* progName);
diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui
index bb9b22b7..f377631f 100755
--- a/widgets/mainwindow.ui
+++ b/widgets/mainwindow.ui
@@ -2,6 +2,14 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>893</width>
+ <height>665</height>
+ </rect>
+ </property>
<property name="windowTitle">
<string>WSJT-X by K1JT</string>
</property>
@@ -552,362 +560,15 @@
</layout>
</item>
<item>
- <layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0" columnstretch="0,0,1,4,0">
- <item row="0" column="1" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
- <widget class="QPushButton" name="readFreq">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="accessibleDescription">
- <string>If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.</string>
- </property>
- <property name="styleSheet">
- <string notr="true">QPushButton {
- font-family: helvetica;
- font-size: 9pt;
- font-weight: bold;
- background-color: white;
- color: black;
- border-style: solid;
- border-width:1px;
- border-radius:10px;
- border-color: gray;
- max-width:20px;
- max-height:20px;
- min-width:20px;
- min-height:20px;
-}
-QPushButton[state=&quot;error&quot;] {
- background-color: red;
-}
-QPushButton[state=&quot;warning&quot;] {
- background-color: orange;
-}
-QPushButton[state=&quot;ok&quot;] {
- background-color: #00ff00;
-}</string>
- </property>
- <property name="text">
- <string>?</string>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
+ <layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0" columnstretch="0,0,0,1,3,0">
+ <item row="0" column="5">
<widget class="QLabel" name="label">
<property name="text">
<string> Pwr</string>
</property>
</widget>
</item>
- <item row="1" column="4" rowspan="2">
- <widget class="QSlider" name="outAttenuation">
- <property name="toolTip">
- <string>Adjust Tx audio level</string>
- </property>
- <property name="maximum">
- <number>450</number>
- </property>
- <property name="value">
- <number>0</number>
- </property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="invertedAppearance">
- <bool>true</bool>
- </property>
- <property name="invertedControls">
- <bool>true</bool>
- </property>
- <property name="tickPosition">
- <enum>QSlider::TicksBelow</enum>
- </property>
- <property name="tickInterval">
- <number>50</number>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="2">
- <widget class="QWidget" name="DX_controls_widget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QGridLayout" name="gridLayout_2" columnstretch="2,1">
- <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 row="0" column="0">
- <widget class="QLabel" name="label_3">
- <property name="palette">
- <palette>
- <active>
- <colorrole role="Base">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>252</red>
- <green>252</green>
- <blue>252</blue>
- </color>
- </brush>
- </colorrole>
- <colorrole role="Window">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- </active>
- <inactive>
- <colorrole role="Base">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>252</red>
- <green>252</green>
- <blue>252</blue>
- </color>
- </brush>
- </colorrole>
- <colorrole role="Window">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- </inactive>
- <disabled>
- <colorrole role="Base">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- <colorrole role="Window">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- </disabled>
- </palette>
- </property>
- <property name="autoFillBackground">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>DX Call</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="margin">
- <number>5</number>
- </property>
- <property name="indent">
- <number>2</number>
- </property>
- <property name="buddy">
- <cstring>dxCallEntry</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_4">
- <property name="palette">
- <palette>
- <active>
- <colorrole role="Base">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>252</red>
- <green>252</green>
- <blue>252</blue>
- </color>
- </brush>
- </colorrole>
- <colorrole role="Window">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- </active>
- <inactive>
- <colorrole role="Base">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>252</red>
- <green>252</green>
- <blue>252</blue>
- </color>
- </brush>
- </colorrole>
- <colorrole role="Window">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- </inactive>
- <disabled>
- <colorrole role="Base">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- <colorrole role="Window">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>159</red>
- <green>175</green>
- <blue>213</blue>
- </color>
- </brush>
- </colorrole>
- </disabled>
- </palette>
- </property>
- <property name="autoFillBackground">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>DX Grid</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="margin">
- <number>5</number>
- </property>
- <property name="indent">
- <number>2</number>
- </property>
- <property name="buddy">
- <cstring>dxGridEntry</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLineEdit" name="dxCallEntry">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Callsign of station to be worked</string>
- </property>
- <property name="maxLength">
- <number>11</number>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="dxGridEntry">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Locator of station to be worked</string>
- </property>
- <property name="text">
- <string>`</string>
- </property>
- <property name="maxLength">
- <number>6</number>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="0" colspan="2">
- <layout class="QGridLayout" name="gridLayout_4">
- <item row="1" column="0">
- <widget class="QPushButton" name="lookupButton">
- <property name="toolTip">
- <string>Search for callsign in database</string>
- </property>
- <property name="text">
- <string>&amp;Lookup</string>
- </property>
- </widget>
- </item>
- <item row="1" 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="0" column="0" colspan="2">
- <widget class="QLabel" name="labAz">
- <property name="autoFillBackground">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Az: 251 16553 km</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="indent">
- <number>4</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="1" colspan="2">
+ <item row="2" column="2" colspan="2">
<widget class="QLabel" name="labUTC">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
@@ -946,40 +607,7 @@ QPushButton[state=&quot;ok&quot;] {
</property>
</widget>
</item>
- <item row="0" column="2">
- <widget class="QLabel" name="labDialFreq">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>USB dial frequency</string>
- </property>
- <property name="styleSheet">
- <string notr="true">QLabel {
- font-family: MS Shell Dlg 2;
- font-size: 16pt;
- color : yellow;
- background-color : black;
-}
-QLabel[oob=&quot;true&quot;] {
- background-color: red;
-}</string>
- </property>
- <property name="text">
- <string>14.078 000</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="margin">
- <number>5</number>
- </property>
- </widget>
- </item>
- <item row="0" column="3" rowspan="3">
+ <item row="0" column="4" rowspan="3">
<widget class="QStackedWidget" name="controls_stack_widget">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -1204,15 +832,18 @@ When not checked you can view the calibration results.</string>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="cbFirst">
+ <widget class="QComboBox" name="respondComboBox">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check to call the first decoded responder to my CQ.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select &lt;span style=&quot; font-weight:600;&quot;&gt;CQ: First&lt;/span&gt; to respond automatically to the first decoded reply to your CQ. &lt;/p&gt;&lt;p&gt;Select &lt;span style=&quot; font-weight:600;&quot;&gt;CQ: Max Pts&lt;/span&gt; to respond automatically to the reply yielding most points in the ARRL International Digital Contest.&lt;/p&gt;&lt;p&gt;Select &lt;span style=&quot; font-weight:600;&quot;&gt;CQ: None&lt;/span&gt; to choose callers manually.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="accessibleDescription">
- <string>Check to call the first decoded responder to my CQ.</string>
+ <property name="currentText">
+ <string/>
</property>
- <property name="text">
- <string>Call 1st</string>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>3</number>
</property>
</widget>
</item>
@@ -2761,10 +2392,44 @@ Double-click to reset to the standard 73 message</string>
</widget>
</widget>
</item>
+ <item row="0" column="0">
+ <widget class="BandComboBox" name="bandComboBox">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select operating band or enter frequency in MHz or enter kHz increment followed by k.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="accessibleName">
+ <string>Frequency entry</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</string>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::NoInsert</enum>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
+ </property>
+ </widget>
+ </item>
<item row="1" column="0" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QSpinBox" name="sbNB">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
@@ -2818,28 +2483,525 @@ Yellow when too low</string>
</item>
</layout>
</item>
- <item row="0" column="0">
- <widget class="BandComboBox" name="bandComboBox">
+ <item row="1" column="2" colspan="2">
+ <widget class="QWidget" name="DX_controls_widget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" columnstretch="2,1">
+ <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 row="0" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>252</red>
+ <green>252</green>
+ <blue>252</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>252</red>
+ <green>252</green>
+ <blue>252</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>DX Call</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="margin">
+ <number>5</number>
+ </property>
+ <property name="indent">
+ <number>2</number>
+ </property>
+ <property name="buddy">
+ <cstring>dxCallEntry</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_4">
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>252</red>
+ <green>252</green>
+ <blue>252</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>252</red>
+ <green>252</green>
+ <blue>252</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="Base">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>159</red>
+ <green>175</green>
+ <blue>213</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>DX Grid</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="margin">
+ <number>5</number>
+ </property>
+ <property name="indent">
+ <number>2</number>
+ </property>
+ <property name="buddy">
+ <cstring>dxGridEntry</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLineEdit" name="dxCallEntry">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Callsign of station to be worked</string>
+ </property>
+ <property name="maxLength">
+ <number>11</number>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="dxGridEntry">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Locator of station to be worked</string>
+ </property>
+ <property name="text">
+ <string>`</string>
+ </property>
+ <property name="maxLength">
+ <number>6</number>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="1" column="0">
+ <widget class="QPushButton" name="lookupButton">
+ <property name="toolTip">
+ <string>Search for callsign in database</string>
+ </property>
+ <property name="text">
+ <string>&amp;Lookup</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" 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="0" column="0" colspan="2">
+ <widget class="QLabel" name="labAz">
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Az: 251 16553 km</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="indent">
+ <number>4</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="5" rowspan="2">
+ <widget class="QSlider" name="outAttenuation">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select operating band or enter frequency in MHz or enter kHz increment followed by k.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>Adjust Tx audio level</string>
</property>
- <property name="accessibleName">
- <string>Frequency entry</string>
+ <property name="maximum">
+ <number>450</number>
</property>
- <property name="accessibleDescription">
- <string>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</string>
+ <property name="value">
+ <number>0</number>
</property>
- <property name="editable">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="invertedAppearance">
<bool>true</bool>
</property>
- <property name="insertPolicy">
- <enum>QComboBox::NoInsert</enum>
+ <property name="invertedControls">
+ <bool>true</bool>
</property>
- <property name="sizeAdjustPolicy">
- <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
+ <property name="tickPosition">
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ <property name="tickInterval">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
+ <widget class="QPushButton" name="readFreq">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">QPushButton {
+ font-family: helvetica;
+ font-size: 9pt;
+ font-weight: bold;
+ background-color: white;
+ color: black;
+ border-style: solid;
+ border-width:1px;
+ border-radius:10px;
+ border-color: gray;
+ max-width:20px;
+ max-height:20px;
+ min-width:20px;
+ min-height:20px;
+}
+QPushButton[state=&quot;error&quot;] {
+ background-color: red;
+}
+QPushButton[state=&quot;warning&quot;] {
+ background-color: orange;
+}
+QPushButton[state=&quot;ok&quot;] {
+ background-color: #00ff00;
+}</string>
+ </property>
+ <property name="text">
+ <string>?</string>
</property>
</widget>
</item>
+ <item row="0" column="2" colspan="2">
+ <widget class="QLabel" name="labDialFreq">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>USB dial frequency</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">QLabel {
+ font-family: MS Shell Dlg 2;
+ font-size: 16pt;
+ color : yellow;
+ background-color : black;
+}
+QLabel[oob=&quot;true&quot;] {
+ background-color: red;
+}</string>
+ </property>
+ <property name="text">
+ <string>14.078 000</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="margin">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" rowspan="2">
+ <layout class="QVBoxLayout" name="verticalLayout_15">
+ <item>
+ <widget class="QPushButton" name="houndButton">
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Toggle FT8 hound mode On/Off</string>
+ </property>
+ <property name="text">
+ <string>H</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="ft8Button">
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Switch to FT8 mode</string>
+ </property>
+ <property name="text">
+ <string>FT8</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="ft4Button">
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Switch to FT4 mode</string>
+ </property>
+ <property name="text">
+ <string>FT4</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="msk144Button">
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Switch to MSK144 mode</string>
+ </property>
+ <property name="text">
+ <string>MSK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="q65Button">
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Switch to Q65 mode</string>
+ </property>
+ <property name="text">
+ <string>Q65</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="jt65Button">
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Switch to JT65 mode</string>
+ </property>
+ <property name="text">
+ <string>JT65</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>
@@ -2852,7 +3014,7 @@ Yellow when too low</string>
<rect>
<x>0</x>
<y>0</y>
- <width>842</width>
+ <width>893</width>
<height>21</height>
</rect>
</property>
@@ -2889,6 +3051,7 @@ Yellow when too low</string>
<addaction name="contest_log_action"/>
<addaction name="fox_log_action"/>
<addaction name="actionColors"/>
+ <addaction name="actionActiveStations"/>
<addaction name="actionSWL_Mode"/>
</widget>
<widget class="QMenu" name="menuDecode">
@@ -2913,6 +3076,11 @@ Yellow when too low</string>
<addaction name="actionNone"/>
<addaction name="actionSave_decoded"/>
<addaction name="actionSave_all"/>
+ <addaction name="separator"/>
+ <addaction name="actionDon_t_split_ALL_TXT"/>
+ <addaction name="actionSplit_ALL_TXT_yearly"/>
+ <addaction name="actionSplit_ALL_TXT_monthly"/>
+ <addaction name="actionDisable_writing_of_ALL_TXT"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
@@ -3461,6 +3629,46 @@ Yellow when too low</string>
<string>Quick-Start Guide to WSJT-X 2.5.0 and MAP65 3.0</string>
</property>
</action>
+ <action name="actionDon_t_split_ALL_TXT">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Don't split ALL.TXT</string>
+ </property>
+ </action>
+ <action name="actionSplit_ALL_TXT_yearly">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Split ALL.TXT yearly</string>
+ </property>
+ </action>
+ <action name="actionSplit_ALL_TXT_monthly">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Split ALL.TXT monthly</string>
+ </property>
+ </action>
+ <action name="actionDisable_writing_of_ALL_TXT">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Disable writing of ALL.TXT</string>
+ </property>
+ </action>
+ <action name="actionActiveStations">
+ <property name="text">
+ <string>Active Stations</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
@@ -3521,7 +3729,6 @@ Yellow when too low</string>
<tabstop>tuneButton</tabstop>
<tabstop>cbMenus</tabstop>
<tabstop>bandComboBox</tabstop>
- <tabstop>readFreq</tabstop>
<tabstop>sbNB</tabstop>
<tabstop>dxCallEntry</tabstop>
<tabstop>dxGridEntry</tabstop>
@@ -3544,7 +3751,6 @@ Yellow when too low</string>
<tabstop>cbShMsgs</tabstop>
<tabstop>cbFast9</tabstop>
<tabstop>cbAutoSeq</tabstop>
- <tabstop>cbFirst</tabstop>
<tabstop>cbTx6</tabstop>
<tabstop>cbSWL</tabstop>
<tabstop>pbBestSP</tabstop>
diff --git a/widgets/signalmeter.cpp b/widgets/signalmeter.cpp
index 60e49b56..b9724d16 100755
--- a/widgets/signalmeter.cpp
+++ b/widgets/signalmeter.cpp
@@ -77,7 +77,7 @@ SignalMeter::SignalMeter (QWidget * parent)
outer_layout->setSpacing (0);
auto inner_layout = new QHBoxLayout;
- inner_layout->setContentsMargins (9, 0, 9, 0);
+ inner_layout->setContentsMargins (1, 0, 1, 0);
inner_layout->setSpacing (0);
m_meter = new MeterWidget;
diff --git a/widgets/widgets.pri b/widgets/widgets.pri
index 6a623d82..e8bdf540 100755
--- a/widgets/widgets.pri
+++ b/widgets/widgets.pri
@@ -4,6 +4,7 @@ SOURCES += \
widgets/meterwidget.cpp widgets/signalmeter.cpp \
widgets/plotter.cpp widgets/widegraph.cpp widgets/about.cpp \
widgets/mainwindow.cpp widgets/messageaveraging.cpp \
+ widgets/activeStations.cpp \
widgets/echoplot.cpp widgets/echograph.cpp widgets/fastgraph.cpp \
widgets/fastplot.cpp widgets/MessageBox.cpp \
widgets/colorhighlighting.cpp widgets/ExportCabrillo.cpp \
@@ -19,6 +20,7 @@ HEADERS += \
widgets/displaytext.h widgets/logqso.h widgets/LettersSpinBox.hpp \
widgets/FrequencyLineEdit.hpp widgets/FrequencyDeltaLineEdit.hpp widgets/signalmeter.h \
widgets/meterwidget.h widgets/messageaveraging.h \
+ widgets/activeStations.h \
widgets/echoplot.h widgets/echograph.h widgets/fastgraph.h \
widgets/fastplot.h widgets/MessageBox.hpp widgets/colorhighlighting.h \
widgets/ExportCabrillo.h widgets/AbstractLogWindow.hpp \
@@ -31,6 +33,7 @@ FORMS += \
widgets/mainwindow.ui widgets/about.ui \
widgets/widegraph.ui widgets/astro.ui \
widgets/logqso.ui widgets/messageaveraging.ui \
+ widgets/activeStations.ui \
widgets/echograph.ui widgets/fastgraph.ui \
widgets/colorhighlighting.ui widgets/ExportCabrillo.ui \
widgets/FoxLogWindow.ui widgets/CabrilloLogWindow.ui