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 |
멤버 유형 문서
열거형 QEventPoint::State
플래그 QEventPoint::States
이 이벤트 포인트의 상태를 지정합니다.
Constant | 값 | 설명 |
---|---|---|
QEventPoint::Unknown | Qt::TouchPointUnknownState | 알 수 없는 상태. |
QEventPoint::Stationary | Qt::TouchPointStationary | 이벤트 포인트가 움직이지 않았습니다. |
QEventPoint::Pressed | Qt::TouchPointPressed | 터치 포인트 또는 버튼을 눌렀습니다. |
QEventPoint::Updated | Qt::TouchPointMoved | 이벤트 포인트가 업데이트되었습니다. |
QEventPoint::Released | Qt::TouchPointReleased | 터치 포인트 또는 버튼이 해제되었습니다. |
상태 유형은 QFlags<State>에 대한 타입 정의입니다. 상태 값의 OR 조합을 저장합니다.
속성 문서
accepted : bool
이 프로퍼티는 이벤트 포인트의 수락 상태를 보유합니다.
위젯 기반 애플리케이션에서는 위젯이 완전한 QInputEvent 을 수락하거나 거부하는 경우에만 의미가 있으므로 이 속성은 사용되지 않습니다.
그러나 Qt Quick 에서 아이템이나 이벤트 핸들러는 실제로 제스처에 참여하는 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에 의해 계산된다는 것을 나타냅니다. 효과적으로 사용자가 지난 몇 번의 이벤트 동안 이 지점을 얼마나 빨리, 어떤 방향으로 드래그했는지 알려주며 가장 최근의 이벤트가 가장 큰 영향을 미칩니다.
함수 액세스:
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 의 얕은 복사본을 만들어 이벤트 포인트를 구성합니다.
[noexcept]
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
을 반환합니다.
© 2025 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.