QEventPoint Class
QEventPoint 클래스는 이벤트 영역( QPointerEvent) 내의 특정 지점에 대한 정보를 제공합니다. 더 보기...
| 헤더: | #include <QEventPoint> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 다음부터: | Qt 6.0부터 |
공개 유형
속성
|
|
공개 함수
| QEventPoint(int pointId, QEventPoint::State state, const QPointF &scenePosition, const QPointF &globalPosition) | |
| QEventPoint(const QEventPoint &other) | |
| QEventPoint(QEventPoint &&other) | |
| ~QEventPoint() | |
| const QPointingDevice * | device() const |
| QSizeF | ellipseDiameters() const |
| QPointF | globalGrabPosition() const |
| QPointF | globalLastPosition() const |
| QPointF | globalPosition() const |
| QPointF | globalPressPosition() const |
| QPointF | grabPosition() const |
| int | id() const |
| bool | isAccepted() const |
| QPointF | lastPosition() const |
| ulong | lastTimestamp() const |
| QPointF | normalizedPosition() const |
| QPointF | position() const |
| QPointF | pressPosition() const |
| ulong | pressTimestamp() const |
| qreal | pressure() const |
| qreal | rotation() const |
| QPointF | sceneGrabPosition() const |
| QPointF | sceneLastPosition() const |
| QPointF | scenePosition() const |
| QPointF | scenePressPosition() const |
| void | setAccepted(bool accepted = true) |
| QEventPoint::State | state() const |
| qreal | timeHeld() const |
| ulong | timestamp() const |
| QPointingDeviceUniqueId | uniqueId() const |
| QVector2D | velocity() const |
| bool | operator!=(const QEventPoint &other) const |
| QEventPoint & | operator=(QEventPoint &&other) |
| QEventPoint & | operator=(const QEventPoint &other) |
| bool | operator==(const QEventPoint &other) const |
멤버 유형 설명
enum QEventPoint::State
flags QEventPoint::States
이 이벤트 지점의 상태를 지정합니다.
| 상수 | 값 | 설명 |
|---|---|---|
QEventPoint::Unknown | Qt::TouchPointUnknownState | 알 수 없는 상태입니다. |
QEventPoint::Stationary | Qt::TouchPointStationary | 이벤트 포인트가 이동하지 않았습니다. |
QEventPoint::Pressed | Qt::TouchPointPressed | 터치 지점 또는 버튼이 눌렸습니다. |
QEventPoint::Updated | Qt::TouchPointMoved | 이벤트 지점이 업데이트되었습니다. |
QEventPoint::Released | Qt::TouchPointReleased | 터치 지점 또는 버튼이 해제되었습니다. |
States 유형은 QFlags<State>에 대한 typedef입니다. State 값의 OR 조합을 저장합니다.
속성 문서
accepted : bool
이 속성은 이벤트 포인트의 수락 상태를 저장합니다.
위젯 기반 애플리케이션에서는 이 속성이 사용되지 않습니다. 위젯이 전체 QInputEvent 를 수락하거나 거부하는 경우에만 의미가 있기 때문입니다.
그러나 제스처 이벤트( Qt Quick )에서는, 아이템(Item)이나 이벤트 핸들러(Event Handler)가 제스처 이벤트 그룹( QTouchEvent ) 내에서 실제로 제스처에 참여하는 개별 포인트만 수락하고, 다른 포인트는 다른 아이템이나 핸들러로 전달되는 것이 일반적입니다. 일관성을 위해, 이는 모든 제스처 이벤트 그룹( QPointerEvent)에 적용되며, 전달은 제스처 이벤트 그룹( QPointerEvent )의 모든 포인트가 수락된 경우에만 이루어집니다.
액세스 함수:
| bool | isAccepted() const |
| void | setAccepted(bool accepted = true) |
QEvent::accepted도 참조하십시오 .
[read-only] device : const QPointingDevice*
이 속성은 이 이벤트 포인트의 출처가 되는 포인팅 장치를 나타냅니다.
액세스 함수:
| const QPointingDevice * | device() const |
[read-only] ellipseDiameters : const QSizeF
이 속성은 터치 지점을 둘러싼 타원의 너비와 높이를 저장합니다.
반환 값은 논리 픽셀 단위입니다. 대부분의 터치스크린은 접촉 지점의 모양을 감지하지 못하며, 마우스나 태블릿 기기 역시 이를 감지할 수 없으므로, 크기가 null인 경우가 가장 일반적입니다. 일부 터치스크린에서는 직경이 0이 아니며 항상 동일할 수 있습니다(타원이 원으로 근사 처리됨).
액세스 함수:
| QSizeF | ellipseDiameters() const |
[read-only] globalGrabPosition : const QPointF
이 속성은 이 점이 잡힌 전역 위치를 저장합니다.
전역 위치는 화면 또는 가상 데스크톱을 기준으로 합니다.
액세스 함수:
| QPointF | globalGrabPosition() const |
globalPosition, grabPosition 및 sceneGrabPosition도 참조하십시오 .
[read-only] globalLastPosition : const QPointF
이 속성은 이전 클릭 또는 이동 이벤트 시 이 점의 전역 위치를 저장합니다.
전역 위치는 화면 또는 가상 데스크톱을 기준으로 합니다.
액세스 함수:
| QPointF | globalLastPosition() const |
globalPosition, lastPosition 및 sceneLastPosition도 참조하십시오 .
[read-only] globalPosition : const QPointF
이 속성은 이 점의 전역 위치를 저장합니다.
전역 위치는 화면 또는 가상 데스크톱을 기준으로 합니다.
관련 함수:
| QPointF | globalPosition() const |
globalPressPosition, position, scenePosition도 참조하십시오 .
[read-only] globalPressPosition : const QPointF
이 속성은 이 점이 눌렸던 전역 위치를 저장합니다.
전역 위치는 화면 또는 가상 데스크톱을 기준으로 합니다.
관련 함수:
| QPointF | globalPressPosition() const |
globalPosition, pressPosition, scenePressPosition도 참조하십시오 .
[read-only] grabPosition : const QPointF
이 속성은 이 점이 잡힌 위치를 저장합니다.
이 위치는 이벤트를 수신한 위젯 또는 항목을 기준으로 합니다.
액세스 함수:
| QPointF | grabPosition() const |
position도 참조하십시오 .
[read-only] id : const int
이 속성은 해당 이벤트 포인트의 ID 번호를 저장합니다.
참고: ID 번호가 0부터 시작하거나 순차적으로 할당된다고 가정하지마십시오 . 기본 드라이버의 작동 방식상 이러한 가정은 종종 틀릴 수 있습니다.
액세스 함수:
| int | id() const |
[read-only] lastPosition : const QPointF
이 속성은 이전 클릭 또는 이동 이벤트 당시 이 점의 위치를 저장합니다.
이 위치는 이벤트를 수신한 위젯이나 항목을 기준으로 합니다.
액세스 함수:
| QPointF | lastPosition() const |
position 및 pressPosition도 참조하십시오 .
[read-only] lastTimestamp : const ulong
이 속성은 이 점을 포함했던 이전 QPointerEvent 의 시간을 저장합니다.
액세스 함수:
| ulong | lastTimestamp() const |
globalLastPosition도 참조하십시오 .
[read-only] position : const QPointF
이 속성은 이 점의 위치를 나타냅니다.
이 위치는 이벤트를 수신한 위젯 또는 항목을 기준으로 합니다.
액세스 함수:
| QPointF | position() const |
[read-only] pressPosition : const QPointF
이 속성은 이 점이 눌렸던 위치를 저장합니다.
이 위치는 이벤트를 수신한 위젯이나 항목을 기준으로 합니다.
액세스 함수:
| QPointF | pressPosition() const |
position도 참조하십시오 .
[read-only] pressTimestamp : const ulong
이 속성은 해당 점이 눌렸던 가장 최근의 시간을 저장합니다.
액세스 함수:
| ulong | pressTimestamp() const |
timestamp도 참조하십시오 .
[read-only] pressure : const qreal
이 속성은 해당 지점의 압력을 나타냅니다.
반환 값의 범위는 0.0 에서 1.0 사이입니다.
액세스 함수:
| qreal | pressure() const |
[read-only] rotation : const qreal
이 속성은 해당 지점의 각도 방향을 저장합니다.
반환 값은 도(°) 단위이며, 0(기본값)은 손가락, 토큰 또는 스타일러스가 위쪽을 가리키고 있음을 나타내고, 음의 각도는 왼쪽으로 회전되었음을, 양의 각도는 오른쪽으로 회전되었음을 의미합니다. 대부분의 터치스크린은 회전을 감지하지 않으므로 0이 가장 일반적인 값입니다.
액세스 함수:
| qreal | rotation() const |
[read-only] sceneGrabPosition : const QPointF
이 속성은 이 점이 캡처된 장면 위치를 저장합니다.
이 장면 위치는 QQuickItem::event()에서 처리되는 경우 QQuickWindow 를 기준으로 한 위치이며, QGraphicsItem::touchEvent()의 오버라이드에서 처리되는 경우 QGraphicsScene 좌표계상의 위치이고, 위젯 애플리케이션에서는 창 내의 위치입니다.
액세스 함수:
| QPointF | sceneGrabPosition() const |
scenePosition, grabPosition 및 globalGrabPosition도 참조하십시오 .
[read-only] sceneLastPosition : const QPointF
이 속성은 이전 클릭 또는 이동 이벤트 당시 이 지점의 씬 위치를 저장합니다.
씬 위치는 ` QQuickItem::event()`에서 처리되는 경우 ` QQuickWindow `을 기준으로 한 상대적 위치이며, `QGraphicsItem::touchEvent()`를 재정의하여 처리되는 경우 ` QGraphicsScene ` 좌표계에서의 위치, 위젯 애플리케이션에서는 창 내의 위치입니다.
액세스 함수:
| QPointF | sceneLastPosition() const |
scenePosition 및 scenePressPosition도 참조하십시오 .
[read-only] scenePosition : const QPointF
이 속성은 이 점의 장면 위치를 저장합니다.
씬 위치는 QQuickItem::event()에서 처리될 경우 QQuickWindow 를 기준으로 한 상대적 위치이며, QGraphicsItem::touchEvent()의 오버라이드로 처리될 경우 QGraphicsScene 좌표계를 기준으로 한 상대적 위치이며, 위젯 애플리케이션에서는 창 내의 위치를 의미합니다.
액세스 함수:
| QPointF | scenePosition() const |
scenePressPosition, position 및 globalPosition도 참조하십시오 .
[read-only] scenePressPosition : const QPointF
이 속성은 해당 지점이 누른 시점의 장면 위치를 저장합니다.
씬 위치는 QQuickItem::event()에서 처리되는 경우 QQuickWindow 를 기준으로 한 상대적 위치이며, QGraphicsItem::touchEvent()를 재정의하여 처리되는 경우 QGraphicsScene 좌표계에서의 위치, 위젯 애플리케이션에서는 창 내의 위치입니다.
액세스 함수:
| QPointF | scenePressPosition() const |
scenePosition, pressPosition 및 globalPressPosition도 참조하십시오 .
[read-only] state : const State
이 속성은 이벤트 포인트의 현재 상태를 저장합니다.
액세스 함수:
| QEventPoint::State | state() const |
[read-only] timeHeld : const qreal
이 속성은 이 점이 눌린 후 놓이지 않은 상태인 시간(초 단위)을 저장합니다.
액세스 함수:
| qreal | timeHeld() const |
pressTimestamp 및 timestamp도 참조하십시오 .
[read-only] timestamp : const ulong
이 속성은 해당 지점이 ‘ QPointerEvent ’에 포함된 가장 최근의 시간을 나타냅니다.
액세스 함수:
| ulong | timestamp() const |
참조: QPointerEvent::timestamp()
[read-only] uniqueId : const QPointingDeviceUniqueId
이 속성은 해당 점 또는 토큰(있는 경우)의 고유 ID를 저장합니다.
터치스크린은 손가락을 고유하게 식별할 수 없기 때문에 이 속성은 종종 유효하지 않습니다( isValid() 참조).
QTabletEvent 에서 반환된 값인 경우, 사용 중인 스타일러스의 일련 번호를 식별합니다.
TUIO 드라이버가 이를 지원하는 터치스크린과 함께 사용될 때, 특정 토큰(기준 물체)을 식별할 수도 있습니다.
액세스 함수:
| QPointingDeviceUniqueId | uniqueId() const |
[read-only] velocity : const QVector2D
이 속성은 화면 또는 데스크톱의 좌표계에서 초당 픽셀 단위의 속도 벡터를 저장합니다.
참고: 기기의 기능에 ` QInputDevice::Velocity`가 포함되어있다면 , 이는 속도가 운영 체제에서 제공된다는 것을 의미합니다(아마도 터치 하드웨어나 드라이버에서 제공하는 것일 수 있습니다). 하지만 일반적으로 ` Velocity ` 기능은 설정되어 있지 않으며, 이는 속도가 Qt에 의해 계산된다는 것을 나타냅니다. Qt는 단순한 칼만 필터를 사용하여 순간적인 값이 아닌 매끄럽게 보정된 평균 속도를 제공합니다. 실질적으로 이 값은 지난 몇 번의 이벤트 동안 사용자가 이 점을 얼마나 빠르게, 어떤 방향으로 드래그해 왔는지를 나타내며, 가장 최근의 이벤트가 가장 큰 영향을 미칩니다.
액세스 함수:
| QVector2D | velocity() const |
QInputDevice::capabilities() 및 QInputEvent::device()도 참조하십시오 .
멤버 함수 설명서
QEventPoint::QEventPoint(int pointId, QEventPoint::State state, const QPointF &scenePosition, const QPointF &globalPosition)
주어진 pointId, state, scenePosition 및 globalPosition 을 사용하여 이벤트 포인트를 생성합니다.
[noexcept] QEventPoint::QEventPoint(const QEventPoint &other)
other 의 얕은 복사본을 만들어 이벤트 포인트를 생성합니다.
[constexpr noexcept default] QEventPoint::QEventPoint(QEventPoint &&other)
other 를 이동하여 이벤트 지점을 생성합니다.
[noexcept] QEventPoint::~QEventPoint()
이벤트 지점을 파괴합니다.
QPointF QEventPoint::normalizedPosition() const
이 점의 정규화된 위치를 반환합니다.
좌표는 globalPosition()를 QInputDevice::availableVirtualGeometry() 공간으로 변환하여 계산되며, 즉 (0, 0) 는 왼쪽 상단 모서리이고 (1, 1) 는 오른쪽 하단 모서리입니다.
globalPosition도 참조하십시오 .
[noexcept] bool QEventPoint::operator!=(const QEventPoint &other) const
이 이벤트 포인트가 other 와 같지 않으면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.
[noexcept] QEventPoint &QEventPoint::operator=(QEventPoint &&other)
other 를 이 이벤트 포인트 인스턴스에 할당합니다.
[noexcept] QEventPoint &QEventPoint::operator=(const QEventPoint &other)
other 를 이 이벤트 포인트에 할당하고, 이 이벤트 포인트에 대한 참조를 반환합니다.
[noexcept] bool QEventPoint::operator==(const QEventPoint &other) const
이 이벤트 포인트가 other 와 동일한 경우 true 를 반환하고, 그렇지 않은 경우 false 를 반환합니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.