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::InvalidSurface | 0 | サーフェスが null であるか、何らかの理由で無効です。 |
QWaylandSurfaceGrabber::NoBufferAttached | 1 | クライアントがまだサーフェスにバッファをアタッチしていません。 |
QWaylandSurfaceGrabber::UnknownBufferType | 2 | サーフェスにアタッチされたバッファのタイプが不明です。 |
QWaylandSurfaceGrabber::RendererNotReady | 3 | コンポジター・レンダラーは、サーフェスのコンテンツを取得する準備ができていません。 |
メンバ関数のドキュメント
[explicit] QWaylandSurfaceGrabber::QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent = nullptr)
指定されたsurface を使用して、QWaylandSurfaceGrabberオブジェクトを作成し、parent
void QWaylandSurfaceGrabber::grab()
このオブジェクトに設定されたサーフェスの内容を取得します。すぐに取得できない場合があるため、取得が完了したことを通知するには、success および failed シグナルを使用する必要があります。
QWaylandSurface *QWaylandSurfaceGrabber::surface() const
このオブジェクトに設定されているサーフェスを返します
© 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.