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();
void addEllipse(const QRectF &boundingRectangle)
const QList< QTouchEvent::TouchPoint > & touchPoints() const
Qt::PenStyle style() const
iterator insert(const Key &key, const T &value)
void setRenderHint(RenderHint hint, bool on)
void pointsChanged(const QPolygonF &points)
QVector< T > & fill(const T &value, int size)
void drawPolyline(const QPointF *points, int pointCount)
Qt::TouchPointState state() const
bool contains(const QPointF &point) const
void insert(int i, const T &value)
virtual bool event(QEvent *e)
static bool y_less_than(const QPointF &p1, const QPointF &p2)
HoverPoints(QWidget *widget, PointShape shape)
QRectF pointBoundingRect(int i) const
void installEventFilter(QObject *filterObj)
void setPen(const QColor &color)
void drawEllipse(const QRectF &rectangle)
QRectF boundingRect() const
bool sendEvent(QObject *receiver, QEvent *event)
static bool x_less_than(const QPointF &p1, const QPointF &p2)
void setBrush(const QBrush &brush)
ConnectionType m_connectionType
iterator erase(iterator pos)
const T value(const Key &key) const
iterator find(const Key &key)
const QSize & size() const
void setEnabled(bool enabled)
bool contains(const T &value) const
const T & at(int i) const
void setPoints(const QPolygonF &points)
QSet< T > fromList(const QList< T > &list)
QList< T > values() const
const QPoint & pos() const
static QPointF bound_point(const QPointF &point, const QRectF &bounds, int lock)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool begin(QPaintDevice *device)
void movePoint(int i, const QPointF &newPos, bool emitChange=true)
QHash< int, int > m_fingerPointMapping
bool eventFilter(QObject *object, QEvent *event)