X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtui.h;h=4baded8985efcc69ebdd016c75e710e5b98949ec;hp=1fe1114c0c31dcc3ad9264f5af70d65e64c48810;hb=114f8a14b8bc82669ffda0599ce30fc299be9396;hpb=ed2415135359b4f8a3f75f2634e028500c08c1fe diff --git a/src/qtui/qtui.h b/src/qtui/qtui.h index 1fe1114c..4baded89 100644 --- a/src/qtui/qtui.h +++ b/src/qtui/qtui.h @@ -48,12 +48,13 @@ 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 */ @@ -75,13 +76,12 @@ protected slots: private: static MainWin *_mainWin; - static ActionCollection *_actionCollection; + static QHash _actionCollections; static QtUiStyle *_style; static QList _notificationBackends; static QList _notifications; }; -ActionCollection *QtUi::actionCollection() { return _actionCollection; } QtUiStyle *QtUi::style() { return _style; } MainWin *QtUi::mainWindow() { return _mainWin; }