QWaylandView Class
QWaylandViewクラスは、出力上のサーフェスのビューを表します。さらに...
ヘッダー | #include <QWaylandView> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake | QT += waylandcompositor |
QML で | WaylandView |
継承: | QObject |
プロパティ
- allowDiscardFrontBuffer : bool
- bufferLocked : bool
- output : QWaylandOutput*
- surface : QWaylandSurface*
パブリック機能
QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr) | |
virtual | ~QWaylandView() override |
virtual bool | advance() |
bool | allowDiscardFrontBuffer() const |
virtual void | bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage) |
virtual QWaylandBufferRef | currentBuffer() |
virtual QRegion | currentDamage() |
virtual void | discardCurrentBuffer() |
bool | isBufferLocked() const |
bool | isPrimary() const |
QWaylandOutput * | output() const |
void | setAllowDiscardFrontBuffer(bool discard) |
void | setBufferLocked(bool locked) |
void | setOutput(QWaylandOutput *output) |
void | setPrimary() |
void | setSurface(QWaylandSurface *surface) |
QWaylandSurface * | surface() const |
struct wl_resource * | surfaceResource() const |
シグナル
void | allowDiscardFrontBufferChanged() |
void | bufferLockedChanged() |
void | outputChanged() |
void | surfaceChanged() |
プロパティの説明
allowDiscardFrontBuffer : bool
デフォルトでは、ビューはadvance() が呼び出されるまで現在のバッファをロックします。このプロパティをtrue
に設定すると、プライマリビューがバッファを使用しなくなったときに、Qt がバッファを解放します。
これは、低い頻度で更新されるセカンダリビューが、クライアントアプリケーションのフレームレートを遅くしてしまう状況を避けるために使用できます。
アクセス関数
bool | allowDiscardFrontBuffer() const |
void | setAllowDiscardFrontBuffer(bool discard) |
通知シグナル:
void | allowDiscardFrontBufferChanged() |
bufferLocked : bool
このプロパティは、ビューのバッファが現在ロックされているかどうかを保持する。バッファがロックされている場合、advance() は次のバッファに進まず、false
を返します。
デフォルトはfalse
です。
アクセス関数:
bool | isBufferLocked() const |
void | setBufferLocked(bool locked) |
通知シグナル:
void | bufferLockedChanged() |
output : QWaylandOutput*
このプロパティは、このビューがその表面を表示する出力を保持する。
アクセス関数:
QWaylandOutput * | output() const |
void | setOutput(QWaylandOutput *output) |
通知シグナル
void | outputChanged() |
surface : QWaylandSurface*
このプロパティは、このQWaylandView によって見られる表面を保持する。
アクセス関数:
QWaylandSurface * | surface() const |
void | setSurface(QWaylandSurface *surface) |
ノーティファイアシグナル:
void | surfaceChanged() |
メンバー関数ドキュメント
QWaylandView::QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr)
与えられたrenderObject とparent で QWaylandView を構築します。
[override virtual noexcept]
QWaylandView::~QWaylandView()
QWaylandView を破壊する。
[virtual]
bool QWaylandView::advance()
現在のバッファとダメージ領域を、クライアントによってコミットされた最新バージョンに更新する。前回 advance() をコールしてから新しいコンテンツがコミットされた場合は true を返す。そうでない場合は false を返す。
currentBuffer() およびcurrentDamage()も参照 。
[virtual]
void QWaylandView::bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage)
この関数は、新しいbuffer がこのビューのサーフェスにコミットされたときに呼び出される。damage には、現在のバッファとは異なる領域、つまり更新が必要な領域が含まれる。新しいbuffer は、次にadvance() が呼び出されたときにカレントとなります。
この関数を再実装するサブクラスは、ベース実装を呼び出す必要があります。
[virtual]
QWaylandBufferRef QWaylandView::currentBuffer()
このビューの現在のバッファへの参照を返します。
[virtual]
QRegion QWaylandView::currentDamage()
このビューの現在のダメージ領域を返します。
[virtual]
void QWaylandView::discardCurrentBuffer()
クライアント側で再利用できるように、ビューに現在のバッファを破棄させる。
bool QWaylandView::isPrimary() const
QWaylandView のプライマリビューである場合、true を返します。QWaylandSurface
QWaylandSurface::primaryViewも参照してください 。
void QWaylandView::setPrimary()
このQWaylandView をサーフェスのプライマリビューにします。
このQWaylandView が何も保持していない場合は効果がありません。QWaylandSurface
isPrimary() およびQWaylandSurface::primaryViewも参照してください 。
struct wl_resource *QWaylandView::surfaceResource() const
このQWaylandView の Wayland 表層リソースを返します。
© 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.