mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 11:31:51 -05:00
The "Best S+P" button is now functional. Needs testing!
This commit is contained in:
parent
ec97d0410e
commit
b6032277d0
@ -5,7 +5,8 @@ SOURCES += \
|
||||
models/Modes.cpp \
|
||||
models/IARURegions.cpp \
|
||||
models/FoxLog.cpp \
|
||||
models/CabrilloLog.cpp
|
||||
models/CabrilloLog.cpp \
|
||||
models/DecodeHighlightingModel.cpp
|
||||
|
||||
HEADERS += \
|
||||
models/Bands.hpp \
|
||||
@ -15,4 +16,5 @@ HEADERS += \
|
||||
models/IARURegions.hpp \
|
||||
models/FoxLog.hpp \
|
||||
models/CabrilloLog.hpp \
|
||||
models/FontOverrideModel.hpp
|
||||
models/FontOverrideModel.hpp \
|
||||
models/DecodeHighlightingModel.hpp
|
||||
|
@ -374,6 +374,7 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
|
||||
appendage += countryName;
|
||||
}
|
||||
}
|
||||
m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight);
|
||||
|
||||
// use a nbsp to save the start of appended text so we can find
|
||||
// it again later, align appended data at a fixed column if
|
||||
@ -423,6 +424,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
||||
QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"};
|
||||
if(!dxGrid.contains(grid_regexp)) dxGrid="";
|
||||
message = message.left (message.indexOf (QChar::Nbsp)); // strip appended info
|
||||
m_CQPriority="";
|
||||
if (CQcall)
|
||||
{
|
||||
if (displayDXCCEntity)
|
||||
@ -447,6 +449,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
||||
set_colours (m_config, &bg, &fg, types);
|
||||
}
|
||||
}
|
||||
|
||||
appendText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
void displayQSY(QString text);
|
||||
void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {});
|
||||
void new_period ();
|
||||
QString CQPriority(){return m_CQPriority;};
|
||||
|
||||
Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers);
|
||||
Q_SIGNAL void erased ();
|
||||
@ -51,6 +52,7 @@ private:
|
||||
|
||||
Configuration const * m_config;
|
||||
bool m_bPrincipalPrefix;
|
||||
QString m_CQPriority;
|
||||
QString appendWorkedB4(QString message, QString callsign
|
||||
, QString const& grid, QColor * bg, QColor * fg
|
||||
, LogBook const& logBook, QString const& currentBand
|
||||
|
@ -979,7 +979,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
QTimer::singleShot (0, this, SLOT (not_GA_warning_message ()));
|
||||
}
|
||||
|
||||
ui->pbCallBest->setVisible(m_mode=="FT4");
|
||||
ui->pbBestSP->setVisible(m_mode=="FT4");
|
||||
if(!ui->cbMenus->isChecked()) {
|
||||
ui->cbMenus->setChecked(true);
|
||||
ui->cbMenus->setChecked(false);
|
||||
@ -2885,7 +2885,10 @@ void MainWindow::decode() //decode()
|
||||
if(m_mode=="FT8") dec_data.params.lft8apon = ui->actionEnable_AP_FT8->isVisible () &&
|
||||
ui->actionEnable_AP_FT8->isChecked ();
|
||||
if(m_mode=="FT8") dec_data.params.napwid=50;
|
||||
if(m_mode=="FT4") dec_data.params.nmode=5;
|
||||
if(m_mode=="FT4") {
|
||||
dec_data.params.nmode=5;
|
||||
m_BestCQpriority="";
|
||||
}
|
||||
dec_data.params.ntrperiod=m_TRperiod;
|
||||
dec_data.params.nsubmode=m_nSubMode;
|
||||
if(m_mode=="QRA64") dec_data.params.nsubmode=100 + m_nSubMode;
|
||||
@ -3104,6 +3107,17 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||
ui->decodedTextBrowser->displayDecodedText(decodedtext0,m_baseCall,m_mode,m_config.DXCC(),
|
||||
m_logBook,m_currentBand,m_config.ppfx(),
|
||||
(ui->cbCQonly->isVisible() and ui->cbCQonly->isChecked()));
|
||||
if(m_bBestSPArmed and m_mode=="FT4") {
|
||||
QString messagePriority=ui->decodedTextBrowser->CQPriority();
|
||||
if(messagePriority!="") {
|
||||
if(messagePriority=="New Call on Band"
|
||||
and m_BestCQpriority!="New Call on Band"
|
||||
and m_BestCQpriority!="New Multiplier") {
|
||||
m_BestCQpriority="New Call on Band";
|
||||
processMessage(decodedtext0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3135,9 +3149,10 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||
if (bDisplayRight) {
|
||||
// This msg is within 10 hertz of our tuned frequency, or a JT4 or JT65 avg,
|
||||
// or contains MyCall
|
||||
ui->decodedTextBrowser2->displayDecodedText(decodedtext0,m_baseCall,m_mode,m_config.DXCC(),
|
||||
m_logBook,m_currentBand,m_config.ppfx());
|
||||
|
||||
if(!m_bBestSPArmed or m_mode!="FT4") {
|
||||
ui->decodedTextBrowser2->displayDecodedText(decodedtext0,m_baseCall,m_mode,m_config.DXCC(),
|
||||
m_logBook,m_currentBand,m_config.ppfx());
|
||||
}
|
||||
if(m_mode!="JT4") {
|
||||
bool b65=decodedtext.isJT65();
|
||||
if(b65 and m_modeTx!="JT65") on_pbTxMode_clicked();
|
||||
@ -3614,6 +3629,13 @@ void MainWindow::guiUpdate()
|
||||
m_ntx=1;
|
||||
ui->txrb1->setChecked(true);
|
||||
}
|
||||
|
||||
if(m_mode=="FT4" and m_bBestSPArmed) {
|
||||
m_BestCQpriority="";
|
||||
m_bBestSPArmed=false;
|
||||
ui->pbBestSP->setStyleSheet ("");
|
||||
}
|
||||
|
||||
if(m_ntx == 1) ba=ui->tx1->text().toLocal8Bit();
|
||||
if(m_ntx == 2) ba=ui->tx2->text().toLocal8Bit();
|
||||
if(m_ntx == 3) ba=ui->tx3->text().toLocal8Bit();
|
||||
@ -5575,7 +5597,7 @@ void MainWindow::displayWidgets(qint64 n)
|
||||
if(i==32) ui->cbCQonly->setVisible(b);
|
||||
j=j>>1;
|
||||
}
|
||||
ui->pbCallBest->setVisible(m_mode=="FT4");
|
||||
ui->pbBestSP->setVisible(m_mode=="FT4");
|
||||
b=SpecOp::EU_VHF==m_config.special_op_id() or (SpecOp::RTTY==m_config.special_op_id() and
|
||||
(m_config.RTTY_Exchange()=="DX" or m_config.RTTY_Exchange()=="SCC"));
|
||||
ui->sbSerialNumber->setVisible(b);
|
||||
@ -8671,3 +8693,9 @@ void MainWindow::chkFT4()
|
||||
on_contest_log_action_triggered();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_pbBestSP_clicked()
|
||||
{
|
||||
ui->pbBestSP->setStyleSheet ("QPushButton{color:red}");
|
||||
m_bBestSPArmed=true;
|
||||
}
|
||||
|
@ -312,6 +312,7 @@ private slots:
|
||||
void on_comboBoxHoundSort_activated (int index);
|
||||
void not_GA_warning_message ();
|
||||
void checkMSK144ContestType();
|
||||
void on_pbBestSP_clicked();
|
||||
int setTxMsg(int n);
|
||||
bool stdCall(QString const& w);
|
||||
|
||||
@ -520,6 +521,7 @@ private:
|
||||
bool m_bCheckedContest;
|
||||
bool m_bWarnedSplit=false;
|
||||
bool m_bTUmsg;
|
||||
bool m_bBestSPArmed=false;
|
||||
|
||||
enum
|
||||
{
|
||||
@ -615,6 +617,7 @@ private:
|
||||
QString m_nextGrid;
|
||||
QString m_fileDateTime;
|
||||
QString m_inQSOwith;
|
||||
QString m_BestCQpriority;
|
||||
|
||||
QSet<QString> m_pfx;
|
||||
QSet<QString> m_sfx;
|
||||
|
@ -1339,9 +1339,9 @@ QPushButton[state="ok"] {
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbCallBest">
|
||||
<widget class="QPushButton" name="pbBestSP">
|
||||
<property name="text">
|
||||
<string>Call Best</string>
|
||||
<string>Best S+P</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user