이 페이지에서

QWaylandPointer Class

QWaylandPointer 클래스는 포인터 장치를 나타냅니다. 더 보기...

헤더: #include <QWaylandPointer>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
상속: QWaylandObject

속성

공개 함수

QWaylandPointer(QWaylandSeat *seat, QObject *parent = nullptr)
QWaylandCompositor *compositor() const
QPointF currentLocalPosition() const
QPointF currentSpacePosition() const
wl_resource *focusResource() const
bool isButtonPressed() const
QWaylandView *mouseFocus() const
QWaylandOutput *output() const
QWaylandSeat *seat() const
virtual void sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos)
virtual uint sendMousePressEvent(Qt::MouseButton button)
virtual uint sendMouseReleaseEvent(Qt::MouseButton button)
virtual void sendMouseWheelEvent(Qt::Orientation orientation, int delta)
void setOutput(QWaylandOutput *output)

신호

상세 설명

이 클래스는 QWaylandSeat 내의 포인터 장치에 대한 액세스를 제공합니다. 이는 Wayland 인터페이스인 wl_pointer에 해당합니다.

속성 설명

[read-only] isButtonPressed : bool

이 속성은 현재 마우스 버튼이 눌려 있는지 여부를 나타냅니다.

마우스 버튼이 하나 이상 눌려 있으면 값은 ` true `이며, 그렇지 않으면 ` false`입니다.

액세스 함수:

bool isButtonPressed() const

Notifier 신호:

void buttonPressedChanged()

멤버 함수 문서

QWaylandPointer::QWaylandPointer(QWaylandSeat *seat, QObject *parent = nullptr)

지정된 ` seat ` 및 ` parent`을 사용하여 `QWaylandPointer`를 생성합니다.

QWaylandCompositor *QWaylandPointer::compositor() const

이 QWaylandPointer 에 대한 컴포지터를 반환합니다.

QPointF QWaylandPointer::currentLocalPosition() const

QWaylandPointer 의 현재 국소 위치를 표면 좌표계로 반환합니다.

QPointF QWaylandPointer::currentSpacePosition() const

QWaylandPointer 의 현재 출력 공간 위치를 반환합니다.

wl_resource *QWaylandPointer::focusResource() const

이 QWaylandPointer 에 대한 Wayland 리소스를 반환합니다.

클라이언트당 여러 개의 포인터 리소스가 존재할 수 있으므로, 이 API는 사실 의미가 없습니다. 이 API는 호환성을 위해 제공됩니다.

bool QWaylandPointer::isButtonPressed() const

현재 어떤 버튼이든 눌려 있는 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.

참고: isButtonPressed 속성에 대한게터 함수입니다.

QWaylandView *QWaylandPointer::mouseFocus() const

현재 마우스 포커스가 맞춰진 뷰를 반환합니다.

QWaylandOutput *QWaylandPointer::output() const

이 QWaylandPointer 에 대한 출력 결과를 반환합니다.

setOutput()도 참조하십시오 .

QWaylandSeat *QWaylandPointer::seat() const

이 ` QWaylandPointer`에 대한 입력 장치를 반환합니다.

[virtual] void QWaylandPointer::sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos)

현재 마우스 포커스를 view 로 설정하고, 표면 좌표계의 로컬 위치 localPos 와 출력 공간 위치 outputSpacePos 를 포함하는 마우스 이동 이벤트를 해당 위치로 전송합니다.

[virtual] uint QWaylandPointer::sendMousePressEvent(Qt::MouseButton button)

button 에 대한 마우스 클릭 이벤트를 현재 마우스 포커스를 가지고 있는 뷰로 전송합니다.

마우스 클릭 이벤트의 일련 번호를 반환합니다.

[virtual] uint QWaylandPointer::sendMouseReleaseEvent(Qt::MouseButton button)

button 에 대한 마우스 릴리스 이벤트를 현재 마우스 포커스를 가지고 있는 뷰로 전송합니다.

해제 이벤트의 일련번호를 반환합니다.

[virtual] void QWaylandPointer::sendMouseWheelEvent(Qt::Orientation orientation, int delta)

지정된 ` orientation ` 및 ` delta ` 값을 사용하여 마우스 휠 이벤트를 현재 마우스 포커스를 가지고 있는 뷰로 전송합니다.

void QWaylandPointer::setOutput(QWaylandOutput *output)

이 QWaylandPointer 의 출력을 output 로 설정합니다.

output()도 참조하십시오 .

© 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.