From a329fc574b4f413050fa0210915af2ac97708d0a Mon Sep 17 00:00:00 2001 From: Rick Stockton Date: Wed, 9 Nov 2011 21:02:18 -0800 Subject: Support 31 mouse buttons (with platform plugins xcb and xlib). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit includes changes for mouse button support within the XCB and XLIB platform plugins. Support in other platform plugins will be added in the future. The namespace update is prerequisite to compile the the Plugins, and the update in qguiapplication.cpp is required for the enhancements to actually work. Task-number: QTBUG-22642 Change-Id: Ie18fca3b9c86d0b6abbf2103a4f8582e6ce83e7d Reviewed-by: Thiago Macieira Reviewed-by: Samuel Rødal --- src/corelib/global/qnamespace.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/corelib/global/qnamespace.h') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index ce842f36a3..a6e649ee0b 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -155,8 +155,37 @@ public: MidButton = 0x00000004, // ### Qt 5: remove me MiddleButton = MidButton, XButton1 = 0x00000008, + BackButton = XButton1, + ExtraButton1 = XButton1, XButton2 = 0x00000010, - MouseButtonMask = 0x000000ff + ForwardButton = XButton2, + ExtraButton2 = XButton2, + TaskButton = 0x00000020, + ExtraButton3 = TaskButton, + ExtraButton4 = 0x00000040, + ExtraButton5 = 0x00000080, + ExtraButton6 = 0x00000100, + ExtraButton7 = 0x00000200, + ExtraButton8 = 0x00000400, + ExtraButton9 = 0x00000800, + ExtraButton10 = 0x00001000, + ExtraButton11 = 0x00002000, + ExtraButton12 = 0x00004000, + ExtraButton13 = 0x00008000, + ExtraButton14 = 0x00010000, + ExtraButton15 = 0x00020000, + ExtraButton16 = 0x00040000, + ExtraButton17 = 0x00080000, + ExtraButton18 = 0x00100000, + ExtraButton19 = 0x00200000, + ExtraButton20 = 0x00400000, + ExtraButton21 = 0x00800000, + ExtraButton22 = 0x01000000, + ExtraButton23 = 0x02000000, + ExtraButton24 = 0x04000000, + MaxMouseButton = ExtraButton24, + // 4 high-order bits remain available for future use (0x08000000 through 0x40000000). + MouseButtonMask = 0xffffffff, }; Q_DECLARE_FLAGS(MouseButtons, MouseButton) -- cgit v1.2.3