~ubuntu-branches/debian/experimental/quassel/experimental

« back to all changes in this revision

Viewing changes to src/uisupport/graphicalui.h

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Mueller
  • Date: 2009-10-05 23:13:06 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091005231306-ngiajv5r0gbxjfoq
Tags: 0.5.0~rc2-1
* New upstream release (rc2)
* Make puiparts happy (closes: #538182)
* manageusers.py added (closes: #549296)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include "abstractui.h"
25
25
 
 
26
class ActionCollection;
26
27
class ContextMenuActionProvider;
27
28
class ToolBarActionProvider;
 
29
class UiStyle;
28
30
 
29
31
class GraphicalUi : public AbstractUi {
30
32
  Q_OBJECT
32
34
public:
33
35
  GraphicalUi(QObject *parent = 0);
34
36
 
 
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")
 
42
  */
 
43
  static ActionCollection *actionCollection(const QString &category = "General");
 
44
 
35
45
  inline static ContextMenuActionProvider *contextMenuActionProvider();
36
46
  inline static ToolBarActionProvider *toolBarActionProvider();
 
47
  inline static UiStyle *uiStyle();
37
48
 
38
49
protected:
 
50
  //! This is the widget we associate global actions with, typically the main window
 
51
  void setMainWidget(QWidget *);
 
52
 
39
53
  void setContextMenuActionProvider(ContextMenuActionProvider *);
40
54
  void setToolBarActionProvider(ToolBarActionProvider *);
 
55
  void setUiStyle(UiStyle *);
41
56
 
42
57
private:
 
58
  static QWidget *_mainWidget;
 
59
  static QHash<QString, ActionCollection *> _actionCollections;
43
60
  static ContextMenuActionProvider *_contextMenuActionProvider;
44
61
  static ToolBarActionProvider *_toolBarActionProvider;
45
 
 
 
62
  static UiStyle *_uiStyle;
46
63
};
47
64
 
48
65
ContextMenuActionProvider *GraphicalUi::contextMenuActionProvider() {
53
70
  return _toolBarActionProvider;
54
71
}
55
72
 
 
73
UiStyle *GraphicalUi::uiStyle() {
 
74
  return _uiStyle;
 
75
}
 
76
 
56
77
#endif