33
35
GraphicalUi(QObject *parent = 0);
37
//! Access global ActionCollections.
38
/** These ActionCollections are associated with the main window, i.e. they contain global
39
* actions (and thus, shortcuts). Widgets providing application-wide shortcuts should
40
* create appropriate Action objects using GraphicalUi::actionCollection(cat)->add\<Action\>().
41
* @param category The category (default: "General")
43
static ActionCollection *actionCollection(const QString &category = "General");
35
45
inline static ContextMenuActionProvider *contextMenuActionProvider();
36
46
inline static ToolBarActionProvider *toolBarActionProvider();
47
inline static UiStyle *uiStyle();
50
//! This is the widget we associate global actions with, typically the main window
51
void setMainWidget(QWidget *);
39
53
void setContextMenuActionProvider(ContextMenuActionProvider *);
40
54
void setToolBarActionProvider(ToolBarActionProvider *);
55
void setUiStyle(UiStyle *);
58
static QWidget *_mainWidget;
59
static QHash<QString, ActionCollection *> _actionCollections;
43
60
static ContextMenuActionProvider *_contextMenuActionProvider;
44
61
static ToolBarActionProvider *_toolBarActionProvider;
62
static UiStyle *_uiStyle;
48
65
ContextMenuActionProvider *GraphicalUi::contextMenuActionProvider() {