Add 'AllButtons' into Qt::MouseButton enum, for use by QML
This allows the QML programmer to set 'acceptedButtons', for a MouseArea, to accept all buttons with a single value. In comparison with OR'ing a long list of Qt::MouseButton values, this is shorter, easier, more clear, and less error-prone. Task-number: QTBUG-24106 Change-Id: I0259969223c0b44b6ce8ae84aed37d20cb77999b Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
This commit is contained in:
parent
193caa4451
commit
389c5f4a52
@ -184,6 +184,7 @@ public:
|
|||||||
ExtraButton22 = 0x01000000,
|
ExtraButton22 = 0x01000000,
|
||||||
ExtraButton23 = 0x02000000,
|
ExtraButton23 = 0x02000000,
|
||||||
ExtraButton24 = 0x04000000,
|
ExtraButton24 = 0x04000000,
|
||||||
|
AllButtons = 0x07ffffff,
|
||||||
MaxMouseButton = ExtraButton24,
|
MaxMouseButton = ExtraButton24,
|
||||||
// 4 high-order bits remain available for future use (0x08000000 through 0x40000000).
|
// 4 high-order bits remain available for future use (0x08000000 through 0x40000000).
|
||||||
MouseButtonMask = 0xffffffff
|
MouseButtonMask = 0xffffffff
|
||||||
|
Loading…
x
Reference in New Issue
Block a user