+}
+
+
+void LegacySystemTray::setState(State state_)
+{
+ State oldstate = state();
+ SystemTray::setState(state_);
+ if (oldstate != state()) {
+ if (state() == NeedsAttention && mode() == Legacy && animationEnabled())
+ _blinkTimer.start();
+ else {
+ _blinkTimer.stop();
+ _blinkState = false;
+ }
+ }
+ if (mode() == Legacy)
+ _trayIcon->setIcon(stateIcon());
+}
+
+
+QIcon LegacySystemTray::stateIcon() const
+{
+ if (mode() == Legacy && state() == NeedsAttention && !_blinkState)
+ return SystemTray::stateIcon(Active);
+ return SystemTray::stateIcon();
+}
+
+
+void LegacySystemTray::on_blinkTimeout()
+{
+ _blinkState = !_blinkState;