QWaylandView Class

QWaylandView 클래스는 출력에서 서페이스의 뷰를 나타냅니다. 더 보기...

Header: #include <QWaylandView>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
QML에서: WaylandView
상속합니다: QObject

속성

공공 기능

QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr)
virtual ~QWaylandView() override
virtual bool advance()
bool allowDiscardFrontBuffer() const
virtual void bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage)
virtual QWaylandBufferRef currentBuffer()
virtual QRegion currentDamage()
virtual void discardCurrentBuffer()
bool isBufferLocked() const
bool isPrimary() const
QWaylandOutput *output() const
void setAllowDiscardFrontBuffer(bool discard)
void setBufferLocked(bool locked)
void setOutput(QWaylandOutput *output)
void setPrimary()
void setSurface(QWaylandSurface *surface)
QWaylandSurface *surface() const
struct wl_resource *surfaceResource() const

신호

상세 설명

QWaylandView는 특정 출력에 서페이스를 표시하는 것에 해당하며, 렌더링할 콘텐츠가 포함된 버퍼를 관리합니다. 동일한 서페이스에 여러 개의 뷰를 가질 수 있습니다.

속성 문서

allowDiscardFrontBuffer : bool

기본적으로 뷰는 advance()가 호출될 때까지 현재 버퍼를 잠급니다. 이 속성을 true 로 설정하면 기본 뷰가 더 이상 버퍼를 사용하지 않을 때 Qt가 버퍼를 해제할 수 있습니다.

이는 더 낮은 빈도로 업데이트되는 보조 뷰가 클라이언트 애플리케이션의 프레임 속도를 조절하는 상황을 피하는 데 사용할 수 있습니다.

액세스 기능:

bool allowDiscardFrontBuffer() const
void setAllowDiscardFrontBuffer(bool discard)

알림 신호:

void allowDiscardFrontBufferChanged()

bufferLocked : bool

이 속성은 뷰의 버퍼가 현재 잠겨 있는지 여부를 보유합니다. 버퍼가 잠겨 있으면 advance()는 다음 버퍼로 진행하지 않고 false 을 반환합니다.

기본값은 false 입니다.

액세스 함수

bool isBufferLocked() const
void setBufferLocked(bool locked)

알림 신호:

void bufferLockedChanged()

output : QWaylandOutput*

이 프로퍼티에는 이 뷰가 표면을 표시하는 출력이 저장됩니다.

함수에 액세스합니다:

QWaylandOutput *output() const
void setOutput(QWaylandOutput *output)

알림 신호:

void outputChanged()

surface : QWaylandSurface*

이 프로퍼티는 이 QWaylandView 에서 보는 표면을 보유합니다.

액세스 함수:

QWaylandSurface *surface() const
void setSurface(QWaylandSurface *surface)

알림 신호:

void surfaceChanged()

멤버 함수 문서

QWaylandView::QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr)

주어진 renderObjectparent 로 QWaylandView를 구축합니다.

[override virtual noexcept] QWaylandView::~QWaylandView()

QWaylandView 를 파괴합니다.

[virtual] bool QWaylandView::advance()

현재 버퍼와 손상 영역을 클라이언트가 커밋한 최신 버전으로 업데이트합니다. 이전 advance() 호출 이후 새 콘텐츠가 커밋된 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.

currentBuffer() 및 currentDamage()도 참조하세요 .

[virtual] void QWaylandView::bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage)

buffer damage 에는 현재 버퍼와 다른 영역, 즉 업데이트해야 하는 영역이 포함되어 있습니다. 새로운 은 다음 () 호출 시 최신 상태가 됩니다. buffer advance

이 함수를 재구현하는 서브클래스는 기본 구현을 호출해야 합니다.

[virtual] QWaylandBufferRef QWaylandView::currentBuffer()

이 뷰의 현재 버퍼에 대한 참조를 반환합니다.

[virtual] QRegion QWaylandView::currentDamage()

이 뷰의 현재 피해 영역을 반환합니다.

[virtual] void QWaylandView::discardCurrentBuffer()

뷰가 현재 버퍼를 강제로 삭제하여 클라이언트 측에서 재사용할 수 있도록 합니다.

bool QWaylandView::isPrimary() const

QWaylandView 이 기본 보기인 경우 true를 반환합니다. QWaylandSurface

QWaylandSurface::primaryView도 참조하세요 .

void QWaylandView::setPrimary()

QWaylandView 을 서페이스의 기본 보기로 설정합니다.

QWaylandView 에는 아무런 영향이 없습니다. QWaylandSurface

isPrimary() 및 QWaylandSurface::primaryView참조하세요 .

struct wl_resource *QWaylandView::surfaceResource() const

QWaylandView 에 대한 웨이랜드 표면 리소스를 반환합니다.

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