76 #ifdef QT_OPENGL_SUPPORT
127 switch (event->
type()) {
129 case QEvent::MouseButtonPress:
150 if (me->
button() == Qt::LeftButton) {
179 }
else if (me->
button() == Qt::RightButton) {
193 case QEvent::MouseButtonRelease:
203 case QEvent::MouseMove:
213 case QEvent::TouchBegin:
214 case QEvent::TouchUpdate:
223 const int id = touchPoint.
id();
224 switch (touchPoint.
state()) {
225 case Qt::TouchPointPressed:
229 int activePoint = -1;
232 const int activePointCount = activePoints.
size();
233 if (pointsCount == 2 && activePointCount == 1) {
234 activePoint = activePoints.
contains(0) ? 1 : 0;
236 for (
int i=0; i<pointsCount; ++i) {
241 if ((distance < 0 && d < 12 * pointSize) || d < distance) {
248 if (activePoint != -1) {
254 case Qt::TouchPointReleased:
262 case Qt::TouchPointMoved:
282 case QEvent::TouchEnd:
365 qreal left = bounds.
left();
366 qreal right = bounds.
right();
367 qreal top = bounds.
top();
368 qreal bottom = bounds.
bottom();
384 for (
int i=0; i<points.
size(); ++i)
406 return p1.
x() < p2.
x();
412 return p1.
y() < p2.
y();