QCustom3DLabel Class
QCustom3DLabel 클래스는 그래프에 사용자 지정 레이블을 추가합니다. 더 보기...
Header: | #include <QCustom3DLabel> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
이후: | QtDataVisualization 1.1 |
QML에서: | Custom3DLabel |
상속합니다: | QCustom3DItem |
속성
|
공공 기능
QCustom3DLabel(QObject *parent = nullptr) | |
QCustom3DLabel(const QString &text, const QFont &font, const QVector3D &position, const QVector3D &scaling, const QQuaternion &rotation, QObject *parent = nullptr) | |
virtual | ~QCustom3DLabel() |
QColor | backgroundColor() const |
QFont | font() const |
bool | isBackgroundEnabled() const |
bool | isBorderEnabled() const |
bool | isFacingCamera() const |
void | setBackgroundColor(const QColor &color) |
void | setBackgroundEnabled(bool enabled) |
void | setBorderEnabled(bool enabled) |
void | setFacingCamera(bool enabled) |
void | setFont(const QFont &font) |
void | setText(const QString &text) |
void | setTextColor(const QColor &color) |
QString | text() const |
QColor | textColor() const |
신호
void | backgroundColorChanged(const QColor &color) |
void | backgroundEnabledChanged(bool enabled) |
void | borderEnabledChanged(bool enabled) |
void | facingCameraChanged(bool enabled) |
void | fontChanged(const QFont &font) |
void | textChanged(const QString &text) |
void | textColorChanged(const QColor &color) |
상세 설명
사용자 지정 라벨의 텍스트, 글꼴, 위치, 크기 조정, 회전 및 색상을 설정할 수 있습니다. 또한 라벨의 테두리 및 배경의 표시 여부도 전환할 수 있습니다. 색상, 테두리 및 배경은 명시적으로 설정하지 않는 한 활성 테마에 의해 결정됩니다.
참고: 크기 조정 시 z 좌표는 영향을 미치지 않습니다. 동일한 x 및 y 좌표를 설정하면 원래 글꼴 크기가 유지됩니다.
QAbstract3DGraph::addCustomItem()도 참조하세요 .
속성 문서
backgroundColor : QColor
이 속성은 활성화된 경우 레이블 배경의 색상을 유지합니다.
기본값은 Qt::gray
입니다.
기능에 액세스합니다:
QColor | backgroundColor() const |
void | setBackgroundColor(const QColor &color) |
알림 신호:
void | backgroundColorChanged(const QColor &color) |
backgroundEnabled 를참조하세요 .
backgroundEnabled : bool
이 속성은 레이블 배경을 활성화할지 여부를 보유합니다.
false
로 설정하면 backgroundColor()은 아무런 영향을 미치지 않습니다. 기본값은 true
입니다.
기능에 액세스합니다:
bool | isBackgroundEnabled() const |
void | setBackgroundEnabled(bool enabled) |
알림 신호:
void | backgroundEnabledChanged(bool enabled) |
borderEnabled : bool
이 속성은 레이블 테두리 활성화 여부를 보유합니다.
기본값은 true
입니다.
액세스 기능:
bool | isBorderEnabled() const |
void | setBorderEnabled(bool enabled) |
알림 신호:
void | borderEnabledChanged(bool enabled) |
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(const QColor &color) |
알림 신호:
void | textColorChanged(const QColor &color) |
borderEnabled 를참조하세요 .
멤버 함수 문서
[explicit]
QCustom3DLabel::QCustom3DLabel(QObject *parent = nullptr)
주어진 parent 으로 사용자 지정 3D 라벨을 생성합니다.
[explicit]
QCustom3DLabel::QCustom3DLabel(const QString &text, const QFont &font, const QVector3D &position, const QVector3D &scaling, const QQuaternion &rotation, QObject *parent = nullptr)
주어진 text, font, position, scaling, rotation 및 선택 사항인 parent 로 사용자 지정 3D 라벨을 생성합니다.
참고: scaling 에 동일한 x 및 y 좌표를 설정하면 원래 글꼴 치수가 유지됩니다.
[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.