mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 10:22:26 -04:00
Add minimal routine to disable Tx after 5 minutes of no mouse movement.
This commit is contained in:
parent
6ba2fb7bf9
commit
aa0d4208ce
@ -929,6 +929,11 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
ui->cbMenus->setChecked(false);
|
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"};
|
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
|
||||||
}
|
}
|
||||||
@ -954,6 +959,22 @@ void MainWindow::initialize_fonts ()
|
|||||||
setDecodedTextFont (m_config.decoded_text_font ());
|
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 ()
|
void MainWindow::splash_done ()
|
||||||
{
|
{
|
||||||
m_splash && m_splash->close ();
|
m_splash && m_splash->close ();
|
||||||
|
@ -442,7 +442,7 @@ private:
|
|||||||
qint32 m_Nslots=5;
|
qint32 m_Nslots=5;
|
||||||
qint32 m_nFoxMsgTimes[5]={0,0,0,0,0};
|
qint32 m_nFoxMsgTimes[5]={0,0,0,0,0};
|
||||||
qint32 m_tAutoOn;
|
qint32 m_tAutoOn;
|
||||||
// qint32 m_maxQSOs;
|
qint32 m_mouseIdleSeconds;
|
||||||
qint32 m_tFoxTx=0;
|
qint32 m_tFoxTx=0;
|
||||||
qint32 m_tFoxTx0=0;
|
qint32 m_tFoxTx0=0;
|
||||||
qint32 m_maxStrikes=3; //Max # of repeats: 3 strikes and you're out
|
qint32 m_maxStrikes=3; //Max # of repeats: 3 strikes and you're out
|
||||||
@ -566,6 +566,9 @@ private:
|
|||||||
QTimer minuteTimer;
|
QTimer minuteTimer;
|
||||||
QTimer splashTimer;
|
QTimer splashTimer;
|
||||||
QTimer p1Timer;
|
QTimer p1Timer;
|
||||||
|
QTimer mouseTimer;
|
||||||
|
|
||||||
|
QPoint mouseLastPos;
|
||||||
|
|
||||||
QString m_path;
|
QString m_path;
|
||||||
QString m_baseCall;
|
QString m_baseCall;
|
||||||
@ -695,6 +698,7 @@ private:
|
|||||||
void cabLog();
|
void cabLog();
|
||||||
void useNextCall();
|
void useNextCall();
|
||||||
void abortQSO();
|
void abortQSO();
|
||||||
|
void mouseTimerTick();
|
||||||
bool isWorked(int itype, QString key, float fMHz=0, QString="");
|
bool isWorked(int itype, QString key, float fMHz=0, QString="");
|
||||||
|
|
||||||
QString save_wave_file (QString const& name
|
QString save_wave_file (QString const& name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user