#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 ();
}
_light->setColor (info.color ());
if (_settings->check (Settings::C_ShowRank)) {
- data.append (QString::number (info.level ()));
data.append (tr ("%n point(s)", "", info.level ()));
first = false;
}
if (todo == updateAction)
_traffic->update ();
}
+
+
+void MainWidget::deviceLockChanged (bool locked)
+{
+ if (!_settings->check (Settings::C_UpdateWhenLocked))
+ if (!locked)
+ updateData ();
+}