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

Error列挙型は、グラブ失敗の原因を記述します。

定数説明
QWaylandSurfaceGrabber::InvalidSurface0サーフェスが NULL または有効でない。
QWaylandSurfaceGrabber::NoBufferAttached1クライアントがまだサーフェスにバッファをアタッチしていない。
QWaylandSurfaceGrabber::UnknownBufferType2サーフェスにアタッチされたバッファのタイプが不明です。
QWaylandSurfaceGrabber::RendererNotReady3コンポジターレンダラーがサーフェスコンテンツを取得する準備ができていない。

メンバ関数ドキュメント

[explicit] QWaylandSurfaceGrabber::QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent = nullptr)

QWaylandSurfaceGrabber オブジェクトを、与えられたsurfaceparent

void QWaylandSurfaceGrabber::grab()

このオブジェクトに設定されたサーフェスの内容をグラブする。すぐに実行することはできないかもしれないので、successシグナルとfailedシグナルを使用して、グラブの完了を通知する必要がある。

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.