The QWaylandQuickItem class provides a Qt Quick item representing a QWaylandView . 更多...
头: | #include <QWaylandQuickItem> |
qmake: | QT += waylandcompositor |
Since: | Qt 5.8 |
继承: | QQuickItem |
继承者: | QWaylandQuickShellSurfaceItem |
|
|
QWaylandQuickItem (QQuickItem * parent = nullptr) | |
~QWaylandQuickItem () | |
bool | allowDiscardFrontBuffer () const |
QWaylandCompositor * | compositor () const |
bool | focusOnClick () const |
bool | inputEventsEnabled () const |
QVariant | inputMethodQuery (Qt::InputMethodQuery query , QVariant argument ) const |
bool | inputRegionContains (const QPointF & localPosition ) |
bool | isBufferLocked () const |
QPointF | mapToSurface (const QPointF & point ) const |
QWaylandSurface::Origin | origin () const |
QWaylandOutput * | output () const |
bool | paintEnabled () const |
void | setAllowDiscardFrontBuffer (bool discard ) |
void | setBufferLocked (bool locked ) |
void | setFocusOnClick (bool focus ) |
void | setInputEventsEnabled (bool enabled ) |
void | setOutput (QWaylandOutput * output ) |
void | setPrimary () |
void | setSizeFollowsSurface (bool sizeFollowsSurface ) |
void | setSubsurfaceHandler ( QObject * ) |
void | setSurface (QWaylandSurface * surface ) |
void | setTouchEventsEnabled (bool enabled ) |
bool | sizeFollowsSurface () const |
QObject * | subsurfaceHandler () const |
QWaylandSurface * | surface () const |
bool | touchEventsEnabled () const |
QWaylandView * | view () const |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query ) const override |
virtual bool | isTextureProvider () const override |
virtual QSGTextureProvider * | textureProvider () const override |
void | lower () |
void | raise () |
void | setPaintEnabled (bool paintEnabled ) |
virtual void | takeFocus (QWaylandSeat * device = nullptr) |
void | allowDiscardFrontBufferChanged () |
void | bufferLockedChanged () |
void | focusOnClickChanged () |
void | inputEventsEnabledChanged () |
void | mouseMove (const QPointF & windowPosition ) |
void | mouseRelease () |
void | originChanged () |
void | outputChanged () |
void | sizeFollowsSurfaceChanged () |
void | subsurfaceHandlerChanged () |
void | surfaceChanged () |
void | surfaceDestroyed () |
void | touchEventsEnabledChanged () |
virtual void | touchUngrabEvent () override |
virtual QSGNode * | updatePaintNode (QSGNode * oldNode , UpdatePaintNodeData * ) override |
The QWaylandQuickItem class provides a Qt Quick item representing a QWaylandView .
When writing a QWaylandCompositor in Qt Quick, this class can be used to display a client's contents on an output device and will pass user input to the client.
By default, the item locks the current buffer until a new buffer is available and updatePaintNode () is called. Set this property to true to allow Qt to release the buffer immediately when the throttling view is no longer using it. This is useful for items that have slow update intervals.
访问函数:
bool | allowDiscardFrontBuffer () const |
void | setAllowDiscardFrontBuffer (bool discard ) |
通知程序信号:
void | allowDiscardFrontBufferChanged () |
This property holds whether the item's buffer is currently locked. As long as the buffer is locked, it will not be released and returned to the client.
默认为 false。
访问函数:
bool | isBufferLocked () const |
void | setBufferLocked (bool locked ) |
通知程序信号:
void | bufferLockedChanged () |
This property holds the compositor for the surface rendered by this QWaylandQuickItem .
访问函数:
QWaylandCompositor * | compositor () const |
This property specifies whether the QWaylandQuickItem should take focus when it is clicked or touched.
默认为
true
.
访问函数:
bool | focusOnClick () const |
void | setFocusOnClick (bool focus ) |
通知程序信号:
void | focusOnClickChanged () |
访问函数:
bool | inputEventsEnabled () const |
void | setInputEventsEnabled (bool enabled ) |
通知程序信号:
void | inputEventsEnabledChanged () |
This property holds the origin of the QWaylandQuickItem .
访问函数:
QWaylandSurface::Origin | origin () const |
通知程序信号:
void | originChanged () |
This property holds the output on which this item is displayed.
访问函数:
QWaylandOutput * | output () const |
void | setOutput (QWaylandOutput * output ) |
通知程序信号:
void | outputChanged () |
访问函数:
bool | paintEnabled () const |
void | setPaintEnabled (bool paintEnabled ) |
This property specifies whether the size of the item should always match the size of its surface.
默认为
true
.
访问函数:
bool | sizeFollowsSurface () const |
void | setSizeFollowsSurface (bool sizeFollowsSurface ) |
通知程序信号:
void | sizeFollowsSurfaceChanged () |
访问函数:
QObject * | subsurfaceHandler () const |
void | setSubsurfaceHandler ( QObject * ) |
通知程序信号:
void | subsurfaceHandlerChanged () |
This property holds the surface rendered by this QWaylandQuickItem .
访问函数:
QWaylandSurface * | surface () const |
void | setSurface (QWaylandSurface * surface ) |
通知程序信号:
void | surfaceChanged () |
访问函数:
bool | touchEventsEnabled () const |
void | setTouchEventsEnabled (bool enabled ) |
通知程序信号:
void | touchEventsEnabledChanged () |
构造 QWaylandQuickItem 采用给定 parent .
Destroy the QWaylandQuickItem .
[override virtual]
QVariant
QWaylandQuickItem::
inputMethodQuery
(
Qt::InputMethodQuery
query
) const
返回
true
if the input region of this item's surface contains the position given by
localPosition
.
[override virtual]
bool
QWaylandQuickItem::
isTextureProvider
() const
[slot]
void
QWaylandQuickItem::
lower
()
Maps the given point in this item's coordinate system to the equivalent point within the Wayland surface's coordinate system, and returns the mapped coordinate.
[signal]
void
QWaylandQuickItem::
mouseMove
(const
QPointF
&
windowPosition
)
[signal]
void
QWaylandQuickItem::
mouseRelease
()
Returns true if the item is hidden, though the texture is still updated. As opposed to hiding the item by setting
visible
to
false
, setting this property to
false
will not prevent mouse or keyboard input from reaching item.
注意: Getter 函数对于特性 paintEnabled .
另请参阅 setPaintEnabled ().
[slot]
void
QWaylandQuickItem::
raise
()
Makes this QWaylandQuickItem 's view the primary view for the surface.
另请参阅 QWaylandSurface::primaryView .
[signal]
void
QWaylandQuickItem::
surfaceDestroyed
()
This signal is emitted when the client has destroyed the
wl_surface
associated with the
QWaylandQuickItem
. The handler for this signal is expected to either destroy the
QWaylandQuickItem
immediately or start a close animation and then destroy the Item.
If an animation is started, bufferLocked should be set to ensure the item keeps its content until the animation finishes
另请参阅 QWaylandQuickkItem::bufferLocked.
[virtual slot]
void
QWaylandQuickItem::
takeFocus
(
QWaylandSeat
*
device
= nullptr)
Calling this function causes the item to take the focus of the input device .
[override virtual]
QSGTextureProvider
*QWaylandQuickItem::
textureProvider
() const
重实现自 QQuickItem::textureProvider ().
Returns the texture provider of this QWaylandQuickItem .
[override virtual protected]
void
QWaylandQuickItem::
touchUngrabEvent
()
[override virtual protected]
QSGNode
*QWaylandQuickItem::
updatePaintNode
(
QSGNode
*
oldNode
,
UpdatePaintNodeData *
)
Returns the view rendered by this QWaylandQuickItem .