16 setAlignment(Qt::AlignCenter);
17 setText(
"Mouse interactions\n(Press a mouse button)");
42 +
"\n x()=" + QString::number(pe->x())
43 +
"\n y()=" + QString::number(pe->y())
44 +
"\n globalX()=" + QString::number(pe->globalX())
45 +
"\n globalY()=" + QString::number(pe->globalY())
55 if(pe->modifiers() & Qt::ShiftModifier) {
56 strModifiers +=
"Shift ";
58 if(pe->modifiers() & Qt::ControlModifier) {
59 strModifiers +=
"Control ";
61 if(pe->modifiers() & Qt::AltModifier) {
62 strModifiers +=
"Alt";
72 if(pe->buttons() & Qt::LeftButton) {
73 strButtons +=
"Left ";
75 if(pe->buttons() & Qt::RightButton) {
76 strButtons +=
"Right ";
78 if(pe->buttons() & Qt::MidButton) {
79 strButtons +=
"Middle";
QString modifiersInfo(QMouseEvent *pe)
void dumpEvent(QMouseEvent *pe, const QString &strMessage)
virtual void mouseReleaseEvent(QMouseEvent *pe)
QString buttonsInfo(QMouseEvent *pe)
virtual void mouseMoveEvent(QMouseEvent *pe)
MouseObserver(QWidget *pwgt=0)
virtual void mousePressEvent(QMouseEvent *pe)