Change wsjtx_txcall.txt and wsjtx_qrg.txt to wsjtx_status.txt.

Change DialFreqkHz to DialFreqMHz.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3049 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-03-18 13:24:50 +00:00
parent ae7b78ce22
commit 2e6e5c97dd
5 changed files with 39 additions and 21 deletions

View File

@ -371,6 +371,7 @@ void MainWindow::readSettings()
if(m_ndepth==1) ui->actionQuickDecode->setChecked(true); if(m_ndepth==1) ui->actionQuickDecode->setChecked(true);
if(m_ndepth==2) ui->actionMediumDecode->setChecked(true); if(m_ndepth==2) ui->actionMediumDecode->setChecked(true);
if(m_ndepth==3) ui->actionDeepestDecode->setChecked(true); if(m_ndepth==3) ui->actionDeepestDecode->setChecked(true);
statusChanged();
} }
//-------------------------------------------------------------- dataSink() //-------------------------------------------------------------- dataSink()
@ -605,6 +606,24 @@ void MainWindow::bumpFqso(int n) //bumpFqso()
} }
} }
void MainWindow::dialFreqChanged2(double f)
{
m_dialFreq=f;
statusChanged();
}
void MainWindow::statusChanged()
{
QFile f("wsjtx_status.txt");
if(!f.open(QFile::WriteOnly)) {
msgBox("Cannot open file \"wsjtx_status.txt\".");
return;
}
QTextStream out(&f);
out << m_dialFreq << ";" << m_mode << ";" << m_hisCall << "\r\n";
f.close();
}
bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter() bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter()
{ {
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
@ -720,7 +739,8 @@ void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
SLOT(freezeDecode(int))); SLOT(freezeDecode(int)));
connect(g_pWideGraph, SIGNAL(f11f12(int)),this, connect(g_pWideGraph, SIGNAL(f11f12(int)),this,
SLOT(bumpFqso(int))); SLOT(bumpFqso(int)));
} connect(g_pWideGraph, SIGNAL(dialFreqChanged(double)),this,
SLOT(dialFreqChanged2(double))); }
g_pWideGraph->show(); g_pWideGraph->show();
} }
@ -1611,14 +1631,7 @@ void MainWindow::on_dxCallEntry_textChanged(const QString &t) //dxCall changed
{ {
m_hisCall=t.toUpper().trimmed(); m_hisCall=t.toUpper().trimmed();
ui->dxCallEntry->setText(m_hisCall); ui->dxCallEntry->setText(m_hisCall);
QFile f("wsjtx_txcall.txt"); statusChanged();
if(!f.open(QFile::WriteOnly)) {
msgBox("Cannot open file \"wsjtx_txcall.txt\".");
return;
}
QTextStream out(&f);
out << m_hisCall << "\r\n";
f.close();
} }
void MainWindow::on_dxGridEntry_textChanged(const QString &t) //dxGrid changed void MainWindow::on_dxGridEntry_textChanged(const QString &t) //dxGrid changed
@ -1679,6 +1692,7 @@ void MainWindow::on_actionErase_wsjtx_tx_log_triggered() //Erase Tx log
void MainWindow::on_actionJT9_1_triggered() void MainWindow::on_actionJT9_1_triggered()
{ {
m_mode="JT9-1"; m_mode="JT9-1";
statusChanged();
m_TRperiod=60; m_TRperiod=60;
m_nsps=6912; m_nsps=6912;
m_hsymStop=181; m_hsymStop=181;
@ -1693,6 +1707,7 @@ void MainWindow::on_actionJT9_1_triggered()
void MainWindow::on_actionJT9_2_triggered() void MainWindow::on_actionJT9_2_triggered()
{ {
m_mode="JT9-2"; m_mode="JT9-2";
statusChanged();
m_TRperiod=120; m_TRperiod=120;
m_nsps=15360; m_nsps=15360;
m_hsymStop=178; m_hsymStop=178;
@ -1707,6 +1722,7 @@ void MainWindow::on_actionJT9_2_triggered()
void MainWindow::on_actionJT9_5_triggered() void MainWindow::on_actionJT9_5_triggered()
{ {
m_mode="JT9-5"; m_mode="JT9-5";
statusChanged();
m_TRperiod=300; m_TRperiod=300;
m_nsps=40960; m_nsps=40960;
m_hsymStop=172; m_hsymStop=172;
@ -1721,6 +1737,7 @@ void MainWindow::on_actionJT9_5_triggered()
void MainWindow::on_actionJT9_10_triggered() void MainWindow::on_actionJT9_10_triggered()
{ {
m_mode="JT9-10"; m_mode="JT9-10";
statusChanged();
m_TRperiod=600; m_TRperiod=600;
m_nsps=82944; m_nsps=82944;
m_hsymStop=171; m_hsymStop=171;
@ -1735,6 +1752,7 @@ void MainWindow::on_actionJT9_10_triggered()
void MainWindow::on_actionJT9_30_triggered() void MainWindow::on_actionJT9_30_triggered()
{ {
m_mode="JT9-30"; m_mode="JT9-30";
statusChanged();
m_TRperiod=1800; m_TRperiod=1800;
m_nsps=252000; m_nsps=252000;
m_hsymStop=167; m_hsymStop=167;

View File

@ -109,9 +109,13 @@ private slots:
void on_inGain_valueChanged(int n); void on_inGain_valueChanged(int n);
void bumpFqso(int n); void bumpFqso(int n);
void on_actionMonitor_OFF_at_startup_triggered(); void on_actionMonitor_OFF_at_startup_triggered();
void dialFreqChanged2(double f);
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
double m_dialFreq;
qint32 m_nDevIn; qint32 m_nDevIn;
qint32 m_nDevOut; qint32 m_nDevOut;
qint32 m_idInt; qint32 m_idInt;
@ -217,6 +221,7 @@ private:
void ba2msg(QByteArray ba, char* message); void ba2msg(QByteArray ba, char* message);
void msgtype(QString t, QLineEdit* tx); void msgtype(QString t, QLineEdit* tx);
void stub(); void stub();
void statusChanged();
}; };
extern void getfile(QString fname, int ntrperiod); extern void getfile(QString fname, int ntrperiod);

View File

@ -39,7 +39,7 @@ WideGraph::WideGraph(QWidget *parent) :
ui->widePlot->setBinsPerPixel(1); ui->widePlot->setBinsPerPixel(1);
m_waterfallAvg = settings.value("WaterfallAvg",5).toInt(); m_waterfallAvg = settings.value("WaterfallAvg",5).toInt();
ui->waterfallAvgSpinBox->setValue(m_waterfallAvg); ui->waterfallAvgSpinBox->setValue(m_waterfallAvg);
m_dialFreq=settings.value("DialFreqkHz",474.000).toDouble(); m_dialFreq=settings.value("DialFreqMHz",14.078).toDouble();
ui->fDialLineEdit->setText(QString::number(m_dialFreq)); ui->fDialLineEdit->setText(QString::number(m_dialFreq));
ui->widePlot->m_bCurrent=settings.value("Current",true).toBool(); ui->widePlot->m_bCurrent=settings.value("Current",true).toBool();
ui->widePlot->m_bCumulative=settings.value("Cumulative",false).toBool(); ui->widePlot->m_bCumulative=settings.value("Cumulative",false).toBool();
@ -53,6 +53,8 @@ WideGraph::WideGraph(QWidget *parent) :
ui->widePlot->setFQSO(m_qsoFreq,true); ui->widePlot->setFQSO(m_qsoFreq,true);
settings.endGroup(); settings.endGroup();
// Change the following to a slot in mainwindow; emit a corresponding
// signal here, instead.
QFile f("wsjtx_qrg.txt"); QFile f("wsjtx_qrg.txt");
if(f.open(QFile::WriteOnly)) { if(f.open(QFile::WriteOnly)) {
QTextStream out(&f); QTextStream out(&f);
@ -83,7 +85,7 @@ void WideGraph::saveSettings()
settings.setValue("PlotWidth",ui->widePlot->plotWidth()); settings.setValue("PlotWidth",ui->widePlot->plotWidth());
settings.setValue("FreqSpan",ui->freqSpanSpinBox->value()); settings.setValue("FreqSpan",ui->freqSpanSpinBox->value());
settings.setValue("WaterfallAvg",ui->waterfallAvgSpinBox->value()); settings.setValue("WaterfallAvg",ui->waterfallAvgSpinBox->value());
settings.setValue("DialFreqkHz",m_dialFreq); settings.setValue("DialFreqMHz",m_dialFreq);
settings.setValue("Current",ui->widePlot->m_bCurrent); settings.setValue("Current",ui->widePlot->m_bCurrent);
settings.setValue("Cumulative",ui->widePlot->m_bCumulative); settings.setValue("Cumulative",ui->widePlot->m_bCumulative);
settings.setValue("JT9Sync",ui->widePlot->m_bJT9Sync); settings.setValue("JT9Sync",ui->widePlot->m_bJT9Sync);
@ -243,15 +245,7 @@ void WideGraph::setPalette(QString palette)
void WideGraph::on_fDialLineEdit_editingFinished() void WideGraph::on_fDialLineEdit_editingFinished()
{ {
m_dialFreq=ui->fDialLineEdit->text().toDouble(); m_dialFreq=ui->fDialLineEdit->text().toDouble();
QFile f("wsjtx_qrg.txt"); emit dialFreqChanged(m_dialFreq);
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() double WideGraph::fGreen()

View File

@ -37,6 +37,7 @@ public:
signals: signals:
void freezeDecode2(int n); void freezeDecode2(int n);
void f11f12(int n); void f11f12(int n);
void dialFreqChanged(double f);
public slots: public slots:
void wideFreezeDecode(int n); void wideFreezeDecode(int n);

View File

@ -1,6 +1,6 @@
[Setup] [Setup]
AppName=wsjtx AppName=wsjtx
AppVerName=wsjtx Version 0.6 r3046 AppVerName=wsjtx Version 0.6 r3047
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
DefaultDirName=c:\wsjtx DefaultDirName=c:\wsjtx
DefaultGroupName=wsjtx DefaultGroupName=wsjtx