Better interface for idle timer values
This commit is contained in:
parent
d076eedeb8
commit
65a2411c46
@ -1539,8 +1539,7 @@ void MainWindow::on_the_minute ()
|
|||||||
|
|
||||||
if (m_config.watchdog ())
|
if (m_config.watchdog ())
|
||||||
{
|
{
|
||||||
++m_idleMinutes;
|
incrementIdleTimer();
|
||||||
qDebug() << "idle" << m_idleMinutes << "minutes";
|
|
||||||
update_watchdog_label ();
|
update_watchdog_label ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2655,6 +2654,8 @@ bool MainWindow::eventFilter (QObject * object, QEvent * event)
|
|||||||
// fall through
|
// fall through
|
||||||
case QEvent::MouseButtonPress:
|
case QEvent::MouseButtonPress:
|
||||||
// reset the Tx watchdog
|
// reset the Tx watchdog
|
||||||
|
qDebug() << event;
|
||||||
|
resetIdleTimer();
|
||||||
tx_watchdog (false);
|
tx_watchdog (false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -10162,6 +10163,18 @@ void MainWindow::remove_child_from_event_filter (QObject * target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::resetIdleTimer(){
|
||||||
|
if(m_idleMinutes){
|
||||||
|
m_idleMinutes = 0;
|
||||||
|
qDebug() << "idle" << m_idleMinutes << "minutes";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::incrementIdleTimer(){
|
||||||
|
m_idleMinutes++;
|
||||||
|
qDebug() << "increment idle to" << m_idleMinutes << "minutes";
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::tx_watchdog (bool triggered)
|
void MainWindow::tx_watchdog (bool triggered)
|
||||||
{
|
{
|
||||||
auto prior = m_tx_watchdog;
|
auto prior = m_tx_watchdog;
|
||||||
|
@ -935,6 +935,9 @@ private:
|
|||||||
void add_child_to_event_filter (QObject *);
|
void add_child_to_event_filter (QObject *);
|
||||||
void remove_child_from_event_filter (QObject *);
|
void remove_child_from_event_filter (QObject *);
|
||||||
void setup_status_bar (bool vhf);
|
void setup_status_bar (bool vhf);
|
||||||
|
|
||||||
|
void resetIdleTimer();
|
||||||
|
void incrementIdleTimer();
|
||||||
void tx_watchdog (bool triggered);
|
void tx_watchdog (bool triggered);
|
||||||
qint64 nWidgets(QString t);
|
qint64 nWidgets(QString t);
|
||||||
void displayWidgets(qint64 n);
|
void displayWidgets(qint64 n);
|
||||||
|
Loading…
Reference in New Issue
Block a user