QCustom3DLabel Class
QCustom3DLabel クラスは、グラフにカスタムラベルを追加します。詳細...
ヘッダ | #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 C++ Classes for 3D に含まれます。
プロパティ
|
パブリック機能
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) |
Notifier シグナル:
void | backgroundColorChanged(QColor color) |
backgroundVisibleも参照 。
backgroundVisible : bool
このプロパティは、ラベルの背景を表示するかどうかを保持する。
false
に設定されている場合、backgroundColor() は何の効果も持たない。デフォルトはtrue
。
アクセス関数:
bool | isBackgroundVisible() const |
void | setBackgroundVisible(bool visible) |
Notifier シグナル:
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) |
Notifier シグナル:
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.