X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtui.h;h=8b223af04251dc46cfd35b64a7bd436e1c67c345;hp=1e2144c2eeef69fc92f2c46cce7ad7f52daf9db6;hb=6245a8d29e893eaff25a12b0be2f47b64f0f7bcd;hpb=ab16c77fe03b73a863d9b52b11919bcbac903f58 diff --git a/src/qtui/qtui.h b/src/qtui/qtui.h index 1e2144c2..8b223af0 100644 --- a/src/qtui/qtui.h +++ b/src/qtui/qtui.h @@ -25,11 +25,11 @@ #include "abstractnotificationbackend.h" #include "mainwin.h" +#include "qtuistyle.h" class MainWin; class MessageModel; class QtUiMessageProcessor; -class QtUiStyle; //! This class encapsulates Quassel's Qt-based GUI. /** This is basically a wrapper around MainWin, which is necessary because we cannot derive MainWin @@ -49,14 +49,13 @@ public: inline static QtUiStyle *style(); inline static MainWin *mainWindow(); - /* Notifications */ static void registerNotificationBackend(AbstractNotificationBackend *); static void unregisterNotificationBackend(AbstractNotificationBackend *); static void unregisterAllNotificationBackends(); static const QList ¬ificationBackends(); - static uint invokeNotification(BufferId bufId, const QString &sender, const QString &text); + static uint invokeNotification(BufferId bufId, AbstractNotificationBackend::NotificationType type, const QString &sender, const QString &text); static void closeNotification(uint notificationId); static void closeNotifications(BufferId bufferId = BufferId()); static const QList &activeNotifications(); @@ -67,18 +66,17 @@ public slots: protected slots: void connectedToCore(); void disconnectedFromCore(); - void notificationActivated(); + void notificationActivated(uint notificationId); private: static QPointer _instance; static QPointer _mainWin; - static QtUiStyle *_style; static QList _notificationBackends; static QList _notifications; }; QtUi *QtUi::instance() { return _instance ? _instance.data() : new QtUi(); } -QtUiStyle *QtUi::style() { return _style; } +QtUiStyle *QtUi::style() { return qobject_cast(uiStyle()); } MainWin *QtUi::mainWindow() { return _mainWin; } #endif