X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsnorenotificationbackend.h;h=e0abdf7f49c0558414fe98546ea37e92240ec31d;hb=c65cdada4836f01fe920b09c7fc861cb70c09ac7;hp=ef3c1af0324d8d9d5313eef1a1540bc2d303deb0;hpb=a43f68a84621d11b61f0e712890a5feb76939553;p=quassel.git diff --git a/src/qtui/snorenotificationbackend.h b/src/qtui/snorenotificationbackend.h index ef3c1af0..e0abdf7f 100644 --- a/src/qtui/snorenotificationbackend.h +++ b/src/qtui/snorenotificationbackend.h @@ -27,13 +27,10 @@ #include "ui_snorentificationconfigwidget.h" -namespace Snore{ -class SnoreCore; -class Icon; -} -class SystrayNotificationBackend; +#include +#include -#include +class SystrayNotificationBackend; class SnoreNotificationBackend : public AbstractNotificationBackend { Q_OBJECT @@ -44,48 +41,44 @@ public: void notify(const Notification &); void close(uint notificationId); - virtual SettingsPage *createConfigWidget()const; + virtual SettingsPage *createConfigWidget() const; signals: void activated(uint notificationId = 0); public slots: void actionInvoked(Snore::Notification); + private slots: - void backendChanged(const QVariant &); - void timeoutChanged(const QVariant &); + void setTraybackend(const QVariant &b); private: + class ConfigWidget; - SystrayNotificationBackend * m_systrayBackend; - Snore::SnoreCore *m_snore; - QHash m_notificationIds; +#ifndef HAVE_KDE + SystrayNotificationBackend * m_systrayBackend = nullptr; +#endif + QHash m_notificationIds; Snore::Icon m_icon; - int m_timeout; + Snore::Application m_application; + Snore::Alert m_alert; }; class SnoreNotificationBackend::ConfigWidget : public SettingsPage { Q_OBJECT public: - ConfigWidget(Snore::SnoreCore *snore,QWidget *parent = 0); - void save(); - void load(); + ConfigWidget(QWidget *parent = 0); + bool hasDefaults() const; void defaults(); - + void load(); + void save(); private slots: - void backendChanged(const QString&); - void timeoutChanged(int); + void useSnnoreChanged(bool); private: Ui::SnoreNotificationConfigWidget ui; - Snore::SnoreCore *m_snore; - - // QSpinBox *timeoutBox; - - // bool enabled; - // int timeout; }; #endif