qtui: Use icon names in tray implementations
[quassel.git] / src / qtui / legacysystemtray.h
index 6fec76c..c4af3df 100644 (file)
@@ -1,11 +1,11 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) version 3.                                           *
+ *   This file is free software; you can redistribute it and/or modify     *
+ *   it under the terms of the GNU Library General Public License (LGPL)   *
+ *   as published by the Free Software Foundation; either version 2 of the *
+ *   License, or (at your option) any later version.                       *
  *                                                                         *
  *   This program is distributed in the hope that it will be useful,       *
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
@@ -23,7 +23,7 @@
 
 #ifndef QT_NO_SYSTEMTRAYICON
 
-#ifdef HAVE_KDE
+#ifdef HAVE_KDE4
 #  include <KSystemTrayIcon>
 #else
 #  include <QSystemTrayIcon>
@@ -44,7 +44,6 @@ public:
 
     virtual bool isVisible() const;
     virtual inline bool isSystemTrayAvailable() const;
-    virtual Icon stateIcon() const; // overriden to care about blinkState
 
 public slots:
     virtual void setState(State state);
@@ -57,6 +56,9 @@ protected slots:
 protected:
     virtual void setMode(Mode mode);
 
+private:
+    void updateIcon();
+
 private slots:
     void on_blinkTimeout();
     void on_activated(QSystemTrayIcon::ActivationReason);
@@ -69,7 +71,7 @@ private:
     bool _blinkState;
     uint _lastMessageId;
 
-#ifdef HAVE_KDE
+#ifdef HAVE_KDE4
     KSystemTrayIcon *_trayIcon;
 #else
     QSystemTrayIcon *_trayIcon;