Temporary updates... must still improve the Tune-button logic.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3194 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-04-17 15:53:43 +00:00
parent 8feedd22a2
commit 51265e1adf
2 changed files with 23 additions and 18 deletions

View File

@ -124,6 +124,11 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
logQSOTimer->setSingleShot(true); logQSOTimer->setSingleShot(true);
connect(logQSOTimer, SIGNAL(timeout()), this, SLOT(on_logQSOButton_clicked())); connect(logQSOTimer, SIGNAL(timeout()), this, SLOT(on_logQSOButton_clicked()));
tuneButtonTimer= new QTimer(this);
tuneButtonTimer->setSingleShot(true);
connect(tuneButtonTimer, SIGNAL(timeout()), this,
SLOT(on_stopTxButton_clicked()));
killFileTimer = new QTimer(this); killFileTimer = new QTimer(this);
killFileTimer->setSingleShot(true); killFileTimer->setSingleShot(true);
connect(killFileTimer, SIGNAL(timeout()), this, SLOT(killFile())); connect(killFileTimer, SIGNAL(timeout()), this, SLOT(killFile()));
@ -723,14 +728,6 @@ void MainWindow::on_autoButton_clicked() //Auto
} }
} }
void MainWindow::on_stopTxButton_clicked() //Stop Tx
{
if(m_tune) on_tuneButton_clicked();
if(m_auto) on_autoButton_clicked();
btxok=false;
m_repeatMsg=0;
}
void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
{ {
int n; int n;
@ -1667,7 +1664,6 @@ void MainWindow::startTx2()
soundInThread.setMonitoring(false); soundInThread.setMonitoring(false);
btxok=true; btxok=true;
m_transmitting=true; m_transmitting=true;
ui->tuneButton->setEnabled(true);
} }
} }
@ -2563,15 +2559,24 @@ void MainWindow::on_actionTx2QSO_triggered(bool checked)
void MainWindow::on_tuneButton_clicked() void MainWindow::on_tuneButton_clicked()
{ {
m_tune=!m_tune;
m_repeatMsg=0;
soundOutThread.setTune(m_tune);
if(m_tune) { if(m_tune) {
ui->tuneButton->setStyleSheet(m_pbTune_style); m_tune=false;
ui->tuneButton->setEnabled(false); tuneButtonTimer->start(1000);
} else { } else {
btxok=false; m_tune=true;
ui->tuneButton->setStyleSheet(""); soundOutThread.setTune(m_tune);
on_monitorButton_clicked(); m_repeatMsg=0;
ui->tuneButton->setStyleSheet(m_pbTune_style);
} }
} }
void MainWindow::on_stopTxButton_clicked() //Stop Tx
{
if(m_tune) {
on_tuneButton_clicked();
}
if(m_auto) on_autoButton_clicked();
btxok=false;
m_repeatMsg=0;
ui->tuneButton->setStyleSheet("");
}

View File

@ -277,7 +277,7 @@ private:
QTimer* ptt0Timer; //StopTx delay QTimer* ptt0Timer; //StopTx delay
QTimer* logQSOTimer; QTimer* logQSOTimer;
QTimer* killFileTimer; QTimer* killFileTimer;
QTimer* tuneButtonTimer;
QString m_path; QString m_path;
QString m_pbdecoding_style1; QString m_pbdecoding_style1;