QCustom3DLabel Class
QCustom3DLabel 클래스는 그래프에 사용자 지정 레이블을 추가합니다. 더 보기...
Header: | #include <QCustom3DLabel> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
qmake: | QT += graphs |
QML에서: | Custom3DLabel |
상속합니다: | QCustom3DItem |
- 상속된 멤버를 포함한 모든 멤버 목록
- QCustom3DLabel은 Qt Graphs 3D용 C++ 클래스의 일부입니다.
속성
|
공공 기능
QCustom3DLabel(QObject *parent = nullptr) | |
QCustom3DLabel(const QString &text, const QFont &font, QVector3D position, QVector3D scaling, const QQuaternion &rotation, QObject *parent = nullptr) | |
virtual | ~QCustom3DLabel() override |
QColor | backgroundColor() const |
QFont | font() const |
bool | isBackgroundVisible() const |
bool | isBorderVisible() const |
bool | isFacingCamera() const |
void | setBackgroundColor(QColor color) |
void | setBackgroundVisible(bool visible) |
void | setBorderVisible(bool visible) |
void | setFacingCamera(bool enabled) |
void | setFont(const QFont &font) |
void | setText(const QString &text) |
void | setTextColor(QColor color) |
QString | text() const |
QColor | textColor() const |
신호
void | backgroundColorChanged(QColor color) |
void | backgroundVisibleChanged(bool visible) |
void | borderVisibleChanged(bool visible) |
void | facingCameraChanged(bool enabled) |
void | fontChanged(const QFont &font) |
void | textChanged(const QString &text) |
void | textColorChanged(QColor color) |
상세 설명
사용자 지정 라벨의 텍스트, 글꼴, 위치, 크기 조정, 회전 및 색상을 설정할 수 있습니다. 또한 라벨의 테두리 및 배경의 표시 여부도 전환할 수 있습니다. 색상, 테두리 및 배경은 명시적으로 설정하지 않는 한 활성 테마에 의해 결정됩니다.
참고: 크기 조정 시 z 좌표는 영향을 미치지 않습니다. 동일한 x 및 y 좌표를 설정하면 원래 글꼴 크기가 유지됩니다.
Q3DGraphsWidgetItem::addCustomItem()도 참조하세요 .
속성 문서
backgroundColor : QColor
이 속성은 활성화된 경우 레이블 배경의 색상을 유지합니다.
기본값은 Qt::gray
입니다.
기능에 액세스합니다:
QColor | backgroundColor() const |
void | setBackgroundColor(QColor color) |
알림 신호:
void | backgroundColorChanged(QColor color) |
backgroundVisible 를참조하세요 .
backgroundVisible : bool
이 속성은 레이블 배경이 표시되는지 여부를 보유합니다.
false
로 설정하면 backgroundColor()은 아무런 영향을 미치지 않습니다. 기본값은 true
입니다.
기능에 액세스합니다:
bool | isBackgroundVisible() const |
void | setBackgroundVisible(bool visible) |
알림 신호:
void | backgroundVisibleChanged(bool visible) |
borderVisible : bool
이 속성은 레이블 테두리가 표시되는지 여부를 지정합니다.
기본값은 true
입니다.
액세스 함수:
bool | isBorderVisible() const |
void | setBorderVisible(bool visible) |
알림 신호:
void | borderVisibleChanged(bool visible) |
facingCamera : bool
이 속성은 레이블이 항상 카메라를 향하도록 할지 여부를 지정합니다.
기본값은 false
입니다. true
로 설정하면 rotation()는 영향을 미치지 않습니다.
액세스 기능:
bool | isFacingCamera() const |
void | setFacingCamera(bool enabled) |
알림 신호:
void | facingCameraChanged(bool enabled) |
font : QFont
이 속성에는 레이블에 사용할 글꼴이 저장됩니다.
기본값은 QFont("Arial", 20)
입니다. 특수 서식(예: 윤곽선)은 지원되지 않습니다.
기능에 액세스합니다:
QFont | font() const |
void | setFont(const QFont &font) |
알림 신호:
void | fontChanged(const QFont &font) |
text : QString
이 속성에는 레이블의 텍스트가 저장됩니다.
서식 있는 텍스트는 지원되지 않습니다.
함수 액세스:
QString | text() const |
void | setText(const QString &text) |
알림 신호:
void | textChanged(const QString &text) |
textColor : QColor
이 속성은 레이블 텍스트의 색상을 지정합니다.
활성화된 경우 레이블 테두리에도 영향을 줍니다. 기본값은 Qt::white
입니다.
기능에 액세스합니다:
QColor | textColor() const |
void | setTextColor(QColor color) |
알림 신호:
void | textColorChanged(QColor color) |
borderVisible 를참조하세요 .
멤버 함수 문서
[explicit]
QCustom3DLabel::QCustom3DLabel(QObject *parent = nullptr)
주어진 parent 으로 사용자 지정 3D 라벨을 생성합니다.
[explicit]
QCustom3DLabel::QCustom3DLabel(const QString &text, const QFont &font, QVector3D position, QVector3D scaling, const QQuaternion &rotation, QObject *parent = nullptr)
주어진 text, font, position, scaling, rotation 및 선택 사항인 parent 로 사용자 지정 3D 라벨을 생성합니다.
참고: scaling 에 동일한 x 및 y 좌표를 설정하면 원래 글꼴 치수가 유지됩니다.
[override virtual noexcept]
QCustom3DLabel::~QCustom3DLabel()
사용자 지정 3D 레이블을 삭제합니다.
© 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.