TxFreq tracks fQSO unless CTRL is held down.

Red marker for TxFreq.
Max Tol = 500.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2763 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor
2012-11-23 16:05:50 +00:00
parent 35fe0a92c2
commit 7a43d28e68
7 changed files with 67 additions and 23 deletions
+30 -15
View File
@@ -164,6 +164,7 @@ MainWindow::MainWindow(QWidget *parent) :
border-color: black; min-width: 5em; padding: 3px;}";
genStdMsgs("-30");
on_actionWide_Waterfall_triggered(); //###
g_pWideGraph->setTxFreq(m_txFreq);
if(m_mode=="JT9-1") on_actionJT9_1_triggered();
if(m_mode=="JT9-2") on_actionJT9_2_triggered();
if(m_mode=="JT9-5") on_actionJT9_5_triggered();
@@ -189,7 +190,7 @@ MainWindow::MainWindow(QWidget *parent) :
soundInThread.setMonitoring(m_monitoring);
m_diskData=false;
g_pWideGraph->setTol(m_tol);
static int ntol[] = {1,2,5,10,20,50,100,200,500,1000};
static int ntol[] = {1,2,5,10,20,50,100,200,500};
for (int i=0; i<10; i++) {
if(ntol[i]==m_tol) ui->tolSpinBox->setValue(i);
}
@@ -508,6 +509,7 @@ void MainWindow::on_stopTxButton_clicked() //Stop Tx
void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
{
int n;
switch(e->key())
{
case Qt::Key_F3:
@@ -526,20 +528,14 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
}
break;
case Qt::Key_F11:
if(e->modifiers() & Qt::ShiftModifier) {
} else {
int n=g_pWideGraph->QSOfreq();
n--;
g_pWideGraph->setQSOfreq(n);
}
n=11;
if(e->modifiers() & Qt::ControlModifier) n+=100;
bumpFqso(n);
break;
case Qt::Key_F12:
if(e->modifiers() & Qt::ShiftModifier) {
} else {
int n=g_pWideGraph->QSOfreq();
n++;
g_pWideGraph->setQSOfreq(n);
}
n=12;
if(e->modifiers() & Qt::ControlModifier) n+=100;
bumpFqso(n);
break;
case Qt::Key_G:
if(e->modifiers() & Qt::AltModifier) {
@@ -555,6 +551,22 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
}
}
void MainWindow::bumpFqso(int n) //bumpFqso()
{
if((n%100)==11) {
int i=g_pWideGraph->QSOfreq();
i--;
g_pWideGraph->setQSOfreq(i);
if(n<100) g_pWideGraph->setTxFreq(i);
}
if((n%100)==12) {
int i=g_pWideGraph->QSOfreq();
i++;
g_pWideGraph->setQSOfreq(i);
if(n<100) g_pWideGraph->setTxFreq(i);
}
}
bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter()
{
if (event->type() == QEvent::KeyPress) {
@@ -601,7 +613,7 @@ void MainWindow::createStatusBar() //createStatusBar
void MainWindow::on_tolSpinBox_valueChanged(int i) //tolSpinBox
{
static int ntol[] = {1,2,5,10,20,50,100,200,500,1000};
static int ntol[] = {1,2,5,10,20,50,100,200,500};
m_tol=ntol[i];
g_pWideGraph->setTol(m_tol);
ui->labTol1->setText(QString::number(ntol[i]));
@@ -668,6 +680,8 @@ void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
g_pWideGraph->setWindowFlags(flags);
connect(g_pWideGraph, SIGNAL(freezeDecode2(int)),this,
SLOT(freezeDecode(int)));
connect(g_pWideGraph, SIGNAL(f11f12(int)),this,
SLOT(bumpFqso(int)));
}
g_pWideGraph->show();
}
@@ -852,7 +866,7 @@ void MainWindow::on_DecodeButton_clicked() //Decode request
void MainWindow::freezeDecode(int n) //freezeDecode()
{
static int ntol[] = {1,2,5,10,20,50,100,200,500,1000};
static int ntol[] = {1,2,5,10,20,50,100,200,500};
if(!m_decoderBusy) {
jt9com_.newdat=0;
jt9com_.nagain=1;
@@ -1690,6 +1704,7 @@ void MainWindow::on_NBslider_valueChanged(int n)
void MainWindow::on_TxFreqSpinBox_valueChanged(int n)
{
m_txFreq=n;
if(g_pWideGraph!=NULL) g_pWideGraph->setTxFreq(n);
soundOutThread.setTxFreq(n);
}