X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Flegacysystemtray.h;h=7f1b66c501de73afd1cc7af42082cd3bb986e718;hb=65f099cba1e42e6acb0f64cb6327083a26f10f34;hp=15134b18c25250dbbc4a8c9f67c59444f652b6ba;hpb=39dffd095bb5dbca49199d2173438c7f90c4e6fa;p=quassel.git diff --git a/src/qtui/legacysystemtray.h b/src/qtui/legacysystemtray.h index 15134b18..7f1b66c5 100644 --- a/src/qtui/legacysystemtray.h +++ b/src/qtui/legacysystemtray.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This file is free software; you can redistribute it and/or modify * @@ -22,37 +22,32 @@ #ifndef QT_NO_SYSTEMTRAYICON -#include +# include +# include -#ifdef HAVE_KDE4 -# include -#else -# include -#endif - -#include - -#include "systemtray.h" +# include "systemtray.h" class LegacySystemTray : public SystemTray { Q_OBJECT public: - explicit LegacySystemTray(QWidget *parent); + explicit LegacySystemTray(QWidget* parent); bool isSystemTrayAvailable() const override; public slots: - void showMessage(const QString &title, const QString &message, MessageIcon icon = Information, int msTimeout = 10000, uint notificationId = 0) override; + void showMessage(const QString& title, + const QString& message, + MessageIcon icon = Information, + int msTimeout = 10000, + uint notificationId = 0) override; void closeMessage(uint notificationId) override; private slots: void onModeChanged(Mode mode); - void onStateChanged(State state); void onVisibilityChanged(bool isVisible); - void onBlinkTimeout(); void onActivated(QSystemTrayIcon::ActivationReason); void onMessageClicked(); @@ -60,21 +55,9 @@ private slots: void updateToolTip(); private: - QTimer _blinkTimer; - bool _blinkState; - uint _lastMessageId; + uint _lastMessageId{0}; -#ifdef HAVE_KDE4 - KSystemTrayIcon *_trayIcon; -#else - QSystemTrayIcon *_trayIcon; -#endif + QSystemTrayIcon* _trayIcon; }; - -// inlines - - - - #endif /* QT_NO_SYSTEMTRAYICON */