QStyleOptionGraphicsItem Class
QStyleOptionGraphicsItem 클래스는 QGraphicsItem.. . 더 보기....
헤더: | #include <QStyleOptionGraphicsItem> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
상속합니다: | QStyleOption |
공용 타입
enum | StyleOptionType { Type } |
enum | StyleOptionVersion { Version } |
공용 함수
QStyleOptionGraphicsItem() | |
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) |
공용 변수
QRectF | exposedRect |
정적 공용 멤버
qreal | levelOfDetailFromTransform(const QTransform &worldTransform) |
상세 설명
성능상의 이유로 멤버 함수는 거의 없으며 멤버 변수에 직접 액세스합니다(예: .
또는 ->
연산자 사용). 이렇게 하면 구조가 사용하기 쉽고 스타일 함수에 사용되는 매개변수라는 점을 강조할 수 있습니다.
QStyleOption 및 QGraphicsItem::paint()도 참조하세요 .
멤버 유형 문서
enum QStyleOptionGraphicsItem::StyleOptionType
이 열거형은 스타일 옵션의 유형에 대한 정보를 저장하는 데 사용되며 각 QStyleOption 하위 클래스마다 정의됩니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionGraphicsItem::Type | SO_GraphicsItem | 제공되는 스타일 옵션의 유형입니다(이 클래스의 경우SO_GraphicsItem ). |
이 유형은 QStyleOption, 그 하위 클래스 및 qstyleoption_cast()에서 스타일 옵션의 유형을 결정하기 위해 내부적으로 사용됩니다. 일반적으로 자체 QStyleOption 하위 클래스와 자체 스타일을 만들려는 경우가 아니라면 이에 대해 걱정할 필요가 없습니다.
StyleOptionVersion 를참조하세요 .
enum QStyleOptionGraphicsItem::StyleOptionVersion
이 열거형은 스타일 옵션의 버전에 대한 정보를 저장하는 데 사용되며 각 QStyleOption 서브클래스에 대해 정의됩니다.
Constant | 값 | 설명 |
---|---|---|
QStyleOptionGraphicsItem::Version | 1 | 1 |
이 버전은 QStyleOption 하위 클래스에서 호환성을 깨지 않고 확장을 구현하는 데 사용됩니다. qstyleoption_cast ()를 사용하는 경우 일반적으로 확인할 필요가 없습니다.
StyleOptionType 를참조하세요 .
멤버 함수 문서
QStyleOptionGraphicsItem::QStyleOptionGraphicsItem()
Q스타일옵션그래픽아이템을 생성합니다.
QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other)
other 의 복사본을 생성합니다.
[static]
qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &worldTransform)
worldTransform 에서 디테일 레벨을 반환합니다.
이 값은 항목을 그리는 데 사용된 페인터의 worldTransform 를 사용하여 매핑된 유니티 사각형의 높이와 너비의 최대값을 나타냅니다. 기본적으로 변환이 적용되지 않은 경우 이 값은 1입니다. 1:2로 축소하면 세부 수준은 0.5가 되고 2:1로 확대하면 2가 됩니다.
QGraphicsScene::minimumRenderSize()도 참조하세요 .
멤버 변수 문서
QRectF QStyleOptionGraphicsItem::exposedRect
이 변수는 노출된 직사각형을 항목 좌표로 보유합니다.
항목의 일부만 노출된 경우 이 직사각형을 사용하여 항목 그리기 속도를 높일 수 있습니다. 전체 항목이 노출되는 경우 이 직사각형은 QGraphicsItem::boundingRect()와 동일합니다.
이 멤버는 QGraphicsItem::ItemUsesExtendedStyleOption 플래그가 설정된 항목에 대해서만 초기화됩니다.
© 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.