Sanitize topic message
[quassel.git] / src / qtui / legacysystemtray.h
index 7a7ba09..196c698 100644 (file)
@@ -1,11 +1,11 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 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        *
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
 #ifndef LEGACYSYSTEMTRAY_H_
 
 #include "systemtray.h"
 
-class LegacySystemTray : public SystemTray {
-  Q_OBJECT
+class LegacySystemTray : public SystemTray
+{
+    Q_OBJECT
 
 public:
-  explicit LegacySystemTray(QWidget *parent);
-  virtual ~LegacySystemTray() {}
-  virtual void init();
+    explicit LegacySystemTray(QWidget *parent);
+    virtual ~LegacySystemTray() {}
+    virtual void init();
 
-  virtual bool isVisible() const;
-  virtual inline bool isSystemTrayAvailable() const;
-  virtual Icon stateIcon() const; // overriden to care about blinkState
+    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);
-  virtual void setVisible(bool visible = true);
-  virtual void showMessage(const QString &title, const QString &message, MessageIcon icon = Information, int msTimeout = 10000, uint notificationId = 0);
-  virtual void closeMessage(uint notificationId);
+    virtual void setState(State state);
+    virtual void setVisible(bool visible = true);
+    virtual void showMessage(const QString &title, const QString &message, MessageIcon icon = Information, int msTimeout = 10000, uint notificationId = 0);
+    virtual void closeMessage(uint notificationId);
 
 protected slots:
 
 protected:
-  virtual void setMode(Mode mode);
+    virtual void setMode(Mode mode);
 
 private slots:
-  void on_blinkTimeout();
-  void on_activated(QSystemTrayIcon::ActivationReason);
-  void on_messageClicked();
+    void on_blinkTimeout();
+    void on_activated(QSystemTrayIcon::ActivationReason);
+    void on_messageClicked();
 
-  void syncLegacyIcon();
+    void syncLegacyIcon();
 
 private:
-  QTimer _blinkTimer;
-  bool _blinkState;
-  uint _lastMessageId;
+    QTimer _blinkTimer;
+    bool _blinkState;
+    uint _lastMessageId;
 
 #ifdef HAVE_KDE
-  KSystemTrayIcon *_trayIcon;
+    KSystemTrayIcon *_trayIcon;
 #else
-  QSystemTrayIcon *_trayIcon;
+    QSystemTrayIcon *_trayIcon;
 #endif
-
 };
 
+
 // inlines
 
-bool LegacySystemTray::isSystemTrayAvailable() const {
-  return mode() == Legacy ? QSystemTrayIcon::isSystemTrayAvailable()
-                          : SystemTray::isSystemTrayAvailable();
+bool LegacySystemTray::isSystemTrayAvailable() const
+{
+    return mode() == Legacy ? QSystemTrayIcon::isSystemTrayAvailable()
+           : SystemTray::isSystemTrayAvailable();
 }
 
+
 #endif /* QT_NO_SYSTEMTRAYICON */
 
 #endif /* LEGACYSYSTEMTRAY_H_ */