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_p.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_P_H\r
25 #define QXTAPPLICATION_P_H\r
26 \r
27 #include <QPair>\r
28 #include <QList>\r
29 #include <QMultiHash>\r
30 #include "qxtpimpl.h"\r
31 #include "qxtapplication.h"\r
32 #include "qxtnativeeventfilter.h"\r
33 \r
34 typedef QPair<uint, uint> Identifier;\r
35 typedef QList<Identifier> Identifiers;\r
36 typedef QPair<QWidget*, const char*> Receiver;\r
37 typedef QList<Receiver> Receivers;\r
38 \r
39 class QxtApplicationPrivate : public QxtPrivate<QxtApplication>\r
40 {\r
41 public:\r
42         QXT_DECLARE_PUBLIC(QxtApplication);\r
43         \r
44         uint nativeKeycode(Qt::Key key) const;\r
45         uint nativeModifiers(Qt::KeyboardModifiers modifiers) const;\r
46         \r
47         bool registerHotKey(uint modifiers, uint keycode, QWidget* receiver);\r
48         bool unregisterHotKey(uint modifiers, uint keycode, QWidget* receiver);\r
49         void activateHotKey(uint modifiers, uint keycode) const;\r
50 \r
51         QMultiHash<Identifier, Receiver> hotkeys;\r
52         QList<QxtNativeEventFilter*> nativeFilters;\r
53 };\r
54 \r
55 inline uint qHash(const QPair<uint, uint>& value)\r
56 {\r
57     return qHash(value.first) ^ qHash(value.second);\r
58 }\r
59 \r
60 #endif // QXTAPPLICATION_P_H\r