[Qt5-feedback] X11 mouse buttons in qt4, qt5, and KDE: please, PLEASE review this design.
Иван Комиссаров
abbapoh at gmail.com
Thu Jul 28 17:05:21 CEST 2011
I think it is out of scope:)
We can support _standard_ mouse (with no more than 32 buttons), but this number is reduced to support only _standard_ buttons (like right/left, wheel, back/forward, etc) and can be extended later (second wheel button for example:))
But anything beyond standard buttons should not be supported in this enum; we can use int/list of ints for non-standard buttons (or just not support them at all).
So i think we need something like
class QMouseEvent {
public:
enum StandardButton {None, Left, Right…}; // platform-independent
StandardButton button() const; // button caused event
StandardButtons buttons() const; // all pressed buttons
int specificButton() const; // device-specific button, value depends on manufacturer
};
28.07.2011, в 18:44, Samuel Rødal написал(а):
On 07/28/2011 03:43 PM, ext Thiago Macieira wrote:
> On Thursday, 28 de July de 2011 10:25:17 Samuel Rødal wrote:
>> Oh, another thought, can't we just extend the MouseButtonMask to include
>> more bits in Qt 5? Would 32 buttons be sufficient for any reasonable use?
>
> Yes, just like 640 kB will be sufficient for any reasonable use :-)
Well, I found an 18-buttoned mouse at least:
http://www.theinquirer.net/inquirer/news/1566251/-button-mouse-black
Maybe I should get one for testing the new APIs.
Question is, at what point does it go from being a mouse to becoming a
custom input device, outside the scope of QMouseEvent? :)
--
Samuel
_______________________________________________
Qt5-feedback mailing list
Qt5-feedback at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
More information about the Qt5-feedback
mailing list