X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtui.h;h=4baded8985efcc69ebdd016c75e710e5b98949ec;hp=db06409c3651306bae5c7c3cd4f982f8ecc831f2;hb=9ce9c0ab3ac6f4bda4e3a70bf13a9c07d2debfe6;hpb=011d2825dd89d2f93a72a49748581b16cc9bdb50 diff --git a/src/qtui/qtui.h b/src/qtui/qtui.h index db06409c..4baded89 100644 --- a/src/qtui/qtui.h +++ b/src/qtui/qtui.h @@ -48,19 +48,20 @@ public: inline static QtUiStyle *style(); inline static MainWin *mainWindow(); - //! Access the global ActionCollection. - /** This ActionCollection is associated with the main window, i.e. it contains global + //! Access global ActionCollections. + /** These ActionCollections are associated with the main window, i.e. they contain global * actions (and thus, shortcuts). Widgets providing application-wide shortcuts should - * create appropriate Action objects using QtUi::actionCollection()->add\(). + * create appropriate Action objects using QtUi::actionCollection(cat)->add\(). + * @param category The category (default: "General") */ - inline static ActionCollection *actionCollection(); + static ActionCollection *actionCollection(const QString &category = "General"); /* Notifications */ static void registerNotificationBackend(AbstractNotificationBackend *); static void unregisterNotificationBackend(AbstractNotificationBackend *); static void unregisterAllNotificationBackends(); - static const QSet ¬ificationBackends(); + static const QList ¬ificationBackends(); static uint invokeNotification(BufferId bufId, const QString &sender, const QString &text); static void closeNotification(uint notificationId); static void closeNotifications(BufferId bufferId = BufferId()); @@ -75,13 +76,12 @@ protected slots: private: static MainWin *_mainWin; - static ActionCollection *_actionCollection; + static QHash _actionCollections; static QtUiStyle *_style; - static QSet _notificationBackends; + static QList _notificationBackends; static QList _notifications; }; -ActionCollection *QtUi::actionCollection() { return _actionCollection; } QtUiStyle *QtUi::style() { return _style; } MainWin *QtUi::mainWindow() { return _mainWin; }