X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fgraphicalui.h;h=3b94544099e2ec7313352fa4a3d747dea8181e65;hb=1e40fc6bc04df8f658f677ca5be4c970f150dc10;hp=59d06583ad0984e3581b4171e210e9c08a6d57a7;hpb=99678e189313b168c410fa15cd10cb673b73c8a2;p=quassel.git diff --git a/src/uisupport/graphicalui.h b/src/uisupport/graphicalui.h index 59d06583..3b945440 100644 --- a/src/uisupport/graphicalui.h +++ b/src/uisupport/graphicalui.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,6 +22,7 @@ #define GRAPHICALUI_H_ #include "abstractui.h" +#include "singleton.h" class ActionCollection; class ContextMenuActionProvider; @@ -31,15 +32,15 @@ class UiStyle; #ifdef Q_OS_WIN # include #endif +#ifdef Q_OS_MAC +#include +#endif -class GraphicalUi : public AbstractUi +class GraphicalUi : public AbstractUi, protected Singleton { Q_OBJECT public: - GraphicalUi(QObject *parent = 0); - virtual void init(); - //! 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 @@ -75,6 +76,9 @@ public: static bool isMainWidgetVisible(); protected: + GraphicalUi(QObject *parent = 0); + virtual void init(); + //! This is the widget we associate global actions with, typically the main window void setMainWidget(QWidget *); @@ -106,25 +110,23 @@ protected slots: virtual void disconnectedFromCore(); private: - static inline GraphicalUi *instance(); - - static GraphicalUi *_instance; static QWidget *_mainWidget; static QHash _actionCollections; static ContextMenuActionProvider *_contextMenuActionProvider; static ToolBarActionProvider *_toolBarActionProvider; static UiStyle *_uiStyle; - static bool _onAllDesktops; #ifdef Q_OS_WIN DWORD _dwTickCount; #endif +#ifdef Q_OS_MAC + ProcessSerialNumber _procNum; +#endif }; // inlines -GraphicalUi *GraphicalUi::instance() { return _instance; } ContextMenuActionProvider *GraphicalUi::contextMenuActionProvider() { return _contextMenuActionProvider; } ToolBarActionProvider *GraphicalUi::toolBarActionProvider() { return _toolBarActionProvider; } UiStyle *GraphicalUi::uiStyle() { return _uiStyle; }