From 00f8c3ecbac5b865fdbb3c6862a0601d56e1ee83 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 12 Mar 2013 14:53:53 +0000 Subject: [PATCH] Add files "wsjtx_txcall.txt" and wsjtx_qrg.txt" for use by JT-Alert. Write log info to wsjtx.log, not wsjt.log. Bump version number to 0.6. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3045 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 18 +++++++++++++----- widegraph.cpp | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 1350bd9e4..235ebfd9d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -21,7 +21,7 @@ WideGraph* g_pWideGraph = NULL; QSharedMemory mem_jt9("mem_jt9"); QString rev="$Rev$"; -QString Program_Title_Version=" WSJT-X v0.5, r" + rev.mid(6,4) + +QString Program_Title_Version=" WSJT-X v0.6, r" + rev.mid(6,4) + " by K1JT"; //-------------------------------------------------- MainWindow constructor @@ -203,8 +203,8 @@ MainWindow::MainWindow(QWidget *parent) : if(ntol[i]==m_tol) ui->tolSpinBox->setValue(i); } -// Create "m_worked", a dictionary of all calls in wsjt.log - QFile f("wsjt.log"); +// Create "m_worked", a dictionary of all calls in wsjtx.log + QFile f("wsjtx.log"); f.open(QIODevice::ReadOnly); QTextStream in(&f); QString line,t,callsign; @@ -1611,6 +1611,14 @@ void MainWindow::on_dxCallEntry_textChanged(const QString &t) //dxCall changed { m_hisCall=t.toUpper().trimmed(); ui->dxCallEntry->setText(m_hisCall); + QFile f("wsjtx_txcall.txt"); + if(!f.open(QFile::WriteOnly)) { + msgBox("Cannot open file \"wsjtx_txcall.txt\"."); + return; + } + QTextStream out(&f); + out << m_hisCall; + f.close(); } void MainWindow::on_dxGridEntry_textChanged(const QString &t) //dxGrid changed @@ -1637,9 +1645,9 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button QString logEntry=t.date().toString("yyyy-MMM-dd,") + t.time().toString("hh:mm,") + m_hisCall + "," + m_hisGrid + "," + QString::number(dialFreq) + "," + m_mode + "\n"; - QFile f("wsjt.log"); + QFile f("wsjtx.log"); if(!f.open(QFile::Append)) { - msgBox("Cannot open file \"wsjt.log\"."); + msgBox("Cannot open file \"wsjtx.log\"."); return; } QTextStream out(&f); diff --git a/widegraph.cpp b/widegraph.cpp index 01d9a6d1a..d8315f671 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -52,6 +52,16 @@ WideGraph::WideGraph(QWidget *parent) : m_qsoFreq=settings.value("QSOfreq",1010).toInt(); ui->widePlot->setFQSO(m_qsoFreq,true); settings.endGroup(); + + QFile f("wsjtx_qrg.txt"); + if(f.open(QFile::WriteOnly)) { + QTextStream out(&f); + out << m_dialFreq; + f.close(); + } else { +// msgBox("Cannot open file \"wsjtx_qrg.txt\"."); + qDebug() << "Cannot open file \"wsjtx_qrg.txt\"."; + } } WideGraph::~WideGraph() @@ -233,6 +243,15 @@ void WideGraph::setPalette(QString palette) void WideGraph::on_fDialLineEdit_editingFinished() { m_dialFreq=ui->fDialLineEdit->text().toDouble(); + QFile f("wsjtx_qrg.txt"); + if(!f.open(QFile::WriteOnly)) { +// msgBox("Cannot open file \"wsjtx_qrg.txt\"."); + qDebug() << "Cannot open file \"wsjtx_qrg.txt\"."; + return; + } + QTextStream out(&f); + out << m_dialFreq; + f.close(); } double WideGraph::fGreen()