QDateTimeAxis Class

QDateTimeAxis は、グラフの軸に追加する DateTime 値のサポートを追加します。詳細...

ヘッダー #include <QDateTimeAxis>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake QT += graphs
QML で DateTimeAxis
継承: QAbstractAxis

プロパティ

パブリック機能

QString labelFormat() const
QDateTime max() const
QDateTime min() const
void setLabelFormat(const QString &format)
void setMax(const QDateTime &max)
void setMin(const QDateTime &min)
void setSubTickCount(int newSubTickCount)
void setTickInterval(qreal newTickInterval)
int subTickCount() const
qreal tickInterval() const

シグナル

void labelFormatChanged(const QString &format)
void maxChanged(const QDateTime &max)
void minChanged(const QDateTime &min)
void subTickCountChanged()
void tickIntervalChanged()

詳細説明

DateTime Axisを使用すると、目盛りとグリッド線でDateTime表現を表示できます。軸上の DateTime 項目は、目盛りの位置に表示されます。

プロパティの説明

labelFormat : QString

このプロパティは、軸上の DateTime ラベルの形式を保持します。フォーマット・プロパティでは、DateTime オブジェクトの視覚的な表現を日、月、および年で指定できます。既定値は dd-MMM-yy です。

アクセス関数:

QString labelFormat() const
void setLabelFormat(const QString &format)

ノーティファイア・シグナル:

void labelFormatChanged(const QString &format)

max : QDateTime

このプロパティは、軸の最大値を保持する。

この値は、最小値より低くても高くてもかまいません。DateTime は、内部的に UTC として格納されます。既定値は new Date(1980,1,1) です。

アクセス関数:

QDateTime max() const
void setMax(const QDateTime &max)

通知シグナル:

void maxChanged(const QDateTime &max)

min : QDateTime

このプロパティは、軸の最小値を保持する。

この値は、最大値より低くても高くてもかまいません。DateTime は、内部的に UTC として格納されます。既定値は new Date(1970,1,1) です。

アクセス関数:

QDateTime min() const
void setMin(const QDateTime &min)

通知シグナル:

void minChanged(const QDateTime &min)

subTickCount : int

このプロパティは、軸上のサブスティックの数を保持する。これは、グラフ上の主要な線の間に描かれるサブスティックの数を示します。ラベルはサブティックには描画されません。デフォルト値は 0 です。

アクセス関数:

int subTickCount() const
void setSubTickCount(int newSubTickCount)

通知シグナル:

void subTickCountChanged()

tickInterval : qreal

このプロパティは、動的に配置される目盛りマークとラベルの間隔を保持する。デフォルト値は0で、これは間隔が最小と最大の範囲に基づいて自動的に計算されることを意味する。

アクセス関数

qreal tickInterval() const
void setTickInterval(qreal newTickInterval)

通知シグナル:

void tickIntervalChanged()

© 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.