QWaylandWlShellSurface 类
QWaylandWlShellSurface 类为表面提供了桌面风格编缉器特定的功能。 更多...
| 头文件 | #include <QWaylandWlShellSurface> | 
| CMake | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) | 
| qmake | QT += waylandcompositor | 
| 由以下实例化 | WlShellSurface | 
| 继承 | QWaylandShellSurfaceTemplate | 
公开类型
| 枚举 | ResizeEdge { NoneEdge, TopEdge, BottomEdge, LeftEdge, TopLeftEdge, …, BottomRightEdge } | 
属性
- className : const QString
- shell : QWaylandWlShell* const
- surface : QWaylandSurface* const
- title : const QString
公开函数
| QWaylandWlShellSurface() | |
| QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res) | |
| QString | className() const | 
| void | initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource) | 
| void | sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges) | 
| void | sendPopupDone() | 
| QWaylandWlShell * | shell() const | 
| QWaylandSurface * | surface() const | 
| QString | title() const | 
公开槽函数
| void | ping() | 
信号
| void | classNameChanged() | 
| void | shellChanged() | 
| void | surfaceChanged() | 
| void | titleChanged() | 
静态公开成员
| QWaylandWlShellSurface * | fromResource(wl_resource *resource) | 
详细信息
此类是 QWaylandWlShell 扩展的一部分,提供了一种扩展现有 QWaylandSurface 功能的方式,这些功能专门针对桌面风格编缉器,例如调整大小和移动表面。
它对应于 Wayland 接口 wl_shell_surface。
成员类型文档
枚举 QWaylandWlShellSurface::ResizeEdge
此枚举类型提供了一种指定表面边或角的方法。
| 常量 | 值 | 描述 | 
|---|---|---|
| QWaylandWlShellSurface::NoneEdge | 0 | 无边。 | 
| QWaylandWlShellSurface::TopEdge | 1 | 顶部边缘。 | 
| QWaylandWlShellSurface::BottomEdge | 2 | 底部边缘。 | 
| QWaylandWlShellSurface::LeftEdge | 4 | 左侧边缘。 | 
| QWaylandWlShellSurface::TopLeftEdge | 5 | 左上角。 | 
| QWaylandWlShellSurface::BottomLeftEdge | 6 | 左下角。 | 
| QWaylandWlShellSurface::RightEdge | 8 | 右侧边缘。 | 
| QWaylandWlShellSurface::TopRightEdge | 9 | 右上角。 | 
| QWaylandWlShellSurface::BottomRightEdge | 10 | 右下角。 | 
属性文档
[只读] className : const QString
此属性保存了 QWaylandWlShellSurface 的类名。
访问函数
| QString | className() const | 
通知信号
| void | classNameChanged() | 
[只读] shell : QWaylandWlShell* const
此属性保存了与该 QWaylandWlShellSurface 关联的 shell。
访问函数
| QWaylandWlShell * | shell() const | 
通知信号
| void | shellChanged() | 
[只读] surface : QWaylandSurface* const
此属性保存了与该 QWaylandWlShellSurface 关联的 surface。
访问函数
| QWaylandSurface * | surface() const | 
通知信号
| void | surfaceChanged() | 
[只读] title : const QString
此属性保存了 QWaylandWlShellSurface 的标题。
访问函数
| QString | title() const | 
通知信号
| void | titleChanged() | 
成员函数文档
QWaylandWlShellSurface::QWaylandWlShellSurface()
构建一个 QWaylandWlShellSurface。
QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)
为 surface 构建一个 QWaylandWlShellSurface,并用给定的 shell 和资源 res 进行初始化。
[静态] QWaylandWlShellSurface *QWaylandWlShellSurface::fromResource(wl_resource *resource)
返回与给定 resource 关联的 QWaylandWlShellSurface 对象,或如果不存在这样的对象,则返回 null。
[可调用] void QWaylandWlShellSurface::initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)
初始化 QWaylandWlShellSurface 并将其与给定的 shell、surface 和 resource 关联。
注意: 此函数可以通过元对象系统并从 QML 中调用。请参阅 Q_INVOKABLE。
[槽] void QWaylandWlShellSurface::ping()
向客户端发送ping事件。如果客户端回复此事件,则将发出pong信号。
[可调用] void QWaylandWlShellSurface::sendConfigure(const QSize &大小, QWaylandWlShellSurface::ResizeEdge 边缘)
向客户端发送configure事件,建议将其表面调整为提供的大小。边缘提供有关如何调整表面大小的提示。
注意: 此函数可以通过元对象系统并从 QML 中调用。请参阅 Q_INVOKABLE。
[可调用] void QWaylandWlShellSurface::sendPopupDone()
向客户端发送popup_done事件,指示用户已点击客户端表面的外部位置。
注意: 此函数可以通过元对象系统并从 QML 中调用。请参阅 Q_INVOKABLE。
© 2024 Qt公司有限公司。此处包括的文档贡献的版权属于各自的所有者。此处提供的文档根据自由软件基金会发布的GNU自由文档许可协议版本1.3的条款进行许可。Qt以及相应的标志是芬兰及其它世界各地Qt公司有限责任公司的商标。所有其他商标均为各自所有者的财产。