diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a69283989..eb3fc2f82 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2006,7 +2006,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e) case Qt::Key_X: if(e->modifiers() & Qt::AltModifier) { // foxTest(); - foxLog(); return; } case Qt::Key_E: @@ -8814,93 +8813,3 @@ void MainWindow::save_FT4() m_kin0=dec_data.params.kin; } - -void MainWindow::foxLog() -{ - // This is part of the "Fox-log fixup" code - QFile f("FoxQSO_XX9D_1.txt"); - if(!f.open(QIODevice::ReadOnly | QIODevice::Text)) return; - QTextStream s(&f); - QString line; - QString msg; - QString hc1; - QString rptRcvd; - int nRx=0; - int nTx=0; - - while(!s.atEnd()) { - line=s.readLine(); - if(line.length()==0) continue; - - if(line.contains(" Sel:")) { - QStringList w=line.split(' ', QString::SkipEmptyParts); - hc1=w.at(7); // his call - m_fixupQSO[hc1].sent=w.at(8); // sent report - m_fixupQSO[hc1].grid=w.at(9); // his grid - } - - if(line.contains(" Rx:")) { - int i0=line.indexOf(" ~ ") + 4; - msg=line.mid(i0); - if(msg.left(4)!="XX9D") { - break; - } - int i1=msg.indexOf(" "); - nRx++; - hc1=msg.mid(i1+1); - int i2=hc1.indexOf(" "); - hc1=hc1.mid(0,i2); - int i3=qMax(msg.indexOf("R+"),msg.indexOf("R-")); - if(i3>8) { - m_fixupQSO[hc1].rcvd=msg.mid(i3+1,3); - } - } - - if(line.contains(" Tx")) { - int i0=line.indexOf(" Tx") + 7; - msg=line.mid(i0); - nTx++; - QStringList w=msg.split(' ', QString::SkipEmptyParts); - if(w.size()<3) continue; - if(w.at(2).left(1)=="+" or w.at(2).left(1)=="-") { - hc1=w.at(0); - m_fixupQSO[hc1].sent=w.at(2); - } - if(w.at(2)=="RR73") { - hc1=w.at(0); - loggit(hc1,line); - } - if(w.at(1)=="RR73;") { - hc1=w.at(0); - loggit(hc1,line); - } - hc1=w.at(0); - } - } -} - -void MainWindow::loggit(QString hc1, QString line) -{ - // This is part of the "Fox-log fixup" code - static int nQSO=0; - // Log a QSO with callsign hc1; - QDateTime QSO_time = QDateTime::fromString(line.left(19),"yyyy-MM-dd hh:mm:ss"); - QString sMHz=line.split(' ', QString::SkipEmptyParts).at(2); - Frequency nHz=1000000.0 * sMHz.toDouble() + 0.5; - auto const& band_name = m_config.bands()->find(nHz); - m_hisCall=hc1; - m_hisGrid=m_fixupQSO[hc1].grid; - if(m_hisGrid=="....") m_hisGrid=""; - m_rptSent=m_fixupQSO[hc1].sent; - m_rptRcvd=m_fixupQSO[hc1].rcvd; - nQSO++; - if (!m_foxLog) m_foxLog.reset (new FoxLog {&m_config}); - if (!m_foxLogWindow) on_fox_log_action_triggered (); - m_foxLog->add_QSO (QSO_time, m_hisCall, m_hisGrid, m_rptSent, m_rptRcvd, band_name); -// qDebug().noquote() << nQSO << line.left(19) << m_hisCall << m_hisGrid << m_rptSent -// << m_rptRcvd << sMHz << band_name; - - m_logDlg->initLogQSO (m_hisCall, m_hisGrid, m_modeTx, m_rptSent, m_rptRcvd, - QSO_time, QSO_time, nHz, m_noSuffix, "", "", - m_cabrilloLog.data ()); -} diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index b54193815..db732e053 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -347,7 +347,6 @@ private: void auto_sequence (DecodedText const& message, unsigned start_tolerance, unsigned stop_tolerance); void hideMenus(bool b); void foxTest(); - void foxLog(); void setColorHighlighting(); NetworkAccessManager m_network_manager; @@ -763,7 +762,6 @@ private: void writeFoxQSO (QString const& msg); void FT4_writeTx(); void save_FT4(); - void loggit(QString hc1, QString line); }; extern int killbyname(const char* progName);