/***************************************************************************
-* Copyright (C) 2005-08 by the Quassel Project *
+* Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#ifndef SYSTRAYNOTIFICATIONBACKEND_H_
#define SYSTRAYNOTIFICATIONBACKEND_H_
+#include <QSystemTrayIcon>
+
#include "abstractnotificationbackend.h"
#include "settingspage.h"
public:
SystrayNotificationBackend(QObject *parent = 0);
- ~SystrayNotificationBackend();
void notify(const Notification &);
void close(uint notificationId);
- SettingsPage *configWidget() const;
+ virtual SettingsPage *createConfigWidget() const;
private slots:
void showBubble();
void closeBubble();
- void startAnimation();
- void stopAnimation();
- void blink();
+ void notificationActivated();
+ void notificationActivated(QSystemTrayIcon::ActivationReason);
void animateChanged(const QVariant &);
void showBubbleChanged(const QVariant &);
private:
class ConfigWidget;
- SettingsPage *_configWidget;
bool _showBubble;
bool _animate;
- bool _iconActive;
- QTimer _animationTimer;
QList<Notification> _notifications;
+ uint _activeId;
};
class SystrayNotificationBackend::ConfigWidget : public SettingsPage {