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 |
| QWaylandXdgOutputManagerV1 * | manager() 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 | managerChanged() |
| void | nameChanged() |
| void | outputChanged() |
属性文档
description : QString
该属性包含对该输出的描述。
没有为描述定义惯例。
初始化后更改此属性不会生效。
访问函数:
| QString | description() const |
| void | setDescription(const QString &name) |
Notifier 信号:
| void | descriptionChanged() |
[read-only] logicalGeometry : QRect
该属性保留了输出在全局合成空间中的位置和大小。它是逻辑位置和逻辑大小的组合。
访问功能:
| QRect | logicalGeometry() const |
Notifier 信号:
| 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.