From dd28dd2670938547f9417afdf77888e15b55623c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 14 Nov 2018 11:33:46 -0500 Subject: [PATCH] Remove the Mouse Timer. Make the AutoSeq checkbox sticky, again. --- widgets/mainwindow.cpp | 27 +-------------------------- widgets/mainwindow.h | 5 ----- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 19243df09..e7bfc9f7c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -931,13 +931,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->cbMenus->setChecked(true); ui->cbMenus->setChecked(false); } - - mouseLastPos=QCursor::pos(); - m_mouseIdleSeconds=0; - connect(&mouseTimer, &QTimer::timeout, this, &MainWindow::mouseTimerTick); - mouseTimer.start(1000); - - // this must be the last statement of constructor +// this must be the last statement of constructor if (!m_valid) throw std::runtime_error {"Fatal initialization exception"}; } @@ -962,22 +956,6 @@ void MainWindow::initialize_fonts () setDecodedTextFont (m_config.decoded_text_font ()); } -void MainWindow::mouseTimerTick() -{ - QPoint point = QCursor::pos(); - if(point != mouseLastPos) - m_mouseIdleSeconds = 0; - else - m_mouseIdleSeconds++; - mouseLastPos = point; -//Here we should do what's necessary when mouseIdleSeconds gets too big. -// qDebug() << m_mouseIdleSeconds; - if(ui->cbAutoSeq->isChecked() and m_mouseIdleSeconds>300) { - auto_tx_mode (false); - } -} - - void MainWindow::splash_done () { m_splash && m_splash->close (); @@ -1880,7 +1858,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e) if((e->modifiers() & Qt::ControlModifier) and (e->modifiers() & Qt::ShiftModifier)) { m_bandEdited = true; band_changed(m_freqNominal-2000); -// qDebug() << "Down" << m_freqNominal; } else { n=11; if(e->modifiers() & Qt::ControlModifier) n+=100; @@ -1895,7 +1872,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e) if((e->modifiers() & Qt::ControlModifier) and (e->modifiers() & Qt::ShiftModifier)) { m_bandEdited = true; band_changed(m_freqNominal+2000); -// qDebug() << "Up " << m_freqNominal; } else { n=12; if(e->modifiers() & Qt::ControlModifier) n+=100; @@ -5464,7 +5440,6 @@ void MainWindow::displayWidgets(qint64 n) if(i==32) ui->cbCQonly->setVisible(b); j=j>>1; } - if(!ui->cbAutoSeq->isVisible()) ui->cbAutoSeq->setChecked(false); b=SpecOp::EU_VHF==m_config.special_op_id() or (SpecOp::RTTY==m_config.special_op_id() and (m_config.RTTY_Exchange()=="#" or m_config.RTTY_Exchange()=="DX")); ui->sbSerialNumber->setVisible(b); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 2ef380e74..e5b9de9a8 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -446,7 +446,6 @@ private: qint32 m_Nslots=5; qint32 m_nFoxMsgTimes[5]={0,0,0,0,0}; qint32 m_tAutoOn; - qint32 m_mouseIdleSeconds; qint32 m_tFoxTx=0; qint32 m_tFoxTx0=0; qint32 m_maxStrikes=3; //Max # of repeats: 3 strikes and you're out @@ -570,9 +569,6 @@ private: QTimer minuteTimer; QTimer splashTimer; QTimer p1Timer; - QTimer mouseTimer; - - QPoint mouseLastPos; QString m_path; QString m_baseCall; @@ -701,7 +697,6 @@ private: void CQTxFreq(); void useNextCall(); void abortQSO(); - void mouseTimerTick(); bool isWorked(int itype, QString key, float fMHz=0, QString=""); QString save_wave_file (QString const& name