QCustom3DLabel Class
QCustom3DLabel クラスは、グラフにカスタムラベルを追加します。詳細...
ヘッダ | #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) |
Notifier シグナル:
void | backgroundColorChanged(const QColor &color) |
backgroundEnabledも参照 。
backgroundEnabled : bool
このプロパティは、ラベルの背景を有効にするかどうかを保持する。
false
に設定されている場合、backgroundColor() は何の効果も持たない。デフォルトはtrue
。
アクセス関数:
bool | isBackgroundEnabled() const |
void | setBackgroundEnabled(bool enabled) |
Notifier シグナル:
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) |
Notifier シグナル:
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.