mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-25 06:35:17 -04:00
Remove my new QHash stuff; adapt the existing logbook code instead.
We now display "new call on current band" as well as "new call on any band". Something similar should be done for DXCCs and grids.
This commit is contained in:
parent
0d7cd3ed03
commit
a292b2bb58
@ -151,18 +151,18 @@ void DisplayText::appendText(QString const& text, QColor bg, QString const& call
|
|||||||
document ()->setMaximumBlockCount (document ()->maximumBlockCount ());
|
document ()->setMaximumBlockCount (document ()->maximumBlockCount ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString DisplayText::appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg,
|
QString DisplayText::appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg,
|
||||||
LogBook const& logBook, QColor color_CQ,
|
LogBook const& logBook, QColor color_CQ, QColor color_DXCC, QColor color_NewCall,
|
||||||
QColor color_DXCC,
|
QColor color_NewCallBand, QString currentBand)
|
||||||
QColor color_NewCall)
|
|
||||||
{
|
{
|
||||||
// allow for seconds
|
// allow for seconds
|
||||||
int padding {message.indexOf (" ") > 4 ? 2 : 0};
|
int padding {message.indexOf (" ") > 4 ? 2 : 0};
|
||||||
QString call = callsign;
|
QString call = callsign;
|
||||||
QString countryName;
|
QString countryName;
|
||||||
bool callWorkedBefore;
|
bool callWorkedBefore;
|
||||||
|
bool callB4onBand;
|
||||||
bool countryWorkedBefore;
|
bool countryWorkedBefore;
|
||||||
|
bool countryB4onBand;
|
||||||
|
|
||||||
if(call.length()==2) {
|
if(call.length()==2) {
|
||||||
int i0=message.indexOf("CQ "+call);
|
int i0=message.indexOf("CQ "+call);
|
||||||
@ -174,26 +174,31 @@ QString DisplayText::appendDXCCWorkedB4(QString message, QString const& callsign
|
|||||||
if(!call.contains(QRegExp("[0-9]|[A-Z]"))) return message;
|
if(!call.contains(QRegExp("[0-9]|[A-Z]"))) return message;
|
||||||
|
|
||||||
logBook.match(/*in*/call,/*out*/countryName,callWorkedBefore,countryWorkedBefore);
|
logBook.match(/*in*/call,/*out*/countryName,callWorkedBefore,countryWorkedBefore);
|
||||||
|
logBook.match(/*in*/call,/*out*/countryName,callB4onBand,countryB4onBand,
|
||||||
|
/*in*/ currentBand);
|
||||||
|
|
||||||
message = message.trimmed ();
|
message = message.trimmed ();
|
||||||
QString appendage;
|
QString appendage{""};
|
||||||
if (!countryWorkedBefore) // therefore not worked call either
|
|
||||||
{
|
if (!countryWorkedBefore) {
|
||||||
|
// therefore not worked call either
|
||||||
appendage += "!";
|
appendage += "!";
|
||||||
*bg = color_DXCC;
|
*bg = color_DXCC;
|
||||||
}
|
} else {
|
||||||
else
|
if (!callWorkedBefore) {
|
||||||
{
|
// but have worked the country
|
||||||
if (!callWorkedBefore) // but have worked the country
|
|
||||||
{
|
|
||||||
appendage += "~";
|
appendage += "~";
|
||||||
*bg = color_NewCall;
|
*bg = color_NewCall;
|
||||||
}
|
} else {
|
||||||
else
|
if(!callB4onBand) {
|
||||||
{
|
appendage += "~";
|
||||||
|
*bg = color_NewCallBand;
|
||||||
|
} else {
|
||||||
appendage += " "; // have worked this call before
|
appendage += " "; // have worked this call before
|
||||||
*bg = color_CQ;
|
*bg = color_CQ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int i1=countryName.indexOf(";");
|
int i1=countryName.indexOf(";");
|
||||||
if(m_bPrincipalPrefix) {
|
if(m_bPrincipalPrefix) {
|
||||||
@ -240,8 +245,9 @@ QString DisplayText::appendDXCCWorkedB4(QString message, QString const& callsign
|
|||||||
void DisplayText::displayDecodedText(DecodedText const& decodedText, QString const& myCall,
|
void DisplayText::displayDecodedText(DecodedText const& decodedText, QString const& myCall,
|
||||||
bool displayDXCCEntity, LogBook const& logBook,
|
bool displayDXCCEntity, LogBook const& logBook,
|
||||||
QColor color_CQ, QColor color_MyCall,
|
QColor color_CQ, QColor color_MyCall,
|
||||||
QColor color_DXCC, QColor color_NewCall, bool ppfx,
|
QColor color_DXCC, QColor color_NewCall,
|
||||||
bool bCQonly)
|
QColor color_NewCallBand,
|
||||||
|
QString currentBand, bool ppfx, bool bCQonly)
|
||||||
{
|
{
|
||||||
m_bPrincipalPrefix=ppfx;
|
m_bPrincipalPrefix=ppfx;
|
||||||
QColor bg {Qt::transparent};
|
QColor bg {Qt::transparent};
|
||||||
@ -271,7 +277,7 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
|||||||
// if enabled add the DXCC entity and B4 status to the end of the
|
// if enabled add the DXCC entity and B4 status to the end of the
|
||||||
// preformated text line t1
|
// preformated text line t1
|
||||||
message = appendDXCCWorkedB4 (message, decodedText.CQersCall (), &bg, logBook, color_CQ,
|
message = appendDXCCWorkedB4 (message, decodedText.CQersCall (), &bg, logBook, color_CQ,
|
||||||
color_DXCC, color_NewCall);
|
color_DXCC, color_NewCall, color_NewCallBand, currentBand);
|
||||||
appendText (message.trimmed (), bg, decodedText.call (), dxCall);
|
appendText (message.trimmed (), bg, decodedText.call (), dxCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,9 +22,10 @@ public:
|
|||||||
|
|
||||||
void setContentFont (QFont const&);
|
void setContentFont (QFont const&);
|
||||||
void insertLineSpacer(QString const&);
|
void insertLineSpacer(QString const&);
|
||||||
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, bool displayDXCCEntity,
|
void displayDecodedText(DecodedText const& decodedText, QString const& myCall,
|
||||||
LogBook const& logBook, QColor color_CQ, QColor color_MyCall,
|
bool displayDXCCEntity, LogBook const& logBook, QColor color_CQ, QColor color_MyCall,
|
||||||
QColor color_DXCC, QColor color_NewCall, bool ppfx, bool bCQonly=false);
|
QColor color_DXCC, QColor color_NewCall, QColor color_NewCallBand,
|
||||||
|
QString currentBand="", bool ppfx=false, bool bCQonly=false);
|
||||||
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
|
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
|
||||||
QColor color_TxMsg, bool bFastMode);
|
QColor color_TxMsg, bool bFastMode);
|
||||||
void displayQSY(QString text);
|
void displayQSY(QString text);
|
||||||
@ -43,8 +44,9 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_bPrincipalPrefix;
|
bool m_bPrincipalPrefix;
|
||||||
QString appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg, LogBook const& logBook,
|
QString appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg,
|
||||||
QColor color_CQ, QColor color_DXCC, QColor color_NewCall);
|
LogBook const& logBook, QColor color_CQ, QColor color_DXCC,
|
||||||
|
QColor color_NewCall, QColor color_NewCallBand, QString currentBand);
|
||||||
|
|
||||||
QFont char_font_;
|
QFont char_font_;
|
||||||
QAction * erase_action_;
|
QAction * erase_action_;
|
||||||
|
@ -121,7 +121,7 @@ void ADIF::add(QString const& call, QString const& band, QString const& mode, QS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if in the log same band and mode (where JT65 == JT9)
|
// return true if in the log same band and mode (where JT65 == JT9 == FT8)
|
||||||
bool ADIF::match(QString const& call, QString const& band, QString const& mode) const
|
bool ADIF::match(QString const& call, QString const& band, QString const& mode) const
|
||||||
{
|
{
|
||||||
QList<QSO> qsos = _data.values(call);
|
QList<QSO> qsos = _data.values(call);
|
||||||
|
@ -67,25 +67,23 @@ void LogBook::_setAlreadyWorkedFromLog()
|
|||||||
void LogBook::match(/*in*/const QString call,
|
void LogBook::match(/*in*/const QString call,
|
||||||
/*out*/ QString &countryName,
|
/*out*/ QString &countryName,
|
||||||
bool &callWorkedBefore,
|
bool &callWorkedBefore,
|
||||||
bool &countryWorkedBefore) const
|
bool &countryWorkedBefore,
|
||||||
|
QString currentBand) const
|
||||||
{
|
{
|
||||||
if (call.length() > 0)
|
if (call.length() > 0) {
|
||||||
{
|
QString currentMode = "JT9"; // JT65 == JT9 == FT8 in ADIF::match()
|
||||||
QString currentMode = "JT9"; // JT65 == JT9 in ADIF::match()
|
// QString currentBand = ""; // match any band
|
||||||
QString currentBand = ""; // match any band
|
|
||||||
callWorkedBefore = _log.match(call,currentBand,currentMode);
|
callWorkedBefore = _log.match(call,currentBand,currentMode);
|
||||||
countryName = _countries.find(call);
|
countryName = _countries.find(call);
|
||||||
// qDebug() << "B" << countryName;
|
|
||||||
|
|
||||||
if (countryName.length() > 0) // country was found
|
if (countryName.length() > 0) { // country was found
|
||||||
countryWorkedBefore = _worked.getHasWorked(countryName);
|
countryWorkedBefore = _worked.getHasWorked(countryName);
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
countryName = "where?"; //error: prefix not found
|
countryName = "where?"; //error: prefix not found
|
||||||
countryWorkedBefore = false;
|
countryWorkedBefore = false;
|
||||||
}
|
}
|
||||||
|
// qDebug() << "Logbook:" << call << currentBand << callWorkedBefore << countryName << countryWorkedBefore;
|
||||||
}
|
}
|
||||||
//qDebug() << "Logbook:" << call << ":" << countryName << "Cty B4:" << countryWorkedBefore << "call B4:" << callWorkedBefore;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString date)
|
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString date)
|
||||||
|
@ -23,7 +23,8 @@ public:
|
|||||||
void match(/*in*/ const QString call,
|
void match(/*in*/ const QString call,
|
||||||
/*out*/ QString &countryName,
|
/*out*/ QString &countryName,
|
||||||
bool &callWorkedBefore,
|
bool &callWorkedBefore,
|
||||||
bool &countryWorkedBefore) const;
|
bool &countryWorkedBefore,
|
||||||
|
QString currentBand="") const;
|
||||||
void addAsWorked(const QString call, const QString band, const QString mode, const QString date);
|
void addAsWorked(const QString call, const QString band, const QString mode, const QString date);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
113
mainwindow.cpp
113
mainwindow.cpp
@ -906,8 +906,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
splashTimer.setSingleShot (true);
|
splashTimer.setSingleShot (true);
|
||||||
splashTimer.start (20 * 1000);
|
splashTimer.start (20 * 1000);
|
||||||
|
|
||||||
readLog(); //Read wsjtx.log
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
|
if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
|
||||||
m_config.my_callsign()=="G4WJS" or
|
m_config.my_callsign()=="G4WJS" or
|
||||||
@ -984,87 +982,6 @@ void MainWindow::on_the_minute ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int MainWindow::iband(float fMHz)
|
|
||||||
{
|
|
||||||
float f[]={0.1375,0.4755,1.9,3.75,5.3585,7.150,10.125,14.175,18.128,21.225,
|
|
||||||
24.940,28.850,52.0,70.25,146.0,435.0,915.0,1270.0,2375.,3400.,5787.,
|
|
||||||
10250.,24125.,47100.,78500.,122500.,137500.,246000.};
|
|
||||||
float x,xmin=1.0e30;
|
|
||||||
int ibest=-1;
|
|
||||||
for(int i=0; i<28; i++) {
|
|
||||||
x=qAbs(fMHz/f[i] - 1.0);
|
|
||||||
if(x < xmin) {
|
|
||||||
xmin=x;
|
|
||||||
ibest=i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// qDebug() << "AA" << fMHz << ibest << xmin << hamBand(ibest);
|
|
||||||
return ibest;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MainWindow::hamBand(int iband)
|
|
||||||
{
|
|
||||||
QString b[]={"2200m","630m","160m","80m","60m","40m","30m","20m","17m","15m",
|
|
||||||
"12m","10m","6m","4m","2m","1.25m","70cm","33cm","23cm","13cm",
|
|
||||||
"6cm","3cm","1.25cm"};
|
|
||||||
if(iband<=23) {
|
|
||||||
return b[iband];
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::readLog()
|
|
||||||
{
|
|
||||||
QFile f(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx.log"));
|
|
||||||
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
|
||||||
QTextStream s(&f);
|
|
||||||
QString t0,t,callsign,grid,mode;
|
|
||||||
int nQSO=0; //Total number of QSOs
|
|
||||||
int i0,i1,i2,len;
|
|
||||||
float fMHz;
|
|
||||||
// Read the log
|
|
||||||
while(!s.atEnd()) {
|
|
||||||
t0=s.readLine().mid(40);
|
|
||||||
i0=t0.indexOf(",");
|
|
||||||
callsign=t0.left(i0);
|
|
||||||
t=t0.mid(i0+1);
|
|
||||||
i0=t.indexOf(",");
|
|
||||||
grid=t.left(i0);
|
|
||||||
t=t.mid(i0+1);
|
|
||||||
i0=t.indexOf(",");
|
|
||||||
fMHz=t.left(i0).toFloat();
|
|
||||||
t=t.mid(i0+1);
|
|
||||||
i0=t.indexOf(",");
|
|
||||||
mode=t.left(i0);
|
|
||||||
nQSO++;
|
|
||||||
i1 = m_callWorked[callsign];
|
|
||||||
i2 = 1 << iband(fMHz);
|
|
||||||
m_callWorked[callsign]=i1 | i2;
|
|
||||||
if(MaidenheadLocatorValidator::Acceptable == MaidenheadLocatorValidator().validate(grid,len)) {
|
|
||||||
m_gridWorked[grid]=i1 | i2;
|
|
||||||
}
|
|
||||||
// qDebug() << nQSO << callsign << grid << fMHz << mode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MainWindow::isWorked(int itype, QString key, float fMHz, QString mode)
|
|
||||||
{
|
|
||||||
bool worked;
|
|
||||||
int i=0;
|
|
||||||
if(itype==CALL) i = m_callWorked[key];
|
|
||||||
if(itype==GRID) i = m_gridWorked[key];
|
|
||||||
if(fMHz==0.0) {
|
|
||||||
worked=(i!=0);
|
|
||||||
} else {
|
|
||||||
int ib=iband(fMHz);
|
|
||||||
worked=((i>>ib) & 1)!=0;
|
|
||||||
}
|
|
||||||
// Check mode here...
|
|
||||||
return worked;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------- MainWindow destructor
|
//--------------------------------------------------- MainWindow destructor
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
@ -1377,7 +1294,7 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
DecodedText decodedtext {t};
|
DecodedText decodedtext {t};
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||||
m_config.color_NewCall(),m_config.ppfx());
|
m_config.color_NewCall(),m_config.color_NewCallBand(),m_currentBand, m_config.ppfx());
|
||||||
if (ui->measure_check_box->isChecked ()) {
|
if (ui->measure_check_box->isChecked ()) {
|
||||||
// Append results text to file "fmt.all".
|
// Append results text to file "fmt.all".
|
||||||
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")};
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")};
|
||||||
@ -1618,7 +1535,7 @@ void MainWindow::fastSink(qint64 frames)
|
|||||||
DecodedText decodedtext {message.replace (QChar::LineFeed, "")};
|
DecodedText decodedtext {message.replace (QChar::LineFeed, "")};
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||||
m_config.color_NewCall(),m_config.ppfx());
|
m_config.color_NewCall(),m_config.color_NewCallBand(),m_currentBand,m_config.ppfx());
|
||||||
m_bDecoded=true;
|
m_bDecoded=true;
|
||||||
auto_sequence (decodedtext, ui->sbFtol->value (), std::numeric_limits<unsigned>::max ());
|
auto_sequence (decodedtext, ui->sbFtol->value (), std::numeric_limits<unsigned>::max ());
|
||||||
if (m_mode != "ISCAT") postDecode (true, decodedtext.string ());
|
if (m_mode != "ISCAT") postDecode (true, decodedtext.string ());
|
||||||
@ -2862,7 +2779,7 @@ void::MainWindow::fast_decode_done()
|
|||||||
if(!m_bFastDone) {
|
if(!m_bFastDone) {
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||||
m_config.color_NewCall(),m_config.ppfx());
|
m_config.color_NewCall(),m_config.color_NewCallBand(),m_currentBand,m_config.ppfx());
|
||||||
}
|
}
|
||||||
|
|
||||||
t=message.mid(10,5).toFloat();
|
t=message.mid(10,5).toFloat();
|
||||||
@ -3004,14 +2921,16 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
DecodedText dt{"."};
|
DecodedText dt{"."};
|
||||||
ui->decodedTextBrowser->displayDecodedText(dt,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText(dt,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
||||||
m_config.color_DXCC(), m_config.color_NewCall(),m_config.ppfx());
|
m_config.color_DXCC(), m_config.color_NewCall(),m_config.color_NewCallBand(),
|
||||||
|
m_currentBand,m_config.ppfx());
|
||||||
m_bDisplayedOnce=true;
|
m_bDisplayedOnce=true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ui->decodedTextBrowser->displayDecodedText(decodedtext,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText(decodedtext,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
||||||
m_config.color_DXCC(), m_config.color_NewCall(),
|
m_config.color_DXCC(), m_config.color_NewCall(),m_config.color_NewCallBand(),
|
||||||
m_config.ppfx(),(ui->cbCQonly->isVisible() and ui->cbCQonly->isChecked()));
|
m_currentBand,m_config.ppfx(),
|
||||||
|
(ui->cbCQonly->isVisible() and ui->cbCQonly->isChecked()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3046,7 +2965,8 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
// or contains MyCall
|
// or contains MyCall
|
||||||
ui->decodedTextBrowser2->displayDecodedText(decodedtext,m_baseCall,false,
|
ui->decodedTextBrowser2->displayDecodedText(decodedtext,m_baseCall,false,
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),
|
||||||
m_config.color_DXCC(),m_config.color_NewCall(),m_config.ppfx());
|
m_config.color_DXCC(),m_config.color_NewCall(),m_config.color_NewCallBand(),
|
||||||
|
m_currentBand,m_config.ppfx());
|
||||||
|
|
||||||
if(m_mode!="JT4") {
|
if(m_mode!="JT4") {
|
||||||
bool b65=decodedtext.isJT65();
|
bool b65=decodedtext.isJT65();
|
||||||
@ -3800,12 +3720,14 @@ void MainWindow::guiUpdate()
|
|||||||
|
|
||||||
//Once per second:
|
//Once per second:
|
||||||
if(nsec != m_sec0) {
|
if(nsec != m_sec0) {
|
||||||
// qDebug() << "OneSec:" << ui->tx1->isEnabled();
|
// qDebug() << "OneSec:" << m_config.ppfx();
|
||||||
if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) {
|
if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) {
|
||||||
if(!m_bVHFwarned) vhfWarning();
|
if(!m_bVHFwarned) vhfWarning();
|
||||||
} else {
|
} else {
|
||||||
m_bVHFwarned=false;
|
m_bVHFwarned=false;
|
||||||
}
|
}
|
||||||
|
m_currentBand=m_config.bands()->find(m_freqNominal);
|
||||||
|
|
||||||
// if(m_config.bFox()) {
|
// if(m_config.bFox()) {
|
||||||
// if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
|
// if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
|
||||||
// m_config.my_callsign()=="G4WJS" or m_config.my_callsign().contains("KH7Z")) {
|
// m_config.my_callsign()=="G4WJS" or m_config.my_callsign().contains("KH7Z")) {
|
||||||
@ -4549,9 +4471,9 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
|||||||
QString s2 = message.string ().trimmed();
|
QString s2 = message.string ().trimmed();
|
||||||
if (s1!=s2 and !message.isTX()) {
|
if (s1!=s2 and !message.isTX()) {
|
||||||
if (!s2.contains(m_baseCall) or m_mode=="MSK144") { // Taken care of elsewhere if for_us and slow mode
|
if (!s2.contains(m_baseCall) or m_mode=="MSK144") { // Taken care of elsewhere if for_us and slow mode
|
||||||
ui->decodedTextBrowser2->displayDecodedText(message, m_baseCall,
|
ui->decodedTextBrowser2->displayDecodedText(message, m_baseCall,false,
|
||||||
false, m_logBook,m_config.color_CQ(), m_config.color_MyCall(),
|
m_logBook,m_config.color_CQ(), m_config.color_MyCall(), m_config.color_DXCC(),
|
||||||
m_config.color_DXCC(),m_config.color_NewCall(),m_config.ppfx());
|
m_config.color_NewCall(),m_config.color_NewCallBand(),m_currentBand,m_config.ppfx());
|
||||||
}
|
}
|
||||||
m_QSOText = s2;
|
m_QSOText = s2;
|
||||||
}
|
}
|
||||||
@ -7874,7 +7796,8 @@ void MainWindow::houndCallers()
|
|||||||
if(m_foxQSO.contains(houndCall)) continue; //still in the QSO map
|
if(m_foxQSO.contains(houndCall)) continue; //still in the QSO map
|
||||||
QString countryName,continent;
|
QString countryName,continent;
|
||||||
bool callWorkedBefore,countryWorkedBefore;
|
bool callWorkedBefore,countryWorkedBefore;
|
||||||
m_logBook.match(/*in*/houndCall,/*out*/countryName,callWorkedBefore,countryWorkedBefore);
|
m_logBook.match(/*in*/houndCall,/*out*/countryName,callWorkedBefore,countryWorkedBefore,
|
||||||
|
/*in*/ m_currentBand);
|
||||||
int i1=countryName.lastIndexOf(";");
|
int i1=countryName.lastIndexOf(";");
|
||||||
continent=countryName.mid(i1+2,-1);
|
continent=countryName.mid(i1+2,-1);
|
||||||
|
|
||||||
|
10
mainwindow.h
10
mainwindow.h
@ -596,6 +596,7 @@ private:
|
|||||||
QString m_fm1;
|
QString m_fm1;
|
||||||
QString m_xSent; //Contest exchange sent
|
QString m_xSent; //Contest exchange sent
|
||||||
QString m_xRcvd; //Contest exchange received
|
QString m_xRcvd; //Contest exchange received
|
||||||
|
QString m_currentBand;
|
||||||
|
|
||||||
QSet<QString> m_pfx;
|
QSet<QString> m_pfx;
|
||||||
QSet<QString> m_sfx;
|
QSet<QString> m_sfx;
|
||||||
@ -614,11 +615,6 @@ private:
|
|||||||
QMap<QString,FoxQSO> m_foxQSO; //Key = HoundCall, value = parameters for QSO in progress
|
QMap<QString,FoxQSO> m_foxQSO; //Key = HoundCall, value = parameters for QSO in progress
|
||||||
QMap<QString,QString> m_loggedByFox; //Key = HoundCall, value = logged band
|
QMap<QString,QString> m_loggedByFox; //Key = HoundCall, value = logged band
|
||||||
|
|
||||||
QHash<QString,qint32> m_callWorked;
|
|
||||||
QHash<QString,qint32> m_gridWorked;
|
|
||||||
// QHash<QString,qint32> m_dxccWorked;
|
|
||||||
// QHash<QString,qint32> m_multWorked;
|
|
||||||
|
|
||||||
QQueue<QString> m_houndQueue; //Selected Hounds available for starting a QSO
|
QQueue<QString> m_houndQueue; //Selected Hounds available for starting a QSO
|
||||||
QQueue<QString> m_foxQSOinProgress; //QSOs in progress: Fox has sent a report
|
QQueue<QString> m_foxQSOinProgress; //QSOs in progress: Fox has sent a report
|
||||||
QQueue<qint64> m_foxRateQueue;
|
QQueue<qint64> m_foxRateQueue;
|
||||||
@ -696,10 +692,7 @@ private:
|
|||||||
void fast_config(bool b);
|
void fast_config(bool b);
|
||||||
void CQTxFreq();
|
void CQTxFreq();
|
||||||
void cabLog();
|
void cabLog();
|
||||||
void readLog();
|
|
||||||
bool isWorked(int itype, QString key, float fMHz=0, QString="");
|
bool isWorked(int itype, QString key, float fMHz=0, QString="");
|
||||||
int iband(float fMHz);
|
|
||||||
QString hamBand(int iband);
|
|
||||||
|
|
||||||
QString save_wave_file (QString const& name
|
QString save_wave_file (QString const& name
|
||||||
, short const * data
|
, short const * data
|
||||||
@ -744,6 +737,5 @@ extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
|
|||||||
int minChan[], int maxChan[],
|
int minChan[], int maxChan[],
|
||||||
int minSpeed[], int maxSpeed[]);
|
int minSpeed[], int maxSpeed[]);
|
||||||
extern int next_tx_state(int pctx);
|
extern int next_tx_state(int pctx);
|
||||||
//extern void readLog();
|
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user