diff options
| author | Christoph Berg <myon@debian.org> | 2022-12-04 22:15:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2022-12-04 22:15:32 +0100 |
| commit | fa73b3f50ec6ead52c3371a96f62bc6e666a9ee5 (patch) | |
| tree | 6971e745fdf2f4c6b81ded57e87d233840971d62 /widgets | |
| parent | 4d2fac0dafe835b1ed479bebe136c3afe748ecf3 (diff) | |
New upstream version 2.6.0~rc5+repackupstream/2.6.0_rc5+repack
Diffstat (limited to 'widgets')
| -rwxr-xr-x | widgets/BandComboBox.cpp | 2 | ||||
| -rwxr-xr-x | widgets/displaytext.cpp | 19 | ||||
| -rwxr-xr-x | widgets/displaytext.h | 7 | ||||
| -rwxr-xr-x | widgets/mainwindow.cpp | 444 | ||||
| -rwxr-xr-x | widgets/mainwindow.h | 9 | ||||
| -rwxr-xr-x | widgets/mainwindow.ui | 1291 | ||||
| -rwxr-xr-x | widgets/plotter.cpp | 98 | ||||
| -rwxr-xr-x | widgets/plotter.h | 8 | ||||
| -rwxr-xr-x | widgets/widegraph.cpp | 19 | ||||
| -rwxr-xr-x | widgets/widegraph.h | 3 | ||||
| -rwxr-xr-x | widgets/widegraph.ui | 5 |
11 files changed, 1144 insertions, 761 deletions
diff --git a/widgets/BandComboBox.cpp b/widgets/BandComboBox.cpp index d75b5b43..c34ec7e7 100755 --- a/widgets/BandComboBox.cpp +++ b/widgets/BandComboBox.cpp @@ -15,7 +15,7 @@ BandComboBox::BandComboBox (QWidget * parent) // item text.
void BandComboBox::showPopup ()
{
- auto minimum_width = view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column);
+ auto minimum_width = view ()->sizeHintForColumn (FrequencyList_v2_101::frequency_mhz_column);
if (count () > maxVisibleItems ())
{
// for some as yet unknown reason, in FT8 mode the scrollbar
diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 8d8ccb38..2a75c2da 100755 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -86,7 +86,7 @@ void DisplayText::mouseDoubleClickEvent(QMouseEvent *e) void DisplayText::insertLineSpacer(QString const& line)
{
- appendText (line, "#d3d3d3");
+ insertText (line, "#d3d3d3");
}
namespace
@@ -123,11 +123,11 @@ namespace }
}
-void DisplayText::appendText(QString const& text, QColor bg, QColor fg
- , QString const& call1, QString const& call2)
+void DisplayText::insertText(QString const& text, QColor bg, QColor fg
+ , QString const& call1, QString const& call2, QTextCursor::MoveOperation location)
{
auto cursor = textCursor ();
- cursor.movePosition (QTextCursor::End);
+ cursor.movePosition (location);
auto block_format = cursor.blockFormat ();
auto format = cursor.blockCharFormat ();
format.setFont (char_font_);
@@ -484,7 +484,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con }
}
- appendText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
+ insertText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
}
@@ -516,18 +516,19 @@ void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 tx QColor fg;
highlight_types types {Highlight::Tx};
set_colours (m_config, &bg, &fg, types);
- appendText (t, bg, fg);
+ insertText (t, bg, fg);
}
void DisplayText::displayQSY(QString text)
{
QString t = QDateTime::currentDateTimeUtc().toString("hhmmss") + " " + text;
- appendText (t, "hotpink");
+ insertText (t, "hotpink");
}
-void DisplayText::displayFoxToBeCalled(QString t, QColor bg, QColor fg)
+void DisplayText::displayHoundToBeCalled(QString t, bool bAtTop, QColor bg, QColor fg)
{
- appendText (t, bg, fg);
+ if (bAtTop) t = t + "\n"; // need a newline when insertion at top
+ insertText(t, bg, fg, "", "", bAtTop ? QTextCursor::Start : QTextCursor::End);
}
namespace
diff --git a/widgets/displaytext.h b/widgets/displaytext.h index 06f9bec8..1d385534 100755 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -33,7 +33,7 @@ public: 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 displayHoundToBeCalled(QString t, bool bAtTop=false, QColor bg = QColor {}, QColor fg = QColor {});
void new_period ();
QString CQPriority(){return m_CQPriority;};
qint32 m_points;
@@ -42,8 +42,8 @@ public: Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
Q_SIGNAL void erased ();
- Q_SLOT void appendText (QString const& text, QColor bg = QColor {}, QColor fg = QColor {}
- , QString const& call1 = QString {}, QString const& call2 = QString {});
+ Q_SLOT void insertText (QString const& text, QColor bg = QColor {}, QColor fg = QColor {}
+ , QString const& call1 = QString {}, QString const& call2 = QString {}, QTextCursor::MoveOperation location=QTextCursor::End);
Q_SLOT void erase ();
Q_SLOT void highlight_callsign (QString const& callsign, QColor const& bg, QColor const& fg, bool last_period_only);
@@ -62,6 +62,7 @@ private: , QString const& currentMode, QString extra);
QFont char_font_;
QAction * erase_action_;
+
QHash<QString, QPair<QColor, QColor>> highlighted_calls_;
bool high_volume_;
QMetaObject::Connection vertical_scroll_connection_;
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index de0b2cee..8e38a601 100755 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -90,6 +90,7 @@ #include "ExportCabrillo.h"
#include "ui_mainwindow.h"
#include "moc_mainwindow.cpp"
+#include "Logger.hpp"
#define FCL fortran_charlen_t
@@ -155,7 +156,7 @@ extern "C" { void save_echo_params_(int* ndoptotal, int* ndop, int* nfrit, float* f1, float* fspread, short id2[], int* idir);
- void avecho_( short id2[], int* dop, int* nfrit, int* nauto, int* nqual, float* f1,
+ void avecho_( short id2[], int* dop, int* nfrit, int* nauto, int* navg, int* nqual, float* f1,
float* level, float* sigdb, float* snr, float* dfreq,
float* width, bool* bDiskData);
@@ -208,6 +209,8 @@ QVector<QColor> g_ColorTbl; using SpecOp = Configuration::SpecialOperatingActivity;
bool m_displayBand = false;
+bool no_a7_decodes = false;
+bool keep_frequency = false;
namespace
{
@@ -654,7 +657,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, connect(txMsgButtonGroup,SIGNAL(buttonClicked(int)),SLOT(set_ntx(int)));
connect (ui->decodedTextBrowser, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnCall2);
connect (ui->decodedTextBrowser2, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnCall);
- connect (ui->textBrowser4, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnFoxQueue);
+ connect (ui->houndQueueTextBrowser, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnFoxQueue);
+ connect (ui->foxTxListTextBrowser, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnFoxInProgress);
connect (ui->decodedTextBrowser, &DisplayText::erased, this, &MainWindow::band_activity_cleared);
connect (ui->decodedTextBrowser2, &DisplayText::erased, this, &MainWindow::rx_frequency_activity_cleared);
@@ -753,24 +757,6 @@ 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
@@ -783,7 +769,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, // Hook up working frequencies.
ui->bandComboBox->setModel (m_config.frequencies ());
- ui->bandComboBox->setModelColumn (FrequencyList_v2::frequency_mhz_column);
+ ui->bandComboBox->setModelColumn (FrequencyList_v2_101::frequency_mhz_column);
// Enable live band combo box entry validation and action.
auto band_validator = new LiveFrequencyValidator {ui->bandComboBox
@@ -1035,6 +1021,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_wideGraph->setMode(m_mode);
connect (&minuteTimer, &QTimer::timeout, this, &MainWindow::on_the_minute);
+ connect (&minuteTimer, &QTimer::timeout, this, &MainWindow::invalidate_frequencies_filter);
+
minuteTimer.setSingleShot (true);
minuteTimer.start (ms_minute_error () + 60 * 1000);
@@ -1061,9 +1049,9 @@ void MainWindow::not_GA_warning_message () 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 Dec 31, 2022.");
+ "be nonfunctional after Mar 31, 2023.");
auto now = QDateTime::currentDateTimeUtc ();
- if (now >= QDateTime {{2022, 12, 31}, {23, 59, 59, 999}, Qt::UTC}) {
+ if (now >= QDateTime {{2023, 03, 31}, {23, 59, 59, 999}, Qt::UTC}) {
Q_EMIT finished ();
}
}
@@ -1079,6 +1067,14 @@ void MainWindow::splash_done () m_splash && m_splash->close ();
}
+void MainWindow::invalidate_frequencies_filter ()
+{
+ // every interval, invalidate the frequency filter, so that if any
+ // working frequency goes in/out of scope, we pick it up.
+ m_config.frequencies ()->filter_refresh ();
+ ui->bandComboBox->update ();
+}
+
void MainWindow::on_the_minute ()
{
if (minuteTimer.isSingleShot ())
@@ -1214,6 +1210,7 @@ void MainWindow::writeSettings() m_settings->setValue("Blanker",ui->sbNB->value());
m_settings->setValue("Score",m_score);
m_settings->setValue("labDXpedText",ui->labDXped->text());
+ m_settings->setValue("EchoAvg",ui->sbEchoAvg->value());
{
QList<QVariant> coeffs; // suitable for QSettings
@@ -1347,6 +1344,7 @@ void MainWindow::readSettings() ui->actionAuto_Clear_Avg->setChecked (m_settings->value ("AutoClearAvg", false).toBool());
ui->decodes_splitter->restoreState(m_settings->value("SplitterState").toByteArray());
ui->sbNB->setValue(m_settings->value("Blanker",0).toInt());
+ ui->sbEchoAvg->setValue(m_settings->value("EchoAvg",10).toInt());
{
auto const& coeffs = m_settings->value ("PhaseEqualizationCoefficients"
, QList<QVariant> {0., 0., 0., 0., 0.}).toList ();
@@ -1364,6 +1362,7 @@ void MainWindow::readSettings() m_audioThreadPriority = static_cast<QThread::Priority> (m_settings->value ("Audio/ThreadPriority", QThread::TimeCriticalPriority).toInt () % 8);
m_settings->endGroup ();
+ m_specOp=m_config.special_op_id();
checkMSK144ContestType();
if(displayMsgAvg) on_actionMessage_averaging_triggered();
if (displayFoxLog) on_fox_log_action_triggered ();
@@ -1400,10 +1399,35 @@ void MainWindow::set_application_font (QFont const& font) QFile sf {sheet};
if (sf.open (QFile::ReadOnly | QFile::Text))
{
- ss = sf.readAll () + ss;
+ QString tmp = sf.readAll();
+ if (tmp != NULL) ss = sf.readAll () + tmp;
+ else qDebug() << "tmp==NULL at sf.readAll";
}
}
qApp->setStyleSheet (ss + "* {" + font_as_stylesheet (font) + '}');
+ // 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);
+ ui->houndButton->setMinimumWidth(0);
+ ui->ft8Button->setMinimumWidth(0);
+ ui->ft4Button->setMinimumWidth(0);
+ ui->msk144Button->setMinimumWidth(0);
+ ui->q65Button->setMinimumWidth(0);
+ ui->jt65Button->setMinimumWidth(0);
+ } 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);
+ }
for (auto& widget : qApp->topLevelWidgets ())
{
widget->updateGeometry ();
@@ -1414,9 +1438,14 @@ void MainWindow::setDecodedTextFont (QFont const& font) {
ui->decodedTextBrowser->setContentFont (font);
ui->decodedTextBrowser2->setContentFont (font);
- ui->textBrowser4->setContentFont(font);
- ui->textBrowser4->displayFoxToBeCalled(" ");
- ui->textBrowser4->setText("");
+ ui->houndQueueTextBrowser->setContentFont(font);
+ ui->houndQueueTextBrowser->displayHoundToBeCalled(" ");
+ ui->houndQueueTextBrowser->setText("");
+
+ ui->foxTxListTextBrowser->setContentFont(font);
+ ui->foxTxListTextBrowser->displayHoundToBeCalled(" ");
+ ui->foxTxListTextBrowser->setText("");
+
auto style_sheet = "QLabel {" + font_as_stylesheet (font) + '}';
ui->lh_decodes_headings_label->setStyleSheet (ui->lh_decodes_headings_label->styleSheet () + style_sheet);
ui->rh_decodes_headings_label->setStyleSheet (ui->rh_decodes_headings_label->styleSheet () + style_sheet);
@@ -1531,7 +1560,7 @@ void MainWindow::dataSink(qint64 frames) if(m_ihsym <=0) return;
if(ui) ui->signal_meter_widget->setValue(m_px,m_pxmax); // Update thermometer
if(m_monitoring || m_diskData) {
- m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData);
+ m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData,m_px);
}
if(m_mode=="MSK144") return;
@@ -1606,11 +1635,12 @@ void MainWindow::dataSink(qint64 frames) echocom_.nclearave=m_nclearave;
int nDop=m_fAudioShift;
int nDopTotal=m_fDop;
+ int navg=ui->sbEchoAvg->value();
if(m_diskData) {
int idir=-1;
save_echo_params_(&nDopTotal,&nDop,&nfrit,&f1,&width,dec_data.d2,&idir);
}
- avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&nqual,&f1,&xlevel,&sigdb,
+ avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&navg,&nqual,&f1,&xlevel,&sigdb,
&dBerr,&dfreq,&width,&m_diskData);
//Don't restart Monitor after an Echo transmission
if(m_bEchoTxed and !m_auto) {
@@ -1619,7 +1649,7 @@ void MainWindow::dataSink(qint64 frames) }
if(m_monitoring or m_auto or m_diskData) {
- QString t0;
+ QString t0,t1;
if(m_diskData) {
t0=t0.asprintf("%06d ",m_UTCdisk);
} else {
@@ -1630,17 +1660,20 @@ void MainWindow::dataSink(qint64 frames) if(m_auto) isec=isec - isec%6;
if(!m_auto) isec=isec - isec%3;
t0=t0.asprintf("%02d%02d%02d ",ihr,imin,isec);
+ t1=now.toString("yyMMdd_");
}
int n=t0.toInt();
int nsec=((n/10000)*3600) + (((n/100)%100)*60) + (n%100);
- if(!m_echoRunning) m_echoSec0=nsec;
- n=(nsec-m_echoSec0 + 864000)%86400;
+ if(!m_echoRunning or echocom_.nsum<2) m_echoSec0=nsec;
+ float hour=n/10000 + ((n/100)%100)/60.0 + (n%100)/3600.0;
m_echoRunning=true;
QString t;
- t = t.asprintf("%6d %5.2f %7d %7.1f %7d %7d %7d %7.1f %7.1f",n,xlevel,
+ t = t.asprintf("%9.6f %5.2f %7d %7.1f %7d %7d %7d %7.1f %7.1f",hour,xlevel,
nDopTotal,width,echocom_.nsum,nqual,qRound(dfreq),sigdb,dBerr);
t = t0 + t;
- if (ui) ui->decodedTextBrowser->appendText(t);
+ if (ui) ui->decodedTextBrowser->insertText(t);
+ t=t1+t;
+ write_all("Rx",t);
}
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
@@ -2078,7 +2111,6 @@ void MainWindow::auto_tx_mode (bool state) void MainWindow::keyPressEvent (QKeyEvent * e)
{
-
if(SpecOp::FOX == m_specOp) {
switch (e->key()) {
case Qt::Key_Return:
@@ -2090,6 +2122,13 @@ void MainWindow::keyPressEvent (QKeyEvent * e) case Qt::Key_Backspace:
qDebug() << "Key Backspace";
return;
+#ifdef DEBUG_FOX
+ case Qt::Key_X:
+ if(e->modifiers() & Qt::AltModifier) {
+ foxTest();
+ return;
+ }
+#endif
}
QMainWindow::keyPressEvent (e);
}
@@ -3166,6 +3205,7 @@ void MainWindow::on_ClrAvgButton_clicked() if(m_mode=="Echo") {
echocom_.nsum=0;
m_echoGraph->clearAvg();
+ m_wideGraph->restartTotalPower();
} else {
if(m_msgAvgWidget != NULL) {
if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->displayAvg("");
@@ -3672,6 +3712,10 @@ void MainWindow::readFromStdout() //readFromStdout continue;
}
}
+
+ // Don't allow a7 decodes during the first period because they can be leftovers from the previous band
+ if (!(no_a7_decodes && line_read.contains("a7"))) {
+
if (m_mode!="FT8" and m_mode!="FT4" and !m_mode.startsWith ("FST4") and m_mode!="Q65") {
//Pad 22-char msg to at least 37 chars
line_read = line_read.left(44) + " " + line_read.mid(44);
@@ -3738,6 +3782,7 @@ void MainWindow::readFromStdout() //readFromStdout }
m_tBlankLine = line_read.left(ntime);
}
+ }
if ("FST4W" == m_mode)
{
uploadWSPRSpots (true, line_read);
@@ -3787,7 +3832,8 @@ void MainWindow::readFromStdout() //readFromStdout 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})))) {
+ || (decodedtext.string().contains(QRegularExpression {"<(\\w+)> " + m_hisCall}))
+ || (decodedtext.string().contains(QRegularExpression {"<...> " + 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);
@@ -3849,8 +3895,13 @@ void MainWindow::readFromStdout() //readFromStdout 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 (decodedtext.messageWords().length() >= 2) {
+ QString t=decodedtext.messageWords()[2];
+ if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true;
+ }
+ else {
+ bProcessMsgNormally=true;
+ }
if(bProcessMsgNormally) {
m_bDoubleClicked=true;
m_bAutoReply = true;
@@ -3861,6 +3912,9 @@ void MainWindow::readFromStdout() //readFromStdout QString deCall;
QString deGrid;
decodedtext.deCallAndGrid(/*out*/deCall,deGrid);
+ // if they dont' send their grid we'll use ours and assume dx=0
+ if (deGrid.length() == 0) deGrid = m_config.my_grid();
+
if(deGrid.contains(grid_regexp) or
(deGrid.contains("+") or deGrid.contains("-"))) {
int points=0;
@@ -3903,7 +3957,7 @@ void MainWindow::readFromStdout() //readFromStdout }
if(SpecOp::FOX==m_specOp and decodedtext.string().contains(" DE ")) for_us=true; //Hound with compound callsign
- if(SpecOp::FOX==m_specOp and for_us and (audioFreq<1000)) bDisplayRight=true;
+ if(SpecOp::FOX==m_specOp and for_us and decodedtext.string().contains(QRegularExpression{" R\\W\\d"})) bDisplayRight=true;
if(SpecOp::FOX!=m_specOp and (for_us or (abs(audioFreq - m_wideGraph->rxFreq()) <= 10))) bDisplayRight=true;
}
} else {
@@ -4009,7 +4063,8 @@ void MainWindow::readFromStdout() //readFromStdout if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
QTextStream s(&f);
QString t=s.readAll();
- m_msgAvgWidget->displayAvg(t);
+ if (t != NULL) m_msgAvgWidget->displayAvg(t);
+ else qDebug() << "tmp==NULL at s.readAll";
}
}
}
@@ -4109,7 +4164,7 @@ void MainWindow::pskPost (DecodedText const& decodedtext) }
int snr = decodedtext.snr();
Frequency frequency = m_freqNominalPeriod + audioFrequency; // prevent spotting wrong band
- if(grid.contains (grid_regexp)) {
+ if(grid.contains (grid_regexp) || decodedtext.string().contains(" CQ ")) {
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
if (!m_psk_Reporter.addRemoteStation (deCall, grid, frequency, msgmode, snr))
{
@@ -4860,7 +4915,7 @@ void MainWindow::startTx2() t = " Transmitting " + m_mode + " ----------------------- " +
m_config.bands ()->find (m_freqNominal);
t=beacon_start_time (m_TRperiod / 2) + ' ' + t.rightJustified (66, '-');
- ui->decodedTextBrowser->appendText(t);
+ ui->decodedTextBrowser->insertText(t);
}
write_all("Tx",m_currentMessage);
}
@@ -5139,7 +5194,7 @@ void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers) if(SpecOp::FOX==m_specOp and m_decodedText2) {
if(m_houndQueue.count()<10 and m_nSortedHounds>0) {
QString t=cursor.block().text();
- selectHound(t);
+ selectHound(t, modifiers==(Qt::AltModifier)); // alt double-click gets put at top of queue
}
return;
}
@@ -6138,7 +6193,9 @@ void MainWindow::on_addButton_clicked() //Add button // preserve symlinks
f1.open (QFile::WriteOnly | QFile::Text); // truncates
f2.seek (0);
- f1.write (f2.readAll ()); // copy contents
+ QByteArray tmp = f2.readAll();
+ if (tmp != (const char*)NULL) f1.write (tmp); // copy contents
+ else qDebug() << "tmp==NULL at f1.write";
f2.remove ();
}
}
@@ -6516,6 +6573,7 @@ void MainWindow::displayWidgets(qint64 n) (m_config.RTTY_Exchange()=="DX" or m_config.RTTY_Exchange()=="#") );
}
if(m_mode=="MSK144") b=SpecOp::EU_VHF==m_specOp;
+ ui->sbEchoAvg->setVisible(m_mode=="Echo");
ui->sbSerialNumber->setVisible(b);
m_lastCallsign.clear (); // ensures Tx5 is updated for new modes
b=m_mode.startsWith("FST4");
@@ -6624,6 +6682,7 @@ void MainWindow::on_actionFT4_triggered() m_wideGraph->setMode(m_mode);
m_send_RR73=true;
VHF_features_enabled(bVHF);
+ ui->cbAutoSeq->setChecked(true);
m_fastGraph->hide();
m_wideGraph->show();
ui->rh_decodes_headings_label->setText(" UTC dB DT Freq " + tr ("Message"));
@@ -6730,7 +6789,7 @@ void MainWindow::on_actionFT8_triggered() ui->txb5->setEnabled(false);
ui->txb6->setEnabled(false);
} else {
- switch_mode (Modes::FT8);
+ if (!(keep_frequency)) switch_mode (Modes::FT8);
}
if(m_specOp != SpecOp::HOUND) {
@@ -6941,6 +7000,7 @@ void MainWindow::on_actionQ65_triggered() m_mode="Q65";
ui->actionQ65->setChecked(true);
switch_mode(Modes::Q65);
+ ui->cbAutoSeq->setChecked(true);
fast_config(false);
WSPR_config(false);
setup_status_bar(true);
@@ -7022,6 +7082,7 @@ void MainWindow::on_actionMSK144_triggered() m_toneSpacing=0.0;
WSPR_config(false);
VHF_features_enabled(true);
+ ui->cbAutoSeq->setChecked(true);
m_bFastMode=true;
m_bFast9=false;
ui->sbTR->values ({5, 10, 15, 30});
@@ -7098,7 +7159,13 @@ void MainWindow::on_actionWSPR_triggered() void MainWindow::on_actionEcho_triggered()
{
+ int nd=int(m_ndepth&3);
on_actionJT4_triggered();
+// Don't allow decoding depth to be changed just because Echo mode was entered:
+ if(nd==1) ui->actionQuickDecode->setChecked (true);
+ if(nd==2) ui->actionMediumDecode->setChecked (true);
+ if(nd==3) ui->actionDeepestDecode->setChecked (true);
+
m_mode="Echo";
ui->actionEcho->setChecked(true);
m_TRperiod=3.0;
@@ -7121,11 +7188,11 @@ void MainWindow::on_actionEcho_triggered() m_bFastMode=false;
m_bFast9=false;
WSPR_config(true);
- ui->lh_decodes_headings_label->setText(" UTC Tsec Level Doppler Width N Q DF SNR dBerr");
+ ui->lh_decodes_headings_label->setText(" UTC Hour Level Doppler Width N Q DF SNR dBerr");
// 01234567890123456789012345678901234567
displayWidgets(nWidgets("00000000000000000010001000000000000000"));
fast_config(false);
- if(m_astroWidget) m_astroWidget->selectOwnEcho();
+ ui->sbEchoAvg->values ({1, 2, 5, 10, 20, 50, 100});
statusChanged();
monitor(false);
}
@@ -7159,7 +7226,7 @@ void MainWindow::on_actionFreqCal_triggered() void MainWindow::switch_mode (Mode mode)
{
m_fastGraph->setMode(m_mode);
- m_config.frequencies ()->filter (m_config.region (), mode);
+ m_config.frequencies ()->filter (m_config.region (), mode, true); // filter on current time
auto const& row = m_config.frequencies ()->best_working_frequency (m_freqNominal);
ui->bandComboBox->setCurrentIndex (row);
if (row >= 0) {
@@ -7404,7 +7471,7 @@ void MainWindow::on_actionOpen_log_directory_triggered () void MainWindow::on_bandComboBox_currentIndexChanged (int index)
{
auto const& frequencies = m_config.frequencies ();
- auto const& source_index = frequencies->mapToSource (frequencies->index (index, FrequencyList_v2::frequency_column));
+ auto const& source_index = frequencies->mapToSource (frequencies->index (index, FrequencyList_v2_101::frequency_column));
Frequency frequency {m_freqNominal};
if (source_index.isValid ())
{
@@ -7432,7 +7499,7 @@ void MainWindow::on_bandComboBox_editTextChanged (QString const& text) void MainWindow::on_bandComboBox_activated (int index)
{
auto const& frequencies = m_config.frequencies ();
- auto const& source_index = frequencies->mapToSource (frequencies->index (index, FrequencyList_v2::frequency_column));
+ auto const& source_index = frequencies->mapToSource (frequencies->index (index, FrequencyList_v2_101::frequency_column));
Frequency frequency {m_freqNominal};
if (source_index.isValid ())
{
@@ -7445,6 +7512,10 @@ void MainWindow::on_bandComboBox_activated (int index) void MainWindow::band_changed (Frequency f)
{
+ // Don't allow a7 decodes during the first period because they can be leftovers from the previous band
+ no_a7_decodes = true;
+ QTimer::singleShot ((int(1500.0*m_TRperiod)), [=] {no_a7_decodes = false;});
+
// Set the attenuation value if options are checked
if (m_config.pwrBandTxMemory() && !m_tune) {
auto const&curBand = ui->bandComboBox->currentText();
@@ -7981,7 +8052,7 @@ void MainWindow::on_outAttenuation_valueChanged (int a) tt_str = tr ("Transmit digital gain ");
}
tt_str += (a ? QString::number (-dBAttn, 'f', 1) : "0") + "dB";
- if (!m_block_pwr_tooltip) {
+ if (ui->outAttenuation->hasFocus() && !m_block_pwr_tooltip) {
QToolTip::showText (QCursor::pos (), tt_str, ui->outAttenuation);
}
QString curBand = ui->bandComboBox->currentText();
@@ -8465,7 +8536,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout t = " " + tr ("Receiving") + " " + m_mode + " ----------------------- " +
m_config.bands ()->find (m_dialFreqRxWSPR);
t=beacon_start_time (-m_TRperiod / 2) + ' ' + t.rightJustified (66, '-');
- ui->decodedTextBrowser->appendText(t);
+ ui->decodedTextBrowser->insertText(t);
}
killFileTimer.start (45*1000); //Kill in 45s (for slow modes)
}
@@ -8539,12 +8610,12 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout QString band;
Frequency f=1000000.0*rxFields.at(3).toDouble()+0.5;
band = ' ' + m_config.bands ()->find (f);
- ui->decodedTextBrowser->appendText(band.rightJustified (71, '-'));
+ ui->decodedTextBrowser->insertText(band.rightJustified (71, '-'));
}
m_tBlankLine = rxLine.left(4);
}
m_nWSPRdecodes += 1;
- ui->decodedTextBrowser->appendText(rxLine);
+ ui->decodedTextBrowser->insertText(rxLine);
}
}
}
@@ -9127,7 +9198,9 @@ void MainWindow::on_pbFoxReset_clicked() QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
f.remove();
ui->decodedTextBrowser->setText("");
- ui->textBrowser4->setText("");
+ ui->houndQueueTextBrowser->setText("");
+ ui->foxTxListTextBrowser->setText("");
+
m_houndQueue.clear();
m_foxQSO.clear();
m_foxQSOinProgress.clear();
@@ -9247,19 +9320,18 @@ QString MainWindow::sortHoundCalls(QString t, int isort, int max_dB) }
//------------------------------------------------------------------------------
-void MainWindow::selectHound(QString line)
+void MainWindow::selectHound(QString line, bool bTopQueue)
{
/* Called from doubleClickOnCall() in DXpedition Fox mode.
* QString "line" is a user-selected line from left text window.
* The line may be selected by double-clicking; alternatively, hitting
* <Enter> is equivalent to double-clicking on the top-most line.
*/
-
if(line.length()==0) return;
QString houndCall=line.split(" ",SkipEmptyParts).at(0);
// Don't add a call already enqueued or in QSO
- if(ui->textBrowser4->toPlainText().indexOf(houndCall) >= 0) return;
+ if(ui->houndQueueTextBrowser->toPlainText().indexOf(houndCall) >= 0) return;
QString houndGrid=line.split(" ",SkipEmptyParts).at(1); // Hound caller's grid
QString rpt=line.split(" ",SkipEmptyParts).at(2); // Hound SNR
@@ -9269,16 +9341,25 @@ void MainWindow::selectHound(QString line) ui->decodedTextBrowser->setText(m_houndCallers); // Populate left window with Hound callers
QString t1=houndCall + " ";
QString t2=rpt;
+ QString t1_with_grid;
if(rpt.mid(0,1) != "-" and rpt.mid(0,1) != "+") t2="+" + rpt;
if(t2.length()==2) t2=t2.mid(0,1) + "0" + t2.mid(1,1);
t1=t1.mid(0,12) + t2;
- ui->textBrowser4->displayFoxToBeCalled(t1); // Add hound call and rpt to tb4
- t1=t1 + " " + houndGrid; // Append the grid
- m_houndQueue.enqueue(t1); // Put this hound into the queue
- writeFoxQSO(" Sel: " + t1);
- QTextCursor cursor = ui->textBrowser4->textCursor();
+ ui->houndQueueTextBrowser->displayHoundToBeCalled(t1, bTopQueue); // Add hound call and rpt to tb4
+ t1_with_grid=t1 + " " + houndGrid; // Append the grid
+
+ if (bTopQueue)
+ {
+ m_houndQueue.prepend(t1_with_grid); // Put this hound into the queue at the top
+ }
+ else
+ {
+ m_houndQueue.enqueue(t1_with_grid); // Put this hound into the queue
+ }
+ writeFoxQSO(" Sel: " + t1_with_grid);
+ QTextCursor cursor = ui->houndQueueTextBrowser->textCursor();
cursor.setPosition(0); // Scroll to top of list
- ui->textBrowser4->setTextCursor(cursor);
+ ui->houndQueueTextBrowser->setTextCursor(cursor);
}
//------------------------------------------------------------------------------
@@ -9307,7 +9388,7 @@ void MainWindow::houndCallers() houndCall=line.mid(0,i0);
paddedHoundCall=houndCall + " ";
//Don't list a hound already in the queue
- if(!ui->textBrowser4->toPlainText().contains(paddedHoundCall)) {
+ if(!ui->houndQueueTextBrowser->toPlainText().contains(paddedHoundCall)) {
if(m_loggedByFox[houndCall].contains(m_lastBand)) continue; //already logged on this band
if(m_foxQSO.contains(houndCall)) continue; //still in the QSO map
auto const& entity = m_logBook.countries ()->lookup (houndCall);
@@ -9364,6 +9445,19 @@ void MainWindow::foxRxSequencer(QString msg, QString houndCall, QString rptRcvd) }
}
}
+void MainWindow::updateFoxQSOsInProgressDisplay()
+{
+
+ ui->foxTxListTextBrowser->clear();
+ for (int i = 0; i < m_foxQSOinProgress.count(); i++)
+ {
+ //First do those for QSOs in progress
+ QString hc = m_foxQSOinProgress.at(i);
+ QString status = m_foxQSO[hc].ncall > m_maxStrikes ? QString(" (rx) ") : QString(" ");
+ QString str = (hc + " ").left(13) + QString::number(m_foxQSO[hc].ncall) + status;
+ ui->foxTxListTextBrowser->displayHoundToBeCalled(str);
+ }
+}
void MainWindow::foxTxSequencer()
{
@@ -9499,6 +9593,10 @@ list2Done: on_logQSOButton_clicked ();
m_foxRateQueue.enqueue (now); //Add present time in seconds
//to Rate queue.
+ QTimer::singleShot (13000, [=] {
+ m_foxQSOinProgress.removeOne(hc1); //Remove from In Progress window
+ updateFoxQSOsInProgressDisplay(); //Update InProgress display after Tx is complete
+ });
}
m_loggedByFox[hc1] += (m_lastBand + " ");
}
@@ -9560,13 +9658,14 @@ Transmit: m_foxLogWindow->rate (m_foxRateQueue.size ());
m_foxLogWindow->queued (m_foxQSOinProgress.count ());
}
+ updateFoxQSOsInProgressDisplay();
}
void MainWindow::rm_tb4(QString houndCall)
{
if(houndCall=="") return;
QString t="";
- QString tb4=ui->textBrowser4->toPlainText();
+ QString tb4=ui->houndQueueTextBrowser->toPlainText();
QStringList list=tb4.split("\n");
int n=list.size();
int j=0;
@@ -9579,24 +9678,78 @@ void MainWindow::rm_tb4(QString houndCall) }
}
t.replace("\n\n","\n");
- ui->textBrowser4->setText(t);
+ ui->houndQueueTextBrowser->setText(t);
}
void MainWindow::doubleClickOnFoxQueue(Qt::KeyboardModifiers modifiers)
{
if(modifiers==9999) return; //Silence compiler warning
- QTextCursor cursor=ui->textBrowser4->textCursor();
+ QTextCursor cursor=ui->houndQueueTextBrowser->textCursor();
cursor.setPosition(cursor.selectionStart());
- QString houndCall=cursor.block().text().mid(0,12).trimmed();
- rm_tb4(houndCall);
- writeFoxQSO(" Del: " + houndCall);
- QQueue<QString> tmpQueue;
- while(!m_houndQueue.isEmpty()) {
- QString t=m_houndQueue.dequeue();
- QString hc=t.mid(0,12).trimmed();
- if(hc != houndCall) tmpQueue.enqueue(t);
- }
- m_houndQueue.swap(tmpQueue);
+ QString houndLine=cursor.block().text();
+ QString houndCall=houndLine.mid(0,12).trimmed();
+
+ if (modifiers == (Qt::AltModifier))
+ {
+ //Alt-click on a Fox queue entry - put on top of queue
+ // remove
+ for(auto i=0; i<m_houndQueue.size(); i++) {
+ QString t = m_houndQueue[i];
+ QString hc = t.mid(0, 12).trimmed();
+ if (hc == houndCall) {
+ m_houndQueue.removeAt(i);
+ break;
+ }
+ }
+ m_houndQueue.prepend(houndLine);
+ ui->houndQueueTextBrowser->clear();
+ for (QString line: m_houndQueue)
+ {
+ ui->houndQueueTextBrowser->displayHoundToBeCalled(line.mid(0,16), false);
+ }
+ } else
+ {
+ rm_tb4(houndCall);
+ writeFoxQSO(" Del: " + houndCall);
+ QQueue <QString> tmpQueue;
+ while (!m_houndQueue.isEmpty())
+ {
+ QString t = m_houndQueue.dequeue();
+ QString hc = t.mid(0, 12).trimmed();
+ if (hc != houndCall) tmpQueue.enqueue(t);
+ }
+ m_houndQueue.swap(tmpQueue);
+ }
+}
+
+void MainWindow::doubleClickOnFoxInProgress(Qt::KeyboardModifiers modifiers)
+{
+ if (modifiers == 9999) return; //Silence compiler warning
+ QTextCursor cursor = ui->foxTxListTextBrowser->textCursor();
+ cursor.setPosition(cursor.selectionStart());
+ QString houndLine = cursor.block().text();
+ QString houndCall = houndLine.mid(0, 12).trimmed();
+
+ if (modifiers == 0)
+ {
+ m_foxQSO[houndCall].ncall = m_maxStrikes + 1; // time them out
+ updateFoxQSOsInProgressDisplay();
+ }
+}
+
+void MainWindow::foxQueueTopCallCommand()
+{
+ m_decodedText2 = true;
+ if(SpecOp::FOX==m_specOp && m_decodedText2 && m_houndQueue.count() < 10)
+ {
+
+ QTextCursor cursor = ui->decodedTextBrowser->textCursor();
+ cursor.setPosition(cursor.selectionStart());
+ QString houndCallLine = cursor.block().text();
+
+ writeFoxQSO(" QTop: " + houndCallLine);
+ selectHound(houndCallLine, true); // alt double-click gets put at top of queue
+ }
}
void MainWindow::foxGenWaveform(int i,QString fm)
@@ -9650,14 +9803,29 @@ void MainWindow::writeFoxQSO(QString const& msg) /*################################################################################### */
void MainWindow::foxTest()
{
- QFile f("steps.txt");
- if(!f.open(QIODevice::ReadOnly | QIODevice::Text)) return;
+ QString curdir = QDir::currentPath();
+ bool b_hounds_written = false;
- QFile fdiag("diag.txt");
+ QFile fdiag(m_config.writeable_data_dir ().absoluteFilePath("diag.txt"));
if(!fdiag.open(QIODevice::WriteOnly | QIODevice::Text)) return;
+ QFile f(m_config.writeable_data_dir ().absoluteFilePath("steps.txt"));
+ if(!f.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ fdiag.write("Cannot open steps.txt");
+ return;
+ }
+
QTextStream s(&f);
QTextStream sdiag(&fdiag);
+
+ QFile fhounds(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
+ if(!fhounds.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text))
+ {
+ sdiag << "can't write to houndcallers.txt";
+ return;
+ }
+ QTextStream houndstream(&fhounds);
+
QString line;
QString t;
QString msg;
@@ -9675,7 +9843,19 @@ void MainWindow::foxTest() }
if(line.contains("Sel:")) {
t=line.mid(43,6) + " " + line.mid(54,4) + " " + line.mid(50,3);
- selectHound(t);
+ selectHound(t, false);
+ }
+ auto line_trimmed = line.trimmed();
+ if(line_trimmed.startsWith("Hound:")) {
+ t=line_trimmed.mid(6,-1).trimmed();
+ b_hounds_written = true;
+ houndstream << t
+#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
+ << Qt::endl
+#else
+ << endl
+#endif
+ ;
}
if(line.contains("Del:")) {
@@ -9715,6 +9895,11 @@ void MainWindow::foxTest() sdiag << t << line.mid(37).trimmed() << "\n";
}
}
+ if (b_hounds_written)
+ {
+ fhounds.close();
+ houndCallers();
+ }
}
void MainWindow::write_all(QString txRx, QString message)
@@ -9724,45 +9909,55 @@ void MainWindow::write_all(QString txRx, QString message) QString t;
QString msg;
QString mode_string;
+ QString file_name="ALL.TXT";
- if (message.size () > 5 && message[4]==' ') {
- msg=message.mid(4,-1);
- } else {
- msg=message.mid(6,-1);
- }
+ if(m_mode!="Echo") {
+ if (message.size () > 5 && message[4]==' ') {
+ msg=message.mid(4,-1);
+ } else {
+ msg=message.mid(6,-1);
+ }
- if (message.size () > 19 && message[19]=='#') {
- mode_string="JT65 ";
- } else if (message.size () > 19 && message[19]=='@') {
- mode_string="JT9 ";
- } else if(m_mode=="Q65") {
- mode_string=mode_label.text();
- } else {
- mode_string=m_mode.leftJustified(6,' ');
- }
+ if (message.size () > 19 && message[19]=='#') {
+ mode_string="JT65 ";
+ } else if (message.size () > 19 && message[19]=='@') {
+ mode_string="JT9 ";
+ } else if(m_mode=="Q65") {
+ mode_string=mode_label.text();
+ } else {
+ mode_string=m_mode.leftJustified(6,' ');
+ }
- msg=msg.mid(0,15) + msg.mid(18,-1);
+ msg=msg.mid(0,15) + msg.mid(18,-1);
- t = t.asprintf("%5d",ui->TxFreqSpinBox->value());
- if (txRx=="Tx") msg=" 0 0.0" + t + " " + message;
- auto time = QDateTime::currentDateTimeUtc ();
- if( txRx=="Rx" && !m_bFastMode ) time=m_dateTimeSeqStart;
+ t = t.asprintf("%5d",ui->TxFreqSpinBox->value());
+ if (txRx=="Tx") msg=" 0 0.0" + t + " " + message;
+ auto time = QDateTime::currentDateTimeUtc ();
+ if( txRx=="Rx" && !m_bFastMode ) time=m_dateTimeSeqStart;
- 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;
+ if (txRx=="Rx") {
+ t = t.asprintf("%10.3f ",m_freqNominalPeriod/1.e6); // prevent writing of wrong frequencies
} else {
- line=m_fileDateTime + t + txRx + " " + mode_string + msg;
- }
+ t = t.asprintf("%10.3f ",m_freqNominal/1.e6);
+ }
+ if (m_diskData) {
+ if (m_fileDateTime.size()==11) {
+ line=m_fileDateTime + " " + t + txRx + " " + mode_string + msg;
+ } else {
+ line=m_fileDateTime + t + txRx + " " + mode_string + msg;
+ }
+ } else {
+ line=time.toString("yyMMdd_hhmmss") + t + txRx + " " + mode_string + msg;
+ }
+
+ 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";
} else {
- line=time.toString("yyMMdd_hhmmss") + t + txRx + " " + mode_string + msg;
+ file_name="all_echo.txt";
+ line=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)) {
QTextStream out(&f);
@@ -9956,6 +10151,8 @@ void MainWindow::on_houndButton_clicked (bool checked) } else {
ui->houndButton->setStyleSheet("");
m_config.setSpecial_None();
+ keep_frequency = true;
+ QTimer::singleShot (250, [=] {keep_frequency = false;});
}
m_specOp=m_config.special_op_id();
on_actionFT8_triggered();
@@ -10015,26 +10212,3 @@ void MainWindow::on_jt65Button_clicked() }
on_actionJT65_triggered();
}
-
-void MainWindow::on_actionCopy_to_WSJTX_txt_triggered()
-{
- static QFile f {QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("WSJT-X.txt")};
- if(!f.open(QIODevice::Text | QIODevice::WriteOnly)) {
- MessageBox::warning_message (this, tr ("WSJT-X.txt file error"),
- tr ("Cannot open \"%1\" for writing").arg (f.fileName ()),
- tr ("Error: %1").arg (f.errorString ()));
- } else {
- QString t=ui->decodedTextBrowser->toPlainText();
-
- QTextStream out(&f);
- out << t <<
-#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
- endl
-#else
- Qt::endl
-#endif
- ;
- f.close();
- }
-}
-
diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 62c4008e..b8b9b020 100755 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -127,6 +127,7 @@ public slots: void doubleClickOnCall (Qt::KeyboardModifiers);
void doubleClickOnCall2(Qt::KeyboardModifiers);
void doubleClickOnFoxQueue(Qt::KeyboardModifiers);
+ void doubleClickOnFoxInProgress(Qt::KeyboardModifiers modifiers);
void readFromStdout();
void p1ReadFromStdout();
void setXIT(int n, Frequency base = 0u);
@@ -173,7 +174,6 @@ private slots: void on_actionOpen_next_in_directory_triggered();
void on_actionDecode_remaining_files_in_directory_triggered();
void on_actionDelete_all_wav_files_in_SaveDir_triggered();
- void on_actionCopy_to_WSJTX_txt_triggered();
void on_actionOpen_log_directory_triggered ();
void on_actionNone_triggered();
void on_actionSave_all_triggered();
@@ -477,7 +477,7 @@ private: qint32 m_k0;
qint32 m_kdone;
qint32 m_nPick;
- FrequencyList_v2::const_iterator m_frequency_list_fcal_iter;
+ FrequencyList_v2_101::const_iterator m_frequency_list_fcal_iter;
qint32 m_nTx73;
qint32 m_UTCdisk;
qint32 m_wait;
@@ -824,6 +824,7 @@ private: void subProcessError (QProcess *, QProcess::ProcessError);
void statusUpdate () const;
void update_watchdog_label ();
+ void invalidate_frequencies_filter ();
void on_the_minute ();
void add_child_to_event_filter (QObject *);
void remove_child_from_event_filter (QObject *);
@@ -833,8 +834,10 @@ private: void displayWidgets(qint64 n);
QChar current_submode () const; // returns QChar {0} if submode is not appropriate
void write_transmit_entry (QString const& file_name);
- void selectHound(QString t);
+ void selectHound(QString t, bool bTopQueue);
void houndCallers();
+ void updateFoxQSOsInProgressDisplay();
+ void foxQueueTopCallCommand();
void foxRxSequencer(QString msg, QString houndCall, QString rptRcvd);
void foxTxSequencer();
void foxGenWaveform(int i,QString fm);
diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index b7760141..9c00e53f 100755 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -6,8 +6,8 @@ <rect>
<x>0</x>
<y>0</y>
- <width>893</width>
- <height>665</height>
+ <width>991</width>
+ <height>690</height>
</rect>
</property>
<property name="windowTitle">
@@ -36,7 +36,6 @@ <property name="font">
<font>
<pointsize>10</pointsize>
- <weight>50</weight>
<bold>false</bold>
</font>
</property>
@@ -180,7 +179,6 @@ <property name="font">
<font>
<pointsize>10</pointsize>
- <weight>50</weight>
<bold>false</bold>
</font>
</property>
@@ -326,7 +324,7 @@ <number>0</number>
</property>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,2,2,2,2,2,2,2,2,2,1">
+ <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,2,2,2,2,2,0,2,2,2,2,1">
<item>
<widget class="QCheckBox" name="cbCQonly">
<property name="text">
@@ -436,6 +434,22 @@ </widget>
</item>
<item>
+ <widget class="HintedSpinBox" name="sbEchoAvg">
+ <property name="prefix">
+ <string>Avg </string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QPushButton" name="DecodeButton">
<property name="minimumSize">
<size>
@@ -560,54 +574,418 @@ </layout>
</item>
<item>
- <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="2" column="2" colspan="2">
- <widget class="QLabel" name="labUTC">
+ <layout class="QGridLayout" name="gridLayout_5" rowstretch="1,0,0" columnstretch="0,0,0,0,1,1,5,0">
+ <item row="1" column="4" 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>
- <property name="styleSheet">
- <string notr="true">QLabel {
- font-family: MS Shell Dlg 2;
- font-size: 16pt;
- background-color : black;
- color : yellow;
-}</string>
+ <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>&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="7" rowspan="2">
+ <widget class="QSlider" name="outAttenuation">
+ <property name="toolTip">
+ <string>Adjust Tx audio level</string>
</property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
+ <property name="maximum">
+ <number>450</number>
</property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
+ <property name="value">
+ <number>0</number>
</property>
- <property name="lineWidth">
- <number>2</number>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="midLineWidth">
- <number>0</number>
+ <property name="invertedAppearance">
+ <bool>true</bool>
</property>
- <property name="text">
- <string><html><head/><body><p align="center"> 2015 Jun 17 </p><p align="center"> 01:23:45 </p></body></html></string>
+ <property name="invertedControls">
+ <bool>true</bool>
</property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
+ <property name="tickPosition">
+ <enum>QSlider::TicksBelow</enum>
</property>
- <property name="margin">
- <number>5</number>
+ <property name="tickInterval">
+ <number>50</number>
</property>
</widget>
</item>
- <item row="0" column="4" rowspan="3">
+ <item row="0" column="7">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string> Pwr</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" rowspan="2">
+ <layout class="QVBoxLayout" name="verticalLayout_11">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QSpinBox" name="sbNB">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="suffix">
+ <string> %</string>
+ </property>
+ <property name="prefix">
+ <string>NB </string>
+ </property>
+ <property name="minimum">
+ <number>-2</number>
+ </property>
+ <property name="maximum">
+ <number>25</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="SignalMeter" name="signal_meter_widget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string><html><head/><body><p>30dB recommended when only noise present<br/>Green when good<br/>Red when clipping may occur<br/>Yellow when too low</p></body></html></string>
+ </property>
+ <property name="accessibleName">
+ <string>Rx Signal</string>
+ </property>
+ <property name="accessibleDescription">
+ <string>30dB recommended when only noise present
+Green when good
+Red when clipping may occur
+Yellow when too low</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="6" rowspan="3">
<widget class="QStackedWidget" name="controls_stack_widget">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -640,7 +1018,7 @@ <verstretch>0</verstretch>
</sizepolicy>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,1">
+ <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="1,2">
<property name="leftMargin">
<number>0</number>
</property>
@@ -834,7 +1212,7 @@ When not checked you can view the calibration results.</string> <item>
<widget class="QComboBox" name="respondComboBox">
<property name="toolTip">
- <string><html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to the first decoded reply to your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Pts</span> to respond automatically to the reply yielding most points in the ARRL International Digital Contest.</p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html></string>
+ <string><html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to the first decoded reply to your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Dist</span> to respond automatically to the reply yielding most points in the ARRL International Digital Contest.</p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html></string>
</property>
<property name="currentText">
<string/>
@@ -1076,7 +1454,7 @@ When not checked you can view the calibration results.</string> <item>
<widget class="QStackedWidget" name="opt_controls_stack">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="page_0">
<layout class="QVBoxLayout" name="verticalLayout">
@@ -1596,9 +1974,6 @@ list. The list can be maintained in Settings (F2).</string> <property name="insertPolicy">
<enum>QComboBox::InsertAtBottom</enum>
</property>
- <property name="sizeAdjustPolicy">
- <enum>QComboBox::AdjustToMinimumContentsLength</enum>
- </property>
</widget>
</item>
<item row="5" column="1">
@@ -1630,10 +2005,31 @@ Double-click to reset to the standard 73 message</string> <string>2</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_11" columnstretch="1,0">
- <item row="0" column="1" rowspan="2">
- <layout class="QGridLayout" name="gridLayout_10">
- <item row="2" column="0">
- <widget class="QSpinBox" name="sbMax_dB">
+ <property name="leftMargin">
+ <number>4</number>
+ </property>
+ <property name="topMargin">
+ <number>4</number>
+ </property>
+ <property name="rightMargin">
+ <number>4</number>
+ </property>
+ <property name="bottomMargin">
+ <number>4</number>
+ </property>
+ <property name="horizontalSpacing">
+ <number>4</number>
+ </property>
+ <item row="0" column="0" rowspan="2">
+ <layout class="QGridLayout" name="gridLayout" columnstretch="2,2,1">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="horizontalSpacing">
+ <number>6</number>
+ </property>
+ <item row="1" column="2">
+ <widget class="QComboBox" name="comboBoxHoundSort">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -1646,21 +2042,62 @@ Double-click to reset to the standard 73 message</string> <height>16777215</height>
</size>
</property>
- <property name="prefix">
- <string>Max dB </string>
+ <property name="currentText">
+ <string>Random</string>
</property>
- <property name="minimum">
- <number>-15</number>
+ <property name="maxVisibleItems">
+ <number>5</number>
</property>
- <property name="maximum">
- <number>70</number>
+ <item>
+ <property name="text">
+ <string>Random</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Call</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Grid</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>S/N (dB)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Distance</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_queue">
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
</property>
- <property name="value">
- <number>30</number>
+ <property name="text">
+ <string>Queue</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="6" column="2">
+ <widget class="QCheckBox" name="cbMoreCQs">
+ <property name="text">
+ <string>More CQs</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
<widget class="QComboBox" name="comboBoxCQ">
<property name="currentText">
<string>CQ</string>
@@ -1757,14 +2194,7 @@ Double-click to reset to the standard 73 message</string> </item>
</widget>
</item>
- <item row="6" column="0">
- <widget class="QPushButton" name="pbFoxReset">
- <property name="text">
- <string>Reset</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
+ <item row="2" column="2">
<widget class="QSpinBox" name="sbNlist">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -1792,8 +2222,8 @@ Double-click to reset to the standard 73 message</string> </property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QSpinBox" name="sbNslots">
+ <item row="3" column="2">
+ <widget class="QSpinBox" name="sbMax_dB">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -1806,28 +2236,22 @@ Double-click to reset to the standard 73 message</string> <height>16777215</height>
</size>
</property>
- <property name="suffix">
- <string/>
- </property>
<property name="prefix">
- <string>N Slots </string>
+ <string>Max dB </string>
</property>
<property name="minimum">
- <number>1</number>
+ <number>-15</number>
</property>
<property name="maximum">
- <number>5</number>
+ <number>70</number>
</property>
<property name="value">
- <number>1</number>
- </property>
- <property name="displayIntegerBase">
- <number>10</number>
+ <number>30</number>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QComboBox" name="comboBoxHoundSort">
+ <item row="4" column="2">
+ <widget class="QSpinBox" name="sbNslots">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -1840,40 +2264,44 @@ Double-click to reset to the standard 73 message</string> <height>16777215</height>
</size>
</property>
- <property name="currentText">
- <string>Random</string>
+ <property name="suffix">
+ <string/>
</property>
- <property name="maxVisibleItems">
+ <property name="prefix">
+ <string>N Slots </string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
<number>5</number>
</property>
- <item>
- <property name="text">
- <string>Random</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Call</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Grid</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>S/N (dB)</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Distance</string>
- </property>
- </item>
+ <property name="value">
+ <number>1</number>
+ </property>
+ <property name="displayIntegerBase">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="2">
+ <widget class="QPushButton" name="pbFoxReset">
+ <property name="text">
+ <string>Reset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_inProcess">
+ <property name="text">
+ <string>In Progress</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="8" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -1886,34 +2314,49 @@ Double-click to reset to the standard 73 message</string> </property>
</spacer>
</item>
- <item row="5" column="0">
- <widget class="QCheckBox" name="cbMoreCQs">
- <property name="text">
- <string>More CQs</string>
+ <item row="1" column="1" rowspan="8">
+ <widget class="DisplayText" name="foxTxListTextBrowser">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" rowspan="8">
+ <widget class="DisplayText" name="houndQueueTextBrowser">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
</property>
</widget>
</item>
</layout>
</item>
- <item row="0" column="0">
- <widget class="DisplayText" name="textBrowser4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="sizeAdjustPolicy">
- <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
- </property>
- </widget>
- </item>
</layout>
</widget>
</widget>
@@ -2392,445 +2835,7 @@ 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><html><head/><body><p>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</p></body></html></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>
- <property name="suffix">
- <string> %</string>
- </property>
- <property name="prefix">
- <string>NB </string>
- </property>
- <property name="minimum">
- <number>-2</number>
- </property>
- <property name="maximum">
- <number>25</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="SignalMeter" name="signal_meter_widget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string><html><head/><body><p>30dB recommended when only noise present<br/>Green when good<br/>Red when clipping may occur<br/>Yellow when too low</p></body></html></string>
- </property>
- <property name="accessibleName">
- <string>Rx Signal</string>
- </property>
- <property name="accessibleDescription">
- <string>30dB recommended when only noise present
-Green when good
-Red when clipping may occur
-Yellow when too low</string>
- </property>
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <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>&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>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="0" column="1" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
- <widget class="QPushButton" name="readFreq">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string><html><head/><body><p>If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.</p></body></html></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="error"] {
- background-color: red;
-}
-QPushButton[state="warning"] {
- background-color: orange;
-}
-QPushButton[state="ok"] {
- background-color: #00ff00;
-}</string>
- </property>
- <property name="text">
- <string>?</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2" colspan="2">
+ <item row="0" column="4" colspan="2">
<widget class="QLabel" name="labDialFreq">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
@@ -2863,7 +2868,7 @@ QLabel[oob="true"] { </property>
</widget>
</item>
- <item row="1" column="1" rowspan="2">
+ <item row="1" column="3" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<widget class="QPushButton" name="houndButton">
@@ -3002,6 +3007,131 @@ QLabel[oob="true"] { </item>
</layout>
</item>
+ <item row="2" column="4" colspan="2">
+ <widget class="QLabel" name="labUTC">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">QLabel {
+ font-family: MS Shell Dlg 2;
+ font-size: 16pt;
+ background-color : black;
+ color : yellow;
+}</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string><html><head/><body><p align="center"> 2015 Jun 17 </p><p align="center"> 01:23:45 </p></body></html></string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="margin">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_16" stretch="1,0">
+ <item>
+ <widget class="BandComboBox" name="bandComboBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string><html><head/><body><p>Select operating band or enter frequency in MHz or enter kHz increment followed by k.</p></body></html></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>
+ <widget class="QPushButton" name="readFreq">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string><html><head/><body><p>If orange or red there has been a rig control failure, click to reset and read the dial frequency. S implies split mode.</p></body></html></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="error"] {
+ background-color: red;
+}
+QPushButton[state="warning"] {
+ background-color: orange;
+}
+QPushButton[state="ok"] {
+ background-color: #00ff00;
+}</string>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>
@@ -3014,8 +3144,8 @@ QLabel[oob="true"] { <rect>
<x>0</x>
<y>0</y>
- <width>893</width>
- <height>21</height>
+ <width>991</width>
+ <height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -3026,8 +3156,6 @@ QLabel[oob="true"] { <addaction name="actionOpen_next_in_directory"/>
<addaction name="actionDecode_remaining_files_in_directory"/>
<addaction name="separator"/>
- <addaction name="actionCopy_to_WSJTX_txt"/>
- <addaction name="separator"/>
<addaction name="actionDelete_all_wav_files_in_SaveDir"/>
<addaction name="actionErase_ALL_TXT"/>
<addaction name="actionErase_wsjtx_log_adi"/>
@@ -3038,6 +3166,7 @@ QLabel[oob="true"] { <addaction name="separator"/>
<addaction name="actionSettings"/>
<addaction name="separator"/>
+ <addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuView">
@@ -3670,11 +3799,6 @@ QLabel[oob="true"] { <string>Active Stations</string>
</property>
</action>
- <action name="actionCopy_to_WSJTX_txt">
- <property name="text">
- <string>Copy main text window to WSJT-X.txt</string>
- </property>
- </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
@@ -3734,7 +3858,6 @@ QLabel[oob="true"] { <tabstop>stopTxButton</tabstop>
<tabstop>tuneButton</tabstop>
<tabstop>cbMenus</tabstop>
- <tabstop>bandComboBox</tabstop>
<tabstop>sbNB</tabstop>
<tabstop>dxCallEntry</tabstop>
<tabstop>dxGridEntry</tabstop>
@@ -3781,14 +3904,6 @@ QLabel[oob="true"] { <tabstop>tx6</tabstop>
<tabstop>txrb6</tabstop>
<tabstop>txb6</tabstop>
- <tabstop>textBrowser4</tabstop>
- <tabstop>comboBoxHoundSort</tabstop>
- <tabstop>sbNlist</tabstop>
- <tabstop>sbMax_dB</tabstop>
- <tabstop>sbNslots</tabstop>
- <tabstop>comboBoxCQ</tabstop>
- <tabstop>cbMoreCQs</tabstop>
- <tabstop>pbFoxReset</tabstop>
<tabstop>WSPRfreqSpinBox</tabstop>
<tabstop>sbFST4W_RxFreq</tabstop>
<tabstop>sbFST4W_FTol</tabstop>
diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index fcfd5412..e08ecaed 100755 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -100,7 +100,6 @@ void CPlotter::resizeEvent(QResizeEvent* ) //resizeEvent() if(m_bReference) m_h2=m_h-30;
if(m_h2<1) m_h2=1;
m_h1=m_h-m_h2;
-// m_line=0;
m_2DPixmap = QPixmap(m_Size.width(), m_h2);
m_2DPixmap.fill(Qt::black);
m_WaterfallPixmap = QPixmap(m_Size.width(), m_h1);
@@ -112,6 +111,8 @@ void CPlotter::resizeEvent(QResizeEvent* ) //resizeEvent() m_ScalePixmap.fill(Qt::white);
m_Percent2DScreen0 = m_Percent2DScreen;
m_bResized = true;
+ m_vpixperdiv = float(m_h2)/float(VERT_DIVS);
+ m_x=0;
}
DrawOverlay();
}
@@ -167,6 +168,8 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) static QPoint LineBuf[MAX_SCREENSIZE];
static QPoint LineBuf2[MAX_SCREENSIZE];
static QPoint LineBuf3[MAX_SCREENSIZE];
+ static QPoint LineBuf4[MAX_SCREENSIZE];
+
j=0;
j0=int(m_startFreq/m_fftBinWidth + 0.5);
int iz=XfromFreq(5000.0);
@@ -231,7 +234,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) }
- if(i==iz-1 and !m_bQ65_Sync) {
+ if(i==iz-1 and !m_bQ65_Sync and !m_bTotalPower) {
painter2D.drawPolyline(LineBuf,j);
}
LineBuf[j].setX(i);
@@ -320,6 +323,22 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) painter2D.drawText(m_w-100,m_h2/2,t);
}
}
+
+ if(m_bTotalPower and m_pdB>1.0) {
+ painter2D.setPen(Qt::green);
+ if(m_x==m_w-1) {
+ for (int i=0; i<m_w-1; i++) {
+ LineBuf4[i].setY(LineBuf4[i+1].y());
+ }
+ }
+ int yy=m_h2 - 0.1*m_vpixperdiv*(m_pdB-20.0);
+ LineBuf4[m_x].setX(m_x);
+ LineBuf4[m_x].setY(yy);
+ if(LineBuf4[m_w-1].y()==0) LineBuf4[m_w-1].setY(yy);
+ painter2D.drawPolyline(LineBuf4,m_x);
+ if(m_x < m_w-1) m_x++;
+ }
+
update(); //trigger a new paintEvent
m_bScaleOK=true;
}
@@ -333,6 +352,7 @@ void CPlotter::drawRed(int ia, int ib, float swide[]) void CPlotter::replot()
{
+ resizeEvent(NULL);
float swide[m_w];
m_bReplot=true;
for(int irow=0; irow<m_h1; irow++) {
@@ -369,7 +389,6 @@ void CPlotter::DrawOverlay() //DrawOverlay() painter.setBrush(Qt::SolidPattern);
m_fSpan = w*df;
-// int n=m_fSpan/10;
m_freqPerDiv=10;
if(m_fSpan>100) m_freqPerDiv=20;
if(m_fSpan>250) m_freqPerDiv=50;
@@ -377,25 +396,48 @@ void CPlotter::DrawOverlay() //DrawOverlay() if(m_fSpan>1000) m_freqPerDiv=200;
if(m_fSpan>2500) m_freqPerDiv=500;
- pixperdiv = m_freqPerDiv/df;
- m_hdivs = w*df/m_freqPerDiv + 1.9999;
-
- float xx0=float(m_startFreq)/float(m_freqPerDiv);
- xx0=xx0-int(xx0);
- int x0=xx0*pixperdiv+0.5;
- for( int i=1; i<m_hdivs; i++) { //draw vertical grids
- x = (int)((float)i*pixperdiv ) - x0;
- if(x >= 0 and x<=m_w) {
- painter.setPen(QPen(Qt::white, 1,Qt::DotLine));
- painter.drawLine(x, 0, x , m_h2);
+ if(!m_bTotalPower) {
+ pixperdiv = m_freqPerDiv/df;
+ m_hdivs = w*df/m_freqPerDiv + 1.9999;
+ float xx0=float(m_startFreq)/float(m_freqPerDiv);
+ xx0=xx0-int(xx0);
+ int x0=xx0*pixperdiv+0.5;
+ for( int i=1; i<m_hdivs; i++) { //draw vertical grids
+ x = (int)((float)i*pixperdiv ) - x0;
+ if(x >= 0 and x<=m_w) {
+ painter.setPen(QPen(Qt::white, 1,Qt::DotLine));
+ painter.drawLine(x, 0, x , m_h2);
+ }
}
}
- pixperdiv = (float)m_h2 / (float)VERT_DIVS;
painter.setPen(QPen(Qt::white, 1,Qt::DotLine));
- for( int i=1; i<VERT_DIVS; i++) { //draw horizontal grids
- y = (int)( (float)i*pixperdiv );
- painter.drawLine(0, y, w, y);
+ if(m_bTotalPower) painter.setPen(QPen(Qt::white, 1,Qt::DashLine));
+ for( int i=1; i<VERT_DIVS; i++) { //draw horizontal grids
+ y = int(i*m_vpixperdiv);
+ if(m_bTotalPower) {
+ painter.drawLine(15, y, w, y);
+ } else {
+ painter.drawLine(0, y, w, y);
+ }
+ }
+
+ if(m_bTotalPower) {
+ painter.setPen(QPen(Qt::white));
+ for( int i=1; i<VERT_DIVS; i++) { //draw horizontal grids
+ y = int(i*m_vpixperdiv);
+ painter.drawText(0,y+5,QString::number(10*(VERT_DIVS-i) + 20));
+ }
+ }
+
+ if(m_bTotalPower and m_h2>100) {
+ painter.setPen(QPen(Qt::white, 1,Qt::DotLine));
+ for( int i=1; i<5*VERT_DIVS; i++) { //draw horizontal 2 dB grids
+ if(i%5 > 0) {
+ y = int(0.2*i*m_vpixperdiv);
+ painter.drawLine(0, y, w, y);
+ }
+ }
}
QRect rect0;
@@ -730,7 +772,15 @@ int CPlotter::rxFreq() {return m_rxFreq;} //rxFreq void CPlotter::mouseMoveEvent (QMouseEvent * event)
{
int x=event->x();
- QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x))));
+ int y=event->y();
+ float pdB=10.0*(m_h-y)/m_vpixperdiv + 20.0;
+ if(y<(m_h-m_h2)) {
+ QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x))));
+ } else {
+ QString t;
+ t=t.asprintf("%4.1f dB",pdB);
+ QToolTip::showText(event->globalPos(),t);
+ }
QWidget::mouseMoveEvent(event);
}
@@ -874,3 +924,13 @@ void CPlotter::setDiskUTC(int nutc) {
m_nUTC=nutc;
}
+
+void CPlotter::drawTotalPower(float pdB)
+{
+ m_pdB=pdB;
+}
+
+void CPlotter::restartTotalPower()
+{
+ m_x=0;
+}
diff --git a/widgets/plotter.h b/widgets/plotter.h index c727eb29..3ef25e5d 100755 --- a/widgets/plotter.h +++ b/widgets/plotter.h @@ -34,6 +34,7 @@ public: QSize sizeHint() const Q_DECL_OVERRIDE;
void draw(float swide[], bool bScroll, bool bRed); //Update the waterfall
+ void drawTotalPower(float pdB);
void replot();
void SetRunningState(bool running);
void setPlotZero(int plotZero);
@@ -81,12 +82,15 @@ public: bool Reference() const {return m_bReference;}
void setQ65_Sync(bool b) {m_bQ65_Sync = b;}
bool Q65_Sync() const {return m_bQ65_Sync;}
+ void setTotalPower(bool b) {m_bTotalPower = b;}
+ bool TotalPower() const {return m_bTotalPower;}
void drawRed(int ia, int ib, float swide[]);
void setVHF(bool bVHF);
void setRedFile(QString fRed);
void setFST4_FreqRange(int fLow,int fHigh);
void setSingleDecode(bool b);
void setDiskUTC(int nutc);
+ void restartTotalPower();
bool scaleOK () const {return m_bScaleOK;}
signals:
@@ -116,12 +120,15 @@ private: bool m_bReference;
bool m_bReference0;
bool m_bQ65_Sync;
+ bool m_bTotalPower;
bool m_bVHF;
bool m_bSingleDecode;
bool m_bFirst=true;
bool m_bResized;
float m_fSpan;
+ float m_pdB=0.0;
+ float m_vpixperdiv;
qint32 m_plotZero;
qint32 m_plotGain;
@@ -137,6 +144,7 @@ private: qint32 m_nfa;
qint32 m_nfb;
qint32 m_nUTC;
+ qint32 m_x=0;
QPixmap m_WaterfallPixmap;
QPixmap m_2DPixmap;
diff --git a/widgets/widegraph.cpp b/widgets/widegraph.cpp index 16ee60ca..3b0d652e 100755 --- a/widgets/widegraph.cpp +++ b/widgets/widegraph.cpp @@ -71,11 +71,13 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) : ui->widePlot->setLinearAvg(m_settings->value("LinearAvg",false).toBool());
ui->widePlot->setReference(m_settings->value("Reference",false).toBool());
ui->widePlot->setQ65_Sync(m_settings->value("Q65_Sync",false).toBool());
+ ui->widePlot->setTotalPower(m_settings->value("TotalPower",false).toBool());
if(ui->widePlot->current()) ui->spec2dComboBox->setCurrentIndex(0);
if(ui->widePlot->cumulative()) ui->spec2dComboBox->setCurrentIndex(1);
if(ui->widePlot->linearAvg()) ui->spec2dComboBox->setCurrentIndex(2);
if(ui->widePlot->Reference()) ui->spec2dComboBox->setCurrentIndex(3);
if(ui->widePlot->Q65_Sync()) ui->spec2dComboBox->setCurrentIndex(4);
+ if(ui->widePlot->TotalPower()) ui->spec2dComboBox->setCurrentIndex(5);
int nbpp=m_settings->value("BinsPerPixel",2).toInt();
ui->widePlot->setBinsPerPixel(nbpp);
ui->sbPercent2dPlot->setValue(m_Percent2DScreen);
@@ -133,6 +135,7 @@ void WideGraph::saveSettings() //saveS m_settings->setValue ("LinearAvg", ui->widePlot->linearAvg());
m_settings->setValue ("Reference", ui->widePlot->Reference());
m_settings->setValue ("Q65_Sync", ui->widePlot->Q65_Sync());
+ m_settings->setValue ("TotalPower", ui->widePlot->TotalPower());
m_settings->setValue ("BinsPerPixel", ui->widePlot->binsPerPixel ());
m_settings->setValue ("StartFreq", ui->widePlot->startFreq ());
m_settings->setValue ("WaterfallPalette", m_waterfallPalette);
@@ -148,11 +151,12 @@ void WideGraph::drawRed(int ia, int ib) ui->widePlot->drawRed(ia,ib,m_swide);
}
-void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dataSink2
+void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata, float pdB) //dataSink2
{
static float splot[NSMAX];
int nbpp = ui->widePlot->binsPerPixel();
+ if(ui->widePlot->TotalPower()) ui->widePlot->drawTotalPower(pdB);
//Average spectra over specified number, m_waterfallAvg
if (m_n==0) {
for (int i=0; i<NSMAX; i++)
@@ -313,6 +317,7 @@ void WideGraph::on_spec2dComboBox_currentIndexChanged(int index) ui->widePlot->setLinearAvg(false);
ui->widePlot->setReference(false);
ui->widePlot->setQ65_Sync(false);
+ ui->widePlot->setTotalPower(false);
ui->smoSpinBox->setEnabled(false);
switch (index)
{
@@ -332,7 +337,10 @@ void WideGraph::on_spec2dComboBox_currentIndexChanged(int index) case 4:
ui->widePlot->setQ65_Sync(true);
break;
- }
+ case 5:
+ ui->widePlot->setTotalPower(true);
+ break;
+ }
replot();
}
@@ -473,6 +481,7 @@ void WideGraph::on_zeroSlider_valueChanged(int value) //Zero void WideGraph::on_gain2dSlider_valueChanged(int value) //Gain2
{
ui->widePlot->setPlot2dGain(value);
+ if(ui->widePlot->TotalPower()) return;
if(ui->widePlot->scaleOK ()) {
ui->widePlot->draw(m_swide,false,false);
if(m_mode=="Q65") ui->widePlot->draw(m_swide,false,true);
@@ -482,6 +491,7 @@ void WideGraph::on_gain2dSlider_valueChanged(int value) //Gain2 void WideGraph::on_zero2dSlider_valueChanged(int value) //Zero2
{
ui->widePlot->setPlot2dZero(value);
+ if(ui->widePlot->TotalPower()) return;
if(ui->widePlot->scaleOK ()) {
ui->widePlot->draw(m_swide,false,false);
if(m_mode=="Q65") ui->widePlot->draw(m_swide,false,true);
@@ -540,3 +550,8 @@ void WideGraph::setDiskUTC(int nutc) {
ui->widePlot->setDiskUTC(nutc);
}
+
+void WideGraph::restartTotalPower()
+{
+ ui->widePlot->restartTotalPower();
+}
diff --git a/widgets/widegraph.h b/widgets/widegraph.h index 53003e64..7f0b024e 100755 --- a/widgets/widegraph.h +++ b/widgets/widegraph.h @@ -26,7 +26,7 @@ public: explicit WideGraph(QSettings *, QWidget *parent = 0);
~WideGraph ();
- void dataSink2(float s[], float df3, int ihsym, int ndiskdata);
+ void dataSink2(float s[], float df3, int ihsym, int ndiskdata, float pdB);
void setRxFreq(int n);
int rxFreq();
int nStartFreq();
@@ -51,6 +51,7 @@ public: void setFST4_FreqRange(int fLow,int fHigh);
void setSingleDecode(bool b);
void setDiskUTC(int nutc);
+ void restartTotalPower();
signals:
void freezeDecode2(int n);
diff --git a/widgets/widegraph.ui b/widgets/widegraph.ui index 4b3b0f04..df0afa85 100755 --- a/widgets/widegraph.ui +++ b/widgets/widegraph.ui @@ -340,6 +340,11 @@ <string>Q65_Sync</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>Total power (dB)</string>
+ </property>
+ </item>
</widget>
</item>
<item row="0" column="2">
|
