本页内容

QWaylandIviSurface Class

QWaylandIviSurface 类提供了一种简单的方法来识别和调整表面的大小。更多内容...

头文件: #include <QWaylandIviSurface>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
在 QML 中: IviSurface
继承自: QWaylandShellSurfaceTemplate

属性

公共函数

QWaylandIviSurface()
QWaylandIviSurface(QWaylandIviApplication *application, QWaylandSurface *surface, uint iviId, const QWaylandResource &resource)
void initialize(QWaylandIviApplication *iviApplication, QWaylandSurface *surface, uint iviId, const QWaylandResource &resource)
uint iviId() const
void sendConfigure(const QSize &size)
QWaylandSurface *surface() const

信号

静态公共成员

QWaylandIviSurface *fromResource(wl_resource *resource)
const struct wl_interface *interface()
QWaylandSurfaceRole *role()

详细说明

该类是QWaylandIviApplication 扩展的一部分,提供了一种方法来扩展现有QWaylandSurface 的功能,使其能够调整大小并进行标识。

它对应于 Wayland 的ivi_surface 接口。

属性文档

[read-only] iviId : uint

该属性存储了此QWaylandIviSurface 的 ivi 标识符。

访问函数:

uint iviId() const

通知信号:

void iviIdChanged()

[read-only] surface : QWaylandSurface*

该属性存储与该QWaylandIviSurface 关联的表面。

访问函数:

QWaylandSurface *surface() const

通知信号:

void surfaceChanged()

成员函数文档

QWaylandIviSurface::QWaylandIviSurface()

创建一个 QWaylandIviSurface 对象。

QWaylandIviSurface::QWaylandIviSurface(QWaylandIviApplication *application, QWaylandSurface *surface, uint iviId, const QWaylandResource &resource)

为surface 创建一个QWaylandIviSurface,并使用给定的application 、surface 、iviId 和resource 对其进行初始化。

[static] QWaylandIviSurface *QWaylandIviSurface::fromResource(wl_resource *resource)

返回与resource 对应的QWaylandIviSurface 。

[invokable] void QWaylandIviSurface::initialize(QWaylandIviApplication *iviApplication, QWaylandSurface *surface, uint iviId, const QWaylandResource &resource)

初始化QWaylandIviSurface ,并将它与给定的iviApplication 、surface 、iviId 和resource 关联起来。

注意: 可通过元对象系统和 QML 调用此 函数。参见Q_INVOKABLE 。

[static] const struct wl_interface *QWaylandIviSurface::interface()

返回QWaylandIviSurface 的Wayland接口。

[static] QWaylandSurfaceRole *QWaylandIviSurface::role()

返回QWaylandIviSurface 的表面角色。

[invokable] void QWaylandIviSurface::sendConfigure(const QSize &size)

向客户端发送一个配置事件,指示其将画布调整为给定的size 。

注意:此 函数可通过元对象系统和 QML 调用。参见Q_INVOKABLE 。

© 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.