QWaylandSurfaceGrabber Class
QWaylandSurfaceGrabber 클래스를 사용하면 QWaylandSurface.. . 더보기....
헤더: | #include <QWaylandSurfaceGrabber> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake: | QT += waylandcompositor |
상속합니다: | QObject |
공용 타입
enum | Error { InvalidSurface, NoBufferAttached, UnknownBufferType, RendererNotReady } |
공용 함수
QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent = nullptr) | |
void | grab() |
QWaylandSurface * | surface() const |
상세 설명
사용자에게 스크린샷을 제공하기 위해 표면의 내용을 가져와야 할 때가 있습니다. QWaylandSurfaceGrabber 클래스는 공유 메모리, OpenGL 등 서페이스를 뒷받침하는 버퍼 유형에 신경 쓸 필요 없이 이를 위한 간단한 메서드를 제공합니다.
멤버 유형 문서
enum QWaylandSurfaceGrabber::Error
오류 열거형은 그랩 실패의 이유를 설명합니다.
Constant | 값 | 설명 |
---|---|---|
QWaylandSurfaceGrabber::InvalidSurface | 0 | 서페이스가 널이거나 유효하지 않습니다. |
QWaylandSurfaceGrabber::NoBufferAttached | 1 | 클라이언트가 서페이스에 버퍼를 아직 첨부하지 않았습니다. |
QWaylandSurfaceGrabber::UnknownBufferType | 2 | 서페이스에 첨부된 버퍼가 알 수 없는 유형입니다. |
QWaylandSurfaceGrabber::RendererNotReady | 3 | 컴포저 렌더러가 표면 콘텐츠를 가져올 준비가 되지 않았습니다. |
멤버 함수 문서
[explicit]
QWaylandSurfaceGrabber::QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent = nullptr)
주어진 surface 및 parent
void QWaylandSurfaceGrabber::grab()
이 오브젝트에 설정된 서페이스의 콘텐츠를 가져옵니다. 이 작업을 즉시 수행하지 못할 수도 있으므로 성공 및 실패 신호를 사용하여 그래프가 완료되면 알림을 받아야 합니다.
QWaylandSurface *QWaylandSurfaceGrabber::surface() const
이 오브젝트에 설정된 표면을 반환합니다.
© 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.