QWaylandXdgOutputV1 Class
表示合成器中的显示。更多...
| 标题: | #include <QWaylandXdgOutputV1> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| 在 QML 中: | XdgOutputV1 |
| 继承自: | QObject |
属性
|
|
公共函数
| QString | description() const |
| QRect | logicalGeometry() const |
| QPoint | logicalPosition() const |
| QSize | logicalSize() const |
| QString | name() const |
| QWaylandOutput * | output() const |
| void | setDescription(const QString &name) |
| void | setLogicalPosition(const QPoint &position) |
| void | setLogicalSize(const QSize &size) |
| void | setName(const QString &name) |
信号
| void | descriptionChanged() |
| void | logicalGeometryChanged() |
| void | logicalPositionChanged() |
| void | logicalSizeChanged() |
| void | nameChanged() |
| void | outputChanged() |
属性文档
description : QString
该属性包含此输出的描述。
描述内容没有定义任何约定。
初始化后更改此属性不会生效。
访问函数:
| QString | description() const |
| void | setDescription(const QString &name) |
通知信号:
| void | descriptionChanged() |
[read-only] logicalGeometry : QRect
该属性存储输出在全局合成器空间中的位置和大小。它是逻辑位置和逻辑大小的组合。
访问函数:
| QRect | logicalGeometry() const |
通知信号:
| void | logicalGeometryChanged() |
另请参阅 QWaylandXdgOutputV1::logicalPosition 和QWaylandXdgOutputV1::logicalSize 。
logicalPosition : QPoint
该属性保存了输出在全局合成器坐标系中的坐标。
默认值为 0,0。
访问函数:
| QPoint | logicalPosition() const |
| void | setLogicalPosition(const QPoint &position) |
通知信号:
| void | logicalPositionChanged() |
logicalSize : QSize
该属性存储输出在全局合成器空间中的尺寸。
默认值为 -1,-1,该值无效。
请注意,这是逻辑尺寸,而非物理尺寸。例如,对于WaylandOutput 模式下的3840x2160分辨率和缩放因子2:
- 如果合成器不缩放表面缓冲区,则会报告逻辑尺寸为 3840x2160。
- 会自动缩放表面缓冲区的合成器将报告逻辑尺寸为 1920x1080。
- 使用 1.5 这种分数缩放系数的合成器,将报告逻辑尺寸为 2560x1620。
访问函数:
| QSize | logicalSize() const |
| void | setLogicalSize(const QSize &size) |
通知信号:
| void | logicalSizeChanged() |
name : QString
该属性存储此输出的名称。
命名规则由合成器定义,但仅限于字母数字字符和连字符(“-”)。每个名称都是唯一的,并且在使用相同硬件和软件配置的会话中将保持一致。
名称示例包括“HDMI-A-1”、“WL-1”、“X11-1”等……但请不要认为名称反映了底层技术。
初始化后更改此属性不会生效。
访问函数:
| QString | name() const |
| void | setName(const QString &name) |
通知信号:
| void | nameChanged() |
[read-only] output : QWaylandOutput*
该属性存储与该QWaylandXdgOutputV1 关联的QWaylandOutput 。
访问函数:
| QWaylandOutput * | output() const |
通知器信号:
| void | outputChanged() |
© 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.