QWaylandOutput Class
QWaylandOutput 클래스는 컴포지터가 관리하는 표시 가능 영역을 나타냅니다. 더 보기...
| 헤더: | #include <QWaylandOutput> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| QML에서: | WaylandOutput |
| 상속: | QWaylandObject |
공개 유형
| enum | Subpixel { SubpixelUnknown, SubpixelNone, SubpixelHorizontalRgb, SubpixelHorizontalBgr, SubpixelVerticalRgb, SubpixelVerticalBgr } |
| enum | Transform { TransformNormal, Transform90, Transform180, Transform270, TransformFlipped, …, TransformFlipped270 } |
속성
|
|
공개 함수
| QWaylandOutput(QWaylandCompositor *compositor, QWindow *window) | |
| virtual | ~QWaylandOutput() override |
| void | addMode(const QWaylandOutputMode &mode, bool preferred = false) |
| QRect | availableGeometry() const |
| QWaylandCompositor * | compositor() const |
| QWaylandOutputMode | currentMode() const |
| void | frameStarted() |
| QRect | geometry() const |
| QString | manufacturer() const |
| QString | model() const |
| QList<QWaylandOutputMode> | modes() const |
| QSize | physicalSize() const |
| QPoint | position() const |
| int | scaleFactor() const |
| void | sendFrameCallbacks() |
| void | setAvailableGeometry(const QRect &availableGeometry) |
| void | setCurrentMode(const QWaylandOutputMode &mode) |
| void | setManufacturer(const QString &manufacturer) |
| void | setModel(const QString &model) |
| void | setPhysicalSize(const QSize &size) |
| void | setPosition(const QPoint &pt) |
| void | setScaleFactor(int scale) |
| void | setSizeFollowsWindow(bool follow) |
| void | setSubpixel(const QWaylandOutput::Subpixel &subpixel) |
| void | setTransform(const QWaylandOutput::Transform &transform) |
| void | setWindow(QWindow *window) |
| bool | sizeFollowsWindow() const |
| QWaylandOutput::Subpixel | subpixel() const |
| QWaylandOutput::Transform | transform() const |
| virtual void | update() |
| QWindow * | window() const |
신호
| void | availableGeometryChanged() |
| void | compositorChanged() |
| void | geometryChanged() |
| void | manufacturerChanged() |
| void | modelChanged() |
| void | physicalSizeChanged() |
| void | positionChanged() |
| void | scaleFactorChanged() |
| void | sizeFollowsWindowChanged() |
| void | subpixelChanged() |
| void | transformChanged() |
| void | windowChanged() |
정적 공용 멤버
| QWaylandOutput * | fromResource(wl_resource *resource) |
상세 설명
QWaylandOutput은 컴포지터의 지오메트리 경계 내의 직사각형 영역을 관리하여 클라이언트 콘텐츠를 표시하는 데 사용합니다. 예를 들어, 이는 WaylandCompositor 가 관리하는 화면일 수 있습니다.
이 클래스는 Wayland 프로토콜의 wl_output 인터페이스에 해당합니다.
멤버 유형 문서
enum QWaylandOutput::Subpixel
이 열거형 유형은 QWaylandOutput 의 서브픽셀 배열을 지정하는 데 사용됩니다.
| 상수 | 값 | 상수설명 |
|---|---|---|
QWaylandOutput::SubpixelUnknown | 0 | 서브픽셀 배열이 설정되어 있지 않습니다. |
QWaylandOutput::SubpixelNone | 1 | 서브픽셀이 없습니다. |
QWaylandOutput::SubpixelHorizontalRgb | 2 | 서브픽셀이 빨강, 녹색, 파랑 순서로 수평으로 배열되어 있습니다. |
QWaylandOutput::SubpixelHorizontalBgr | 3 | 서브픽셀이 파란색, 녹색, 빨간색 순서로 수평으로 배열되어 있습니다. |
QWaylandOutput::SubpixelVerticalRgb | 4 | 서브픽셀이 빨강, 녹색, 파랑 순서로 수직으로 배열되어 있습니다. |
QWaylandOutput::SubpixelVerticalBgr | 5 | 서브픽셀이 파랑, 녹색, 빨강 순서로 수직으로 배열되어 있습니다. |
QWaylandOutput::subpixel도 참조하십시오 .
enum QWaylandOutput::Transform
* * 이 열거형 유형은 ` QWaylandOutput`의 방향을 지정하는 데 사용됩니다. * *
| 상수 | 값 | 설명 |
|---|---|---|
QWaylandOutput::TransformNormal | 0 | 방향이 정상입니다. * |
QWaylandOutput::Transform90 | 1 | 방향이 90도 회전된 상태입니다. * |
QWaylandOutput::Transform180 | 2 | 방향이 180도 회전되었습니다. * |
QWaylandOutput::Transform270 | 3 | 방향은 270도 회전되었습니다. * |
QWaylandOutput::TransformFlipped | 4 | 방향이 대칭 반전되었습니다. * |
QWaylandOutput::TransformFlipped90 | 5 | 방향은 대칭 처리되고 90도 회전되었습니다. * |
QWaylandOutput::TransformFlipped180 | 6 | 방향은 대칭 반전되고 180도 회전됩니다. * |
QWaylandOutput::TransformFlipped270 | 7 | 방향은 대칭 처리되고 270도 회전되었습니다. * * |
QWaylandOutput::transform도 참조하십시오 .
속성 설명서
availableGeometry : QRect
이 속성은 콘텐츠 표시를 위해 사용할 수 있는 QWaylandOutput 의 기하 정보를 포함합니다. 사용 가능한 기하 정보는 출력 좌표계에 있으며, 0,0에서 시작하고 기본적으로 출력 영역과 동일한 크기를 가집니다.
액세스 함수:
| QRect | availableGeometry() const |
| void | setAvailableGeometry(const QRect &availableGeometry) |
알림 신호:
| void | availableGeometryChanged() |
관련 항목: QWaylandOutput::currentMode 및 QWaylandOutput::geometry.
compositor : QWaylandCompositor*
이 속성은 이 QWaylandOutput 에 콘텐츠를 표시하는 컴포지터를 지정합니다.
참고: 이 속성은 QWaylandOutput 가 초기화되기 전에 한 번만 설정할 수 있습니다.
액세스 함수:
| QWaylandCompositor * | compositor() const |
알림 신호:
| void | compositorChanged() |
[read-only] geometry : QRect
이 속성은 QWaylandOutput 의 기하학적 정보를 포함합니다.
액세스 함수:
| QRect | geometry() const |
알림 신호:
| void | geometryChanged() |
참조: QWaylandOutput::currentMode.
manufacturer : QString
이 속성에는 이 QWaylandOutput 에서 관리하는 디스플레이의 제조업체에 대한 텍스트 설명이 포함되어 있습니다.
액세스 함수:
| QString | manufacturer() const |
| void | setManufacturer(const QString &manufacturer) |
알림 신호:
| void | manufacturerChanged() |
model : QString
이 속성은 이 QWaylandOutput 에서 관리하는 디스플레이 모델에 대한 텍스트 설명을 포함합니다.
액세스 함수:
| QString | model() const |
| void | setModel(const QString &model) |
알림 신호:
| void | modelChanged() |
physicalSize : QSize
이 속성은 QWaylandOutput 의 물리적 크기를 밀리미터 단위로 저장합니다.
액세스 함수:
| QSize | physicalSize() const |
| void | setPhysicalSize(const QSize &size) |
알림 신호:
| void | physicalSizeChanged() |
관련 항목: QWaylandOutput::geometry 및 QWaylandOutput::currentMode.
position : QPoint
이 속성은 컴포지터의 좌표계에서 이 QWaylandOutput 의 위치를 나타냅니다.
액세스 함수:
| QPoint | position() const |
| void | setPosition(const QPoint &pt) |
알림 신호:
| void | positionChanged() |
scaleFactor : int
이 속성은 표면 버퍼가 표시되기 전에 QWaylandCompositor 가 버퍼를 확대/축소하는 배율을 저장합니다. 이는 확대/축소되지 않은 콘텐츠가 너무 작아 실용적이지 않은 고밀도 출력 장치에서 사용됩니다. 클라이언트는 출력 장치에 적합한 고해상도 콘텐츠를 제공하고자 할 경우, 출력에 맞춰 버퍼의 확대/축소 배율을 설정할 수 있습니다.
기본값은 1(확대/축소 없음)입니다.
액세스 함수:
| int | scaleFactor() const |
| void | setScaleFactor(int scale) |
알림 신호:
| void | scaleFactorChanged() |
sizeFollowsWindow : bool
이 속성은 ‘ QWaylandOutput ’의 크기가 해당 창의 크기와 일치하는지 여부를 제어합니다.
이 속성이 true인 경우, 이전에 추가된 모든 모드는 창 크기와 화면 재생 빈도에 맞는 모드로 대체됩니다.
기본값은 false입니다.
액세스 함수:
| bool | sizeFollowsWindow() const |
| void | setSizeFollowsWindow(bool follow) |
알림 신호:
| void | sizeFollowsWindowChanged() |
subpixel : QWaylandOutput::Subpixel
이 속성은 이 QWaylandOutput 의 서브픽셀 배열을 나타냅니다. 기본값은 QWaylandOutput::SubpixelUnknown 입니다.
액세스 함수:
| QWaylandOutput::Subpixel | subpixel() const |
| void | setSubpixel(const QWaylandOutput::Subpixel &subpixel) |
알림 신호:
| void | subpixelChanged() |
transform : QWaylandOutput::Transform
이 속성은 QWaylandCompositor 가 QWaylandOutput 의 방향을 보정하기 위해 표면에 적용하는 변환을 저장합니다.
기본값은 QWaylandOutput::TransformNormal 입니다.
액세스 함수:
| QWaylandOutput::Transform | transform() const |
| void | setTransform(const QWaylandOutput::Transform &transform) |
알림 신호:
| void | transformChanged() |
window : QWindow*
이 속성은 이 QWaylandOutput 에 대한 QWindow 를 포함합니다.
액세스 함수:
| QWindow * | window() const |
| void | setWindow(QWindow *window) |
알림 신호:
| void | windowChanged() |
멤버 함수 문서
QWaylandOutput::QWaylandOutput(QWaylandCompositor *compositor, QWindow *window)
compositor 에서 지정된 window 를 사용하여 QWaylandOutput을 생성합니다. 해당 compositor 에 대한 QWaylandOutput을 생성하기 전에 create() 함수를 호출해야 합니다.
QWaylandOutput 객체는 나중에 이벤트에 반응하여 초기화됩니다. 이 시점에서 해당 객체는 compositor 의 출력으로 추가됩니다. 이 compositor 에 대해 생성된 첫 번째 QWaylandOutput 객체라면, 해당 객체가 default output 가 됩니다.
[override virtual noexcept] QWaylandOutput::~QWaylandOutput()
QWaylandOutput 를 삭제합니다.
void QWaylandOutput::addMode(const QWaylandOutputMode &mode, bool preferred = false)
출력에 mode 모드를 추가하고, preferred 가 true 인 경우 이를 우선 모드로 지정합니다. 우선 모드는 하나만 지정될 수 있다는 점에 유의하십시오.
QWaylandCompositor *QWaylandOutput::compositor() const
이 QWaylandOutput 에 대한 컴포지터를 반환합니다.
참고: compositor 속성에 대한게터 함수입니다.
QWaylandOutputMode QWaylandOutput::currentMode() const
출력의 크기를 픽셀 단위로, 재생 빈도를 mHz 단위로 반환합니다. 현재 모드가 설정되어 있지 않으면 유효하지 않은 모드를 반환합니다.
setCurrentMode(), QWaylandOutput::modes 및 QWaylandOutputMode도 참조하십시오 .
void QWaylandOutput::frameStarted()
QWaylandOutput 에 프레임이 시작되었음을 알립니다.
[static] QWaylandOutput *QWaylandOutput::fromResource(wl_resource *resource)
resource 에 해당하는 ` QWaylandOutput `를 반환합니다.
QList<QWaylandOutputMode> QWaylandOutput::modes() const
모드 목록을 반환합니다.
void QWaylandOutput::sendFrameCallbacks()
보류 중인 프레임 콜백을 전송합니다.
void QWaylandOutput::setCurrentMode(const QWaylandOutputMode &mode)
현재 모드를 설정합니다. mode 모드는 미리 추가되어 있어야 합니다.
currentMode(), QWaylandOutput::modes 및 QWaylandOutputMode도 참조하십시오 .
[virtual] void QWaylandOutput::update()
QEvent::UpdateRequest 를 QWaylandOutput 의 window 로 전송하도록 예약합니다.
QWindow::requestUpdate()도 참조하십시오 .
© 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.