/***************************************************************************
- * 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 *
#ifndef QT_NO_SYSTEMTRAYICON
-#include <QString>
+# include <QString>
+# include <QSystemTrayIcon>
-#ifdef HAVE_KDE4
-# include <KSystemTrayIcon>
-#else
-# include <QSystemTrayIcon>
-#endif
-
-#include <QTimer>
-
-#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();
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 */