QWaylandQuickItem Class
QWaylandQuickItem クラスはQWaylandView を表すQt Quick アイテムを提供します。
ヘッダー | #include <QWaylandQuickItem> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake | QT += waylandcompositor |
QML で | WaylandQuickItem |
を継承: | QQuickItem |
継承元: |
プロパティ
|
|
パブリック関数
QWaylandQuickItem(QQuickItem *parent = nullptr) | |
virtual | ~QWaylandQuickItem() override |
bool | allowDiscardFrontBuffer() const |
QWaylandCompositor * | compositor() const |
bool | focusOnClick() const |
bool | inputEventsEnabled() const |
bool | inputRegionContains(const QPointF &localPosition) const |
bool | isBufferLocked() const |
bool | isPaintEnabled() const |
QPointF | mapFromSurface(const QPointF &point) const |
QPointF | mapToSurface(const QPointF &point) const |
QWaylandSurface::Origin | origin() const |
QWaylandOutput * | output() const |
void | setAllowDiscardFrontBuffer(bool discard) |
void | setBufferLocked(bool locked) |
void | setFocusOnClick(bool focus) |
void | setInputEventsEnabled(bool enabled) |
void | setOutput(QWaylandOutput *output) |
void | setPrimary() |
void | setSubsurfaceHandler(QObject *) |
void | setSurface(QWaylandSurface *surface) |
void | setTouchEventsEnabled(bool enabled) |
QObject * | subsurfaceHandler() const |
QWaylandSurface * | surface() const |
bool | touchEventsEnabled() const |
QWaylandView * | view() const |
再実装パブリック関数
virtual QSGTextureProvider * | textureProvider() const override |
パブリック・スロット
void | setPaintEnabled(bool paintEnabled) |
virtual void | takeFocus(QWaylandSeat *device = nullptr) |
シグナル
void | allowDiscardFrontBufferChanged() |
void | bufferLockedChanged() |
void | compositorChanged() |
void | focusOnClickChanged() |
void | inputEventsEnabledChanged() |
void | originChanged() |
void | outputChanged() |
void | paintEnabledChanged() |
void | subsurfaceHandlerChanged() |
void | surfaceChanged() |
void | surfaceDestroyed() |
void | touchEventsEnabledChanged() |
詳細説明
Qt Quick でQWaylandCompositor を書くとき、このクラスはクライアントのコンテンツを出力デバイスに表示するために使用でき、ユーザー入力をクライアントに渡します。
プロパティ・ドキュメンテーション
allowDiscardFrontBuffer : bool
デフォルトでは、新しいバッファが利用可能になりupdatePaintNode() が呼び出されるまで、このアイテムは現在のバッファをロックします。このプロパティを true に設定すると、Qt は、スロットリングビューがバッファを使用しなくなったときに、すぐにバッファを解放することができます。これは、更新間隔が遅いアイテムの場合に便利です。
アクセス関数
bool | allowDiscardFrontBuffer() const |
void | setAllowDiscardFrontBuffer(bool discard) |
通知シグナル
void | allowDiscardFrontBufferChanged() |
bufferLocked : bool
このプロパティは、アイテムのバッファが現在ロックされているかどうかを保持する。バッファがロックされている限り、解放されてクライアントに返されることはありません。
デフォルトはfalseです。
アクセス関数です:
bool | isBufferLocked() const |
void | setBufferLocked(bool locked) |
通知シグナル
void | bufferLockedChanged() |
[read-only]
compositor : QWaylandCompositor* const
このプロパティは、このQWaylandQuickItem によってレンダリングされたサーフェスのコンポジターを保持します。
アクセス関数:
QWaylandCompositor * | compositor() const |
通知シグナル:
void | compositorChanged() |
focusOnClick : bool
このプロパティは、QWaylandQuickItem がクリックまたはタッチされたときにフォーカスを取るかどうかを指定します。
デフォルトはtrue
です。
アクセス関数:
bool | focusOnClick() const |
void | setFocusOnClick(bool focus) |
Notifier シグナル:
void | focusOnClickChanged() |
[read-only]
origin : const QWaylandSurface::Origin
このプロパティはQWaylandQuickItem の原点を保持する。
アクセス関数:
QWaylandSurface::Origin | origin() const |
通知シグナル:
void | originChanged() |
output : QWaylandOutput*
このプロパティは、この項目が表示される出力を保持する。
アクセス関数
QWaylandOutput * | output() const |
void | setOutput(QWaylandOutput *output) |
通知シグナル
void | outputChanged() |
paintEnabled : bool
アイテムが非表示の場合はtrue
を保持するが、テクスチャは更新される。visible をfalse
に設定してアイテムを非表示にするのとは対照的に、このプロパティをfalse
に設定しても、マウスやキーボード入力がアイテムに到達するのを妨げることはありません。
アクセス関数
bool | isPaintEnabled() const |
void | setPaintEnabled(bool paintEnabled) |
通知シグナル
void | paintEnabledChanged() |
surface : QWaylandSurface*
このプロパティは、このQWaylandQuickItem によってレンダリングされたサーフェスを保持します。
アクセス関数:
QWaylandSurface * | surface() const |
void | setSurface(QWaylandSurface *surface) |
通知シグナル:
void | surfaceChanged() |
touchEventsEnabled : bool
このプロパティは、タッチイベントがクライアントサーフェスに転送される場合はtrue
を保持し、そうでない場合はfalse
を保持する。
アクセス関数:
bool | touchEventsEnabled() const |
void | setTouchEventsEnabled(bool enabled) |
ノーティファイアシグナル:
void | touchEventsEnabledChanged() |
メンバー関数ドキュメント
QWaylandQuickItem::QWaylandQuickItem(QQuickItem *parent = nullptr)
与えられたparent で QWaylandQuickItem を構築します。
[override virtual noexcept]
QWaylandQuickItem::~QWaylandQuickItem()
QWaylandQuickItem を破壊する。
bool QWaylandQuickItem::inputRegionContains(const QPointF &localPosition) const
このアイテムの表面の入力領域がlocalPosition で与えられた位置を含む場合、true
を返す。
[invokable]
QPointF QWaylandQuickItem::mapFromSurface(const QPointF &point) const
Wayland サーフェスの座標系で指定されたpoint を、このアイテムの座標系で等価な点にマップし、マップされた座標を返す。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[invokable]
QPointF QWaylandQuickItem::mapToSurface(const QPointF &point) const
このアイテムの座標系で与えられたpoint を Wayland サーフェスの座標系で等価な点にマップし、マップされた座標を返す。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[invokable]
void QWaylandQuickItem::setPrimary()
このQWaylandQuickItem のビューをサーフェスのプライマリビューにします。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
QWaylandSurface::primaryViewも参照して ください。
[signal]
void QWaylandQuickItem::surfaceDestroyed()
このシグナルは、クライアントがQWaylandQuickItem に関連付けられたwl_surface
を破棄したときに発行される。このシグナルのハンドラは、QWaylandQuickItem を直ちに破棄するか、クローズアニメーションを開始してからアイテムを破棄することが期待される。
アニメーションが開始された場合、アニメーションが終了するまでアイテムのコンテンツが保持されるようにbufferLocked を設定する必要があります。
QWaylandQuickItem::bufferLockedも参照してください 。
[virtual slot]
void QWaylandQuickItem::takeFocus(QWaylandSeat *device = nullptr)
この関数を呼び出すと、その項目が入力device のフォーカスになります。
[override virtual]
QSGTextureProvider *QWaylandQuickItem::textureProvider() const
再実装:QQuickItem::textureProvider() const.
このQWaylandQuickItem のテクスチャプロバイダを返します。
QWaylandView *QWaylandQuickItem::view() const
このQWaylandQuickItem によってレンダリングされたビューを返します。
© 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.