#include "mainwidget.hpp"
#include "settingsDialog.hpp"
#include "connection.hpp"
+#include "devstate.hpp"
+#include "settings.hpp"
// --------------------------------------------------
connect (_traffic, SIGNAL (updated ()), SLOT (trafficUpdated ()));
connect (_timer, SIGNAL (timeout ()), SLOT (updateData ()));
+ connect (DeviceState::instance (), SIGNAL (lockChanged (bool)), SLOT (deviceLockChanged (bool)));
updateData ();
}
if (todo == updateAction)
_traffic->update ();
}
+
+
+void MainWidget::deviceLockChanged (bool locked)
+{
+ if (!_settings->check (Settings::C_UpdateWhenLocked))
+ if (!locked)
+ updateData ();
+}