/***************************************************************************
- * Copyright (C) 2005-2013 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 *
class ToolBarActionProvider;
class UiStyle;
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
# include <windows.h>
#endif
+#ifdef Q_OS_MAC
+#include <Carbon/Carbon.h>
+#endif
class GraphicalUi : public AbstractUi
{
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
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 *);
virtual void disconnectedFromCore();
private:
- static inline GraphicalUi *instance();
+ static GraphicalUi *instance();
- static GraphicalUi *_instance;
static QWidget *_mainWidget;
static QHash<QString, ActionCollection *> _actionCollections;
static ContextMenuActionProvider *_contextMenuActionProvider;
static UiStyle *_uiStyle;
static bool _onAllDesktops;
-#ifdef Q_WS_WIN
+#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; }