X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fgraphicalui.h;h=269e079c5c529f589b487a687b0acdaf127467d0;hp=140c07fa6e39a291e32af68123950a1a75a92250;hb=b3cf44aa5773bb6a6e0a1ba8d0c1add841281b4b;hpb=8a0d40791b63681ae500f6497a06fdd3f6b085ba diff --git a/src/uisupport/graphicalui.h b/src/uisupport/graphicalui.h index 140c07fa..269e079c 100644 --- a/src/uisupport/graphicalui.h +++ b/src/uisupport/graphicalui.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2010 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,6 @@ class GraphicalUi : public AbstractUi { public: GraphicalUi(QObject *parent = 0); - virtual ~GraphicalUi(); virtual void init(); //! Access global ActionCollections. @@ -46,7 +45,16 @@ public: * create appropriate Action objects using GraphicalUi::actionCollection(cat)->add\(). * @param category The category (default: "General") */ - static ActionCollection *actionCollection(const QString &category = "General"); + static ActionCollection *actionCollection(const QString &category = "General", const QString &translatedCategory = QString()); + static QHash actionCollections(); + + //! Load custom shortcuts from ShortcutSettings + /** @note This method assumes that all configurable actions are defined when being called + */ + static void loadShortcuts(); + + //! Save custom shortcuts to ShortcutSettings + static void saveShortcuts(); inline static ContextMenuActionProvider *contextMenuActionProvider(); inline static ToolBarActionProvider *toolBarActionProvider(); @@ -62,6 +70,9 @@ public: //! Toggle main widget static void toggleMainWidget(); + //! Check if the main widget if (fully, in KDE) visible + static bool isMainWidgetVisible(); + protected: //! This is the widget we associate global actions with, typically the main window void setMainWidget(QWidget *); @@ -71,7 +82,7 @@ protected: * it should be activated or hidden. Without KDE, we need to resort to checking the current state * as Qt knows it, ignoring windows covering it. * @param performToggle If true, toggle the window's state in addition to checking visibility - * @return True, if the window is currently visible + * @return True, if the window is currently *not* visible (needs activation) */ bool checkMainWidgetVisibility(bool performToggle); @@ -90,6 +101,9 @@ protected: virtual bool eventFilter(QObject *obj, QEvent *event); +protected slots: + virtual void disconnectedFromCore(); + private: static inline GraphicalUi *instance();