From 37e78f1afad3ab97abd8fe6cd4edc970d6ae58e6 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 6 Mar 2013 16:37:28 +0000 Subject: [PATCH] Change selection of Current/Cumulative/JT9Sync to a combobox. Don't change frequency settings on double-click on decoded text, if the first call is MyCall. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3038 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 4 +++- widegraph.cpp | 37 +++++++++++++------------------------ widegraph.h | 4 +--- widegraph.ui | 40 +++++++++++++++++++--------------------- wsjtx.iss | 2 +- 5 files changed, 37 insertions(+), 50 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 7cc4d7203..7a2d8ddc1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1267,7 +1267,9 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl) QString t3=t.mid(i1,i4); QStringList t4=t3.split(" ",QString::SkipEmptyParts); if(t4.length() <7) return; //Skip the rest if no decoded text - if(!shift) { //Don't change freqs if Shift key down + QString firstcall=t4.at(6); + //Don't change freqs if Shift key down or a station is calling me. + if(!shift and firstcall!=m_myCall) { int nfreq=int(t4.at(4).toFloat()); ui->TxFreqSpinBox->setValue(nfreq); g_pWideGraph->setQSOfreq(nfreq); diff --git a/widegraph.cpp b/widegraph.cpp index 416a9ad41..01d9a6d1a 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -44,9 +44,9 @@ WideGraph::WideGraph(QWidget *parent) : ui->widePlot->m_bCurrent=settings.value("Current",true).toBool(); ui->widePlot->m_bCumulative=settings.value("Cumulative",false).toBool(); ui->widePlot->m_bJT9Sync=settings.value("JT9Sync",false).toBool(); - ui->rbCurrent->setChecked(ui->widePlot->m_bCurrent); - ui->rbCumulative->setChecked(ui->widePlot->m_bCumulative); - ui->rbJT9Sync->setChecked(ui->widePlot->m_bJT9Sync); + if(ui->widePlot->m_bCurrent) ui->spec2dComboBox->setCurrentIndex(0); + if(ui->widePlot->m_bCumulative) ui->spec2dComboBox->setCurrentIndex(1); + if(ui->widePlot->m_bJT9Sync) ui->spec2dComboBox->setCurrentIndex(2); int nbpp=settings.value("BinsPerPixel",1).toInt(); ui->widePlot->setBinsPerPixel(nbpp); m_qsoFreq=settings.value("QSOfreq",1010).toInt(); @@ -252,28 +252,17 @@ void WideGraph::setPeriod(int ntrperiod, int nsps) ui->widePlot->setNsps(ntrperiod, nsps); } -void WideGraph::on_rbCurrent_clicked() -{ - ui->widePlot->m_bCurrent=true; - ui->widePlot->m_bCumulative=false; - ui->widePlot->m_bJT9Sync=false; -} - -void WideGraph::on_rbCumulative_clicked() -{ - ui->widePlot->m_bCurrent=false; - ui->widePlot->m_bCumulative=true; - ui->widePlot->m_bJT9Sync=false; -} - -void WideGraph::on_rbJT9Sync_clicked() -{ - ui->widePlot->m_bCurrent=false; - ui->widePlot->m_bCumulative=false; - ui->widePlot->m_bJT9Sync=true; -} - void WideGraph::setTxFreq(int n) { ui->widePlot->setTxFreq(n); } + +void WideGraph::on_spec2dComboBox_currentIndexChanged(const QString &arg1) +{ + ui->widePlot->m_bCurrent=false; + ui->widePlot->m_bCumulative=false; + ui->widePlot->m_bJT9Sync=false; + if(arg1=="Current") ui->widePlot->m_bCurrent=true; + if(arg1=="Cumulative") ui->widePlot->m_bCumulative=true; + if(arg1=="JT9 Sync") ui->widePlot->m_bJT9Sync=true; +} diff --git a/widegraph.h b/widegraph.h index 5289c74e6..fd71402bb 100644 --- a/widegraph.h +++ b/widegraph.h @@ -50,9 +50,7 @@ private slots: void on_zeroSpinBox_valueChanged(int arg1); void on_gainSpinBox_valueChanged(int arg1); void on_fDialLineEdit_editingFinished(); - void on_rbCurrent_clicked(); - void on_rbCumulative_clicked(); - void on_rbJT9Sync_clicked(); + void on_spec2dComboBox_currentIndexChanged(const QString &arg1); private: qint32 m_waterfallAvg; diff --git a/widegraph.ui b/widegraph.ui index c7e179fd5..8f1e7d2d1 100644 --- a/widegraph.ui +++ b/widegraph.ui @@ -6,7 +6,7 @@ 0 0 - 1178 + 811 326 @@ -258,27 +258,25 @@ - - - Current - - - true - - - - - - - Cumulative - - - - - - - JT9 Sync + + + 2 + + + Current + + + + + Cumulative + + + + + JT9 Sync + + diff --git a/wsjtx.iss b/wsjtx.iss index 3be327694..fedbfb010 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,6 +1,6 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 0.5 r3032 +AppVerName=wsjtx Version 0.5 r3037 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx DefaultGroupName=wsjtx