Qt 4.8
Public Functions | Properties | Friends | List of all members
QTouchEvent::TouchPoint Class Reference

The TouchPoint class provides information about a touch point in a QTouchEvent. More...

#include <qevent.h>

Public Functions

int id () const
 Returns the id number of this touch point. More...
 
bool isPrimary () const
 Returns true if this touch point is the primary touch point. More...
 
QPointF lastNormalizedPos () const
 Returns the normalized position of this touch point from the previous touch event. More...
 
QPointF lastPos () const
 Returns the position of this touch point from the previous touch event, relative to the widget or QGraphicsItem that received the event. More...
 
QPointF lastScenePos () const
 Returns the scene position of this touch point from the previous touch event. More...
 
QPointF lastScreenPos () const
 Returns the screen position of this touch point from the previous touch event. More...
 
QPointF normalizedPos () const
 Returns the normalized position of this touch point. More...
 
QTouchEvent::TouchPointoperator= (const QTouchEvent::TouchPoint &other)
 
QPointF pos () const
 Returns the position of this touch point, relative to the widget or QGraphicsItem that received the event. More...
 
qreal pressure () const
 Returns the pressure of this touch point. More...
 
QRectF rect () const
 Returns the rect for this touch point, relative to the widget or QGraphicsItem that received the event. More...
 
QPointF scenePos () const
 Returns the scene position of this touch point. More...
 
QRectF sceneRect () const
 Returns the rect for this touch point in scene coordinates. More...
 
QPointF screenPos () const
 Returns the screen position of this touch point. More...
 
QRectF screenRect () const
 Returns the rect for this touch point in screen coordinates. More...
 
void setId (int id)
 
void setLastNormalizedPos (const QPointF &lastNormalizedPos)
 
void setLastPos (const QPointF &lastPos)
 
void setLastScenePos (const QPointF &lastScenePos)
 
void setLastScreenPos (const QPointF &lastScreenPos)
 
void setNormalizedPos (const QPointF &normalizedPos)
 
void setPos (const QPointF &pos)
 
void setPressure (qreal pressure)
 
void setRect (const QRectF &rect)
 
void setScenePos (const QPointF &scenePos)
 
void setSceneRect (const QRectF &sceneRect)
 
void setScreenPos (const QPointF &screenPos)
 
void setScreenRect (const QRectF &screenRect)
 
void setStartNormalizedPos (const QPointF &startNormalizedPos)
 
void setStartPos (const QPointF &startPos)
 
void setStartScenePos (const QPointF &startScenePos)
 
void setStartScreenPos (const QPointF &startScreenPos)
 
void setState (Qt::TouchPointStates state)
 
QPointF startNormalizedPos () const
 Returns the normalized starting position of this touch point. More...
 
QPointF startPos () const
 Returns the starting position of this touch point, relative to the widget or QGraphicsItem that received the event. More...
 
QPointF startScenePos () const
 Returns the starting scene position of this touch point. More...
 
QPointF startScreenPos () const
 Returns the starting screen position of this touch point. More...
 
Qt::TouchPointState state () const
 Returns the current state of this touch point. More...
 
 TouchPoint (int id=-1)
 Constructs a QTouchEvent::TouchPoint for use in a QTouchEvent. More...
 
 TouchPoint (const QTouchEvent::TouchPoint &other)
 Constructs a copy of other. More...
 
 ~TouchPoint ()
 Destroys the QTouchEvent::TouchPoint. More...
 

Properties

QTouchEventTouchPointPrivated
 

Friends

class QApplication
 
class QApplicationPrivate
 

Detailed Description

The TouchPoint class provides information about a touch point in a QTouchEvent.

Since
4.6

Definition at line 744 of file qevent.h.

Constructors and Destructors

◆ TouchPoint() [1/2]

QTouchEvent::TouchPoint::TouchPoint ( int  id = -1)

Constructs a QTouchEvent::TouchPoint for use in a QTouchEvent.

Warning
This function is not part of the public interface.

Definition at line 4408 of file qevent.cpp.

4409  : d(new QTouchEventTouchPointPrivate(id))
4410 { }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ TouchPoint() [2/2]

QTouchEvent::TouchPoint::TouchPoint ( const QTouchEvent::TouchPoint other)

Constructs a copy of other.

Warning
This function is not part of the public interface.

Definition at line 4419 of file qevent.cpp.

4420  : d(other.d)
4421 {
4422  d->ref.ref();
4423 }
bool ref()
Atomically increments the value of this QAtomicInt.
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ ~TouchPoint()

QTouchEvent::TouchPoint::~TouchPoint ( )

Destroys the QTouchEvent::TouchPoint.

Warning
This function is not part of the public interface.

Definition at line 4432 of file qevent.cpp.

4433 {
4434  if (!d->ref.deref())
4435  delete d;
4436 }
bool deref()
Atomically decrements the value of this QAtomicInt.
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

Functions

◆ id()

int QTouchEvent::TouchPoint::id ( ) const

Returns the id number of this touch point.

Id numbers are globally sequential, starting at zero, meaning the first touch point in the application has id 0, the second has id 1, and so on.

Definition at line 4445 of file qevent.cpp.

Referenced by QGraphicsScenePrivate::findClosestTouchPointId(), QApplicationPrivate::findClosestTouchPointId(), QApplication::notify(), QGraphicsScenePrivate::sendTouchBeginEvent(), setId(), QGraphicsScenePrivate::touchEventHandler(), QApplicationPrivate::translateRawTouchEvent(), and QDeclarativePinchArea::updatePinch().

4446 {
4447  return d->id;
4448 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ isPrimary()

bool QTouchEvent::TouchPoint::isPrimary ( ) const

Returns true if this touch point is the primary touch point.

The primary touch point is the point for which the windowing system generates mouse events.

Definition at line 4462 of file qevent.cpp.

Referenced by QWidget::event(), and QApplicationPrivate::translateRawTouchEvent().

4463 {
4464  return (d->state & Qt::TouchPointPrimary) != 0;
4465 }
Qt::TouchPointStates state
Definition: qevent_p.h:119
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ lastNormalizedPos()

QPointF QTouchEvent::TouchPoint::lastNormalizedPos ( ) const

Returns the normalized position of this touch point from the previous touch event.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also
normalizedPos(), startNormalizedPos()

Definition at line 4612 of file qevent.cpp.

Referenced by setLastNormalizedPos().

4613 {
4614  return d->lastNormalizedPos;
4615 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ lastPos()

QPointF QTouchEvent::TouchPoint::lastPos ( ) const

Returns the position of this touch point from the previous touch event, relative to the widget or QGraphicsItem that received the event.

See also
pos(), startPos()

Definition at line 4571 of file qevent.cpp.

Referenced by QApplication::notify(), setLastPos(), and QGraphicsViewPrivate::translateTouchEvent().

4572 {
4573  return d->lastPos;
4574 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ lastScenePos()

QPointF QTouchEvent::TouchPoint::lastScenePos ( ) const

Returns the scene position of this touch point from the previous touch event.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See also
scenePos(), startScenePos()

Definition at line 4587 of file qevent.cpp.

Referenced by setLastScenePos(), and QGraphicsScenePrivate::updateTouchPointsForItem().

4588 {
4589  return d->lastScenePos;
4590 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ lastScreenPos()

QPointF QTouchEvent::TouchPoint::lastScreenPos ( ) const

Returns the screen position of this touch point from the previous touch event.

See also
screenPos(), startScreenPos()

Definition at line 4598 of file qevent.cpp.

Referenced by QPinchGestureRecognizer::recognize(), setLastScreenPos(), QApplicationPrivate::translateRawTouchEvent(), and QApplicationPrivate::updateTouchPointsForWidget().

4599 {
4600  return d->lastScreenPos;
4601 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ normalizedPos()

QPointF QTouchEvent::TouchPoint::normalizedPos ( ) const

Returns the normalized position of this touch point.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also
startNormalizedPos(), lastNormalizedPos(), pos()

Definition at line 4511 of file qevent.cpp.

Referenced by setNormalizedPos(), and QApplicationPrivate::translateRawTouchEvent().

4512 {
4513  return d->normalizedPos;
4514 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ operator=()

QTouchEvent::TouchPoint & QTouchEvent::TouchPoint::operator= ( const QTouchEvent::TouchPoint other)
Warning
This function is not part of the public interface.

Definition at line 4807 of file qevent.cpp.

4808 {
4809  other.d->ref.ref();
4810  if (!d->ref.deref())
4811  delete d;
4812  d = other.d;
4813  return *this;
4814 }
bool ref()
Atomically increments the value of this QAtomicInt.
bool deref()
Atomically decrements the value of this QAtomicInt.
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ pos()

QPointF QTouchEvent::TouchPoint::pos ( ) const

Returns the position of this touch point, relative to the widget or QGraphicsItem that received the event.

See also
startPos(), lastPos(), screenPos(), scenePos(), normalizedPos()

Definition at line 4473 of file qevent.cpp.

Referenced by QWidget::event(), QPanGestureRecognizer::recognize(), QTapGestureRecognizer::recognize(), QTapAndHoldGestureRecognizer::recognize(), QApplicationPrivate::translateRawTouchEvent(), and QDeclarativePinchArea::updatePinch().

4474 {
4475  return d->rect.center();
4476 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
QPointF center() const
Returns the center point of the rectangle.
Definition: qrect.h:686

◆ pressure()

qreal QTouchEvent::TouchPoint::pressure ( ) const

Returns the pressure of this touch point.

The return value is in the range 0.0 to 1.0.

Definition at line 4657 of file qevent.cpp.

Referenced by setPressure(), and QApplicationPrivate::translateRawTouchEvent().

4658 {
4659  return d->pressure;
4660 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ rect()

QRectF QTouchEvent::TouchPoint::rect ( ) const

Returns the rect for this touch point, relative to the widget or QGraphicsItem that received the event.

The rect is centered around the point returned by pos().

Note
This function returns an empty rect if the device does not report touch point sizes.

Definition at line 4624 of file qevent.cpp.

Referenced by QApplication::notify(), setRect(), and QGraphicsViewPrivate::translateTouchEvent().

4625 {
4626  return d->rect;
4627 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ scenePos()

QPointF QTouchEvent::TouchPoint::scenePos ( ) const

Returns the scene position of this touch point.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See also
startScenePos(), lastScenePos(), pos()

Definition at line 4488 of file qevent.cpp.

Referenced by QGraphicsScenePrivate::findClosestTouchPointId(), QGraphicsScenePrivate::sendTouchBeginEvent(), QGraphicsScenePrivate::touchEventHandler(), and QDeclarativePinchArea::updatePinch().

4489 {
4490  return d->sceneRect.center();
4491 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
QPointF center() const
Returns the center point of the rectangle.
Definition: qrect.h:686

◆ sceneRect()

QRectF QTouchEvent::TouchPoint::sceneRect ( ) const

Returns the rect for this touch point in scene coordinates.

Note
This function returns an empty rect if the device does not report touch point sizes.
See also
scenePos(), rect()

Definition at line 4636 of file qevent.cpp.

Referenced by setSceneRect(), and QGraphicsScenePrivate::updateTouchPointsForItem().

4637 {
4638  return d->sceneRect;
4639 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ screenPos()

QPointF QTouchEvent::TouchPoint::screenPos ( ) const

◆ screenRect()

QRectF QTouchEvent::TouchPoint::screenRect ( ) const

Returns the rect for this touch point in screen coordinates.

Note
This function returns an empty rect if the device does not report touch point sizes.
See also
screenPos(), rect()

Definition at line 4648 of file qevent.cpp.

Referenced by setScreenRect(), QApplicationPrivate::translateRawTouchEvent(), and QApplicationPrivate::updateTouchPointsForWidget().

4649 {
4650  return d->screenRect;
4651 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setId()

void QTouchEvent::TouchPoint::setId ( int  id)
Warning
This function is not part of the public interface.

Definition at line 4663 of file qevent.cpp.

Referenced by QWindowSystemInterface::handleTouchEvent().

4664 {
4665  if (d->ref != 1)
4666  d = d->detach();
4667  d->id = id;
4668 }
int id() const
Returns the id number of this touch point.
Definition: qevent.cpp:4445
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setLastNormalizedPos()

void QTouchEvent::TouchPoint::setLastNormalizedPos ( const QPointF lastNormalizedPos)
Warning
This function is not part of the public interface.

Definition at line 4767 of file qevent.cpp.

4768 {
4769  if (d->ref != 1)
4770  d = d->detach();
4772 }
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
QPointF lastNormalizedPos() const
Returns the normalized position of this touch point from the previous touch event.
Definition: qevent.cpp:4612

◆ setLastPos()

void QTouchEvent::TouchPoint::setLastPos ( const QPointF lastPos)
Warning
This function is not part of the public interface.

Definition at line 4743 of file qevent.cpp.

Referenced by QGraphicsScenePrivate::updateTouchPointsForItem().

4744 {
4745  if (d->ref != 1)
4746  d = d->detach();
4747  d->lastPos = lastPos;
4748 }
QPointF lastPos() const
Returns the position of this touch point from the previous touch event, relative to the widget or QGr...
Definition: qevent.cpp:4571
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setLastScenePos()

void QTouchEvent::TouchPoint::setLastScenePos ( const QPointF lastScenePos)
Warning
This function is not part of the public interface.

Definition at line 4751 of file qevent.cpp.

Referenced by QGraphicsViewPrivate::translateTouchEvent().

4752 {
4753  if (d->ref != 1)
4754  d = d->detach();
4756 }
QPointF lastScenePos() const
Returns the scene position of this touch point from the previous touch event.
Definition: qevent.cpp:4587
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setLastScreenPos()

void QTouchEvent::TouchPoint::setLastScreenPos ( const QPointF lastScreenPos)
Warning
This function is not part of the public interface.

Definition at line 4759 of file qevent.cpp.

4760 {
4761  if (d->ref != 1)
4762  d = d->detach();
4764 }
QPointF lastScreenPos() const
Returns the screen position of this touch point from the previous touch event.
Definition: qevent.cpp:4598
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setNormalizedPos()

void QTouchEvent::TouchPoint::setNormalizedPos ( const QPointF normalizedPos)
Warning
This function is not part of the public interface.

Definition at line 4703 of file qevent.cpp.

Referenced by QWindowSystemInterface::handleTouchEvent(), and QApplicationPrivate::translateTouchEvent().

4704 {
4705  if (d->ref != 1)
4706  d = d->detach();
4708 }
QPointF normalizedPos() const
Returns the normalized position of this touch point.
Definition: qevent.cpp:4511
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setPos()

void QTouchEvent::TouchPoint::setPos ( const QPointF pos)
Warning
This function is not part of the public interface.

Definition at line 4679 of file qevent.cpp.

4680 {
4681  if (d->ref != 1)
4682  d = d->detach();
4683  d->rect.moveCenter(pos);
4684 }
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
void moveCenter(const QPointF &p)
Moves the rectangle, leaving the center point at the given position.
Definition: qrect.h:705

◆ setPressure()

void QTouchEvent::TouchPoint::setPressure ( qreal  pressure)
Warning
This function is not part of the public interface.

Definition at line 4799 of file qevent.cpp.

Referenced by QWindowSystemInterface::handleTouchEvent().

4800 {
4801  if (d->ref != 1)
4802  d = d->detach();
4803  d->pressure = pressure;
4804 }
qreal pressure() const
Returns the pressure of this touch point.
Definition: qevent.cpp:4657
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setRect()

void QTouchEvent::TouchPoint::setRect ( const QRectF rect)
Warning
This function is not part of the public interface.

Definition at line 4775 of file qevent.cpp.

Referenced by QWindowSystemInterface::handleTouchEvent(), and QGraphicsScenePrivate::updateTouchPointsForItem().

4776 {
4777  if (d->ref != 1)
4778  d = d->detach();
4779  d->rect = rect;
4780 }
QRectF rect() const
Returns the rect for this touch point, relative to the widget or QGraphicsItem that received the even...
Definition: qevent.cpp:4624
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setScenePos()

void QTouchEvent::TouchPoint::setScenePos ( const QPointF scenePos)
Warning
This function is not part of the public interface.

Definition at line 4687 of file qevent.cpp.

4688 {
4689  if (d->ref != 1)
4690  d = d->detach();
4691  d->sceneRect.moveCenter(scenePos);
4692 }
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
void moveCenter(const QPointF &p)
Moves the rectangle, leaving the center point at the given position.
Definition: qrect.h:705

◆ setSceneRect()

void QTouchEvent::TouchPoint::setSceneRect ( const QRectF sceneRect)
Warning
This function is not part of the public interface.

Definition at line 4783 of file qevent.cpp.

Referenced by QGraphicsViewPrivate::translateTouchEvent().

4784 {
4785  if (d->ref != 1)
4786  d = d->detach();
4787  d->sceneRect = sceneRect;
4788 }
QRectF sceneRect() const
Returns the rect for this touch point in scene coordinates.
Definition: qevent.cpp:4636
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setScreenPos()

void QTouchEvent::TouchPoint::setScreenPos ( const QPointF screenPos)
Warning
This function is not part of the public interface.

Definition at line 4695 of file qevent.cpp.

Referenced by QWindowSystemInterface::handleTouchEvent(), QTest::QTouchEventSequence::move(), QTest::QTouchEventSequence::press(), and QTest::QTouchEventSequence::release().

4696 {
4697  if (d->ref != 1)
4698  d = d->detach();
4699  d->screenRect.moveCenter(screenPos);
4700 }
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
void moveCenter(const QPointF &p)
Moves the rectangle, leaving the center point at the given position.
Definition: qrect.h:705

◆ setScreenRect()

void QTouchEvent::TouchPoint::setScreenRect ( const QRectF screenRect)
Warning
This function is not part of the public interface.

Definition at line 4791 of file qevent.cpp.

Referenced by QApplicationPrivate::translateTouchEvent().

4792 {
4793  if (d->ref != 1)
4794  d = d->detach();
4795  d->screenRect = screenRect;
4796 }
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
QRectF screenRect() const
Returns the rect for this touch point in screen coordinates.
Definition: qevent.cpp:4648

◆ setStartNormalizedPos()

void QTouchEvent::TouchPoint::setStartNormalizedPos ( const QPointF startNormalizedPos)
Warning
This function is not part of the public interface.

Definition at line 4735 of file qevent.cpp.

4736 {
4737  if (d->ref != 1)
4738  d = d->detach();
4740 }
QPointF startNormalizedPos() const
Returns the normalized starting position of this touch point.
Definition: qevent.cpp:4560
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setStartPos()

void QTouchEvent::TouchPoint::setStartPos ( const QPointF startPos)
Warning
This function is not part of the public interface.

Definition at line 4711 of file qevent.cpp.

Referenced by QGraphicsScenePrivate::updateTouchPointsForItem().

4712 {
4713  if (d->ref != 1)
4714  d = d->detach();
4715  d->startPos = startPos;
4716 }
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800
QPointF startPos() const
Returns the starting position of this touch point, relative to the widget or QGraphicsItem that recei...
Definition: qevent.cpp:4522

◆ setStartScenePos()

void QTouchEvent::TouchPoint::setStartScenePos ( const QPointF startScenePos)
Warning
This function is not part of the public interface.

Definition at line 4719 of file qevent.cpp.

Referenced by QGraphicsViewPrivate::translateTouchEvent().

4720 {
4721  if (d->ref != 1)
4722  d = d->detach();
4724 }
QPointF startScenePos() const
Returns the starting scene position of this touch point.
Definition: qevent.cpp:4537
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setStartScreenPos()

void QTouchEvent::TouchPoint::setStartScreenPos ( const QPointF startScreenPos)
Warning
This function is not part of the public interface.

Definition at line 4727 of file qevent.cpp.

4728 {
4729  if (d->ref != 1)
4730  d = d->detach();
4732 }
QPointF startScreenPos() const
Returns the starting screen position of this touch point.
Definition: qevent.cpp:4547
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ setState()

void QTouchEvent::TouchPoint::setState ( Qt::TouchPointStates  state)
Warning
This function is not part of the public interface.

Definition at line 4671 of file qevent.cpp.

Referenced by QWindowSystemInterface::handleTouchEvent(), QTest::QTouchEventSequence::move(), QTest::QTouchEventSequence::press(), QTest::QTouchEventSequence::release(), QTest::QTouchEventSequence::stationary(), and QApplicationPrivate::translateTouchEvent().

4672 {
4673  if (d->ref != 1)
4674  d = d->detach();
4675  d->state = state;
4676 }
Qt::TouchPointState state() const
Returns the current state of this touch point.
Definition: qevent.cpp:4453
Qt::TouchPointStates state
Definition: qevent_p.h:119
QTouchEventTouchPointPrivate * detach()
Definition: qevent_p.h:108
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ startNormalizedPos()

QPointF QTouchEvent::TouchPoint::startNormalizedPos ( ) const

Returns the normalized starting position of this touch point.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also
normalizedPos(), lastNormalizedPos()

Definition at line 4560 of file qevent.cpp.

Referenced by setStartNormalizedPos(), and QApplicationPrivate::translateRawTouchEvent().

4561 {
4562  return d->startNormalizedPos;
4563 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ startPos()

QPointF QTouchEvent::TouchPoint::startPos ( ) const

Returns the starting position of this touch point, relative to the widget or QGraphicsItem that received the event.

See also
pos(), lastPos()

Definition at line 4522 of file qevent.cpp.

Referenced by QApplication::notify(), QPanGestureRecognizer::recognize(), QTapGestureRecognizer::recognize(), QTapAndHoldGestureRecognizer::recognize(), setStartPos(), QApplicationPrivate::translateRawTouchEvent(), and QGraphicsViewPrivate::translateTouchEvent().

4523 {
4524  return d->startPos;
4525 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ startScenePos()

QPointF QTouchEvent::TouchPoint::startScenePos ( ) const

Returns the starting scene position of this touch point.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See also
scenePos(), lastScenePos()

Definition at line 4537 of file qevent.cpp.

Referenced by setStartScenePos(), and QGraphicsScenePrivate::updateTouchPointsForItem().

4538 {
4539  return d->startScenePos;
4540 }
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

◆ startScreenPos()

QPointF QTouchEvent::TouchPoint::startScreenPos ( ) const

◆ state()

Qt::TouchPointState QTouchEvent::TouchPoint::state ( ) const

Returns the current state of this touch point.

Definition at line 4453 of file qevent.cpp.

Referenced by QDeclarativePinchArea::event(), QDeclarativePinchArea::sceneEventFilter(), setState(), QGraphicsScenePrivate::touchEventHandler(), QApplicationPrivate::translateRawTouchEvent(), QDeclarativePinchArea::updatePinch(), and QApplicationPrivate::updateTouchPointsForWidget().

4454 {
4456 }
Qt::TouchPointStates state
Definition: qevent_p.h:119
TouchPointState
This enum represents the state of a touch point at the time the QTouchEvent occurred.
Definition: qnamespace.h:1738
QTouchEventTouchPointPrivate * d
Definition: qevent.h:800

Friends and Related Functions

◆ QApplication

friend class QApplication
friend

Definition at line 801 of file qevent.h.

◆ QApplicationPrivate

friend class QApplicationPrivate
friend

Definition at line 802 of file qevent.h.

Properties

◆ d

QTouchEventTouchPointPrivate* QTouchEvent::TouchPoint::d
private

The documentation for this class was generated from the following files: