Ok, the long awaited config wizard is here (at least in a very basic state). There...
[quassel.git] / src / contrib / libqxt-2007-10-24 / src / gui / qxtapplication.h
1 /****************************************************************************\r
2 **\r
3 ** Copyright (C) Qxt Foundation. Some rights reserved.\r
4 **\r
5 ** This file is part of the QxtGui module of the Qt eXTension library\r
6 **\r
7 ** This library is free software; you can redistribute it and/or modify it\r
8 ** under the terms of th Common Public License, version 1.0, as published by\r
9 ** IBM.\r
10 **\r
11 ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY\r
12 ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY\r
13 ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR\r
14 ** FITNESS FOR A PARTICULAR PURPOSE.\r
15 **\r
16 ** You should have received a copy of the CPL along with this file.\r
17 ** See the LICENSE file and the cpl1.0.txt file included with the source\r
18 ** distribution for more information. If you did not receive a copy of the\r
19 ** license, contact the Qxt Foundation.\r
20 **\r
21 ** <http://libqxt.sourceforge.net>  <foundation@libqxt.org>\r
22 **\r
23 ****************************************************************************/\r
24 #ifndef QXTAPPLICATION_H\r
25 #define QXTAPPLICATION_H\r
26 \r
27 #include <QApplication>\r
28 #include "qxtglobal.h"\r
29 #include "qxtpimpl.h"\r
30 \r
31 class QxtApplicationPrivate;\r
32 class QxtNativeEventFilter;\r
33 \r
34 #define qxtApp (QxtApplication::instance())\r
35 \r
36 class QXT_GUI_EXPORT QxtApplication : public QApplication\r
37 {\r
38     Q_OBJECT\r
39     QXT_DECLARE_PRIVATE(QxtApplication);\r
40 \r
41 public:\r
42     QxtApplication(int& argc, char** argv);\r
43     QxtApplication(int& argc, char** argv, bool GUIenabled);\r
44     QxtApplication(int& argc, char** argv, Type type);\r
45 #if defined(Q_WS_X11)\r
46     QxtApplication(Display* display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);\r
47     QxtApplication(Display* display, int& argc, char** argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);\r
48 #endif // Q_WS_X11\r
49     virtual ~QxtApplication();\r
50 \r
51     void installNativeEventFilter(QxtNativeEventFilter* filter);\r
52     void removeNativeEventFilter(QxtNativeEventFilter* filter);\r
53 \r
54 #ifndef QXT_DOXYGEN_RUN\r
55 #if defined(Q_WS_X11)\r
56     virtual bool x11EventFilter(XEvent* event);\r
57 #elif defined(Q_WS_WIN)\r
58     virtual bool winEventFilter(MSG* msg, long* result);\r
59 #elif defined(Q_WS_MAC)\r
60     virtual bool macEventFilter(EventHandlerCallRef caller, EventRef event);\r
61 #endif // Q_WS_*\r
62 #endif // QXT_DOXYGEN_RUN\r
63 \r
64     bool addHotKey(Qt::KeyboardModifiers modifiers, Qt::Key key, QWidget* receiver, const char* member);\r
65     bool removeHotKey(Qt::KeyboardModifiers modifiers, Qt::Key key, QWidget* receiver, const char* member);\r
66 \r
67     inline static QxtApplication* instance()\r
68     {\r
69         return static_cast<QxtApplication*>(QApplication::instance());\r
70     }\r
71 };\r
72 \r
73 #endif // QXTAPPLICATION_H\r