QDateTimeAxis Class

QDateTimeAxis는 그래프의 축에 추가할 날짜/시간 값에 대한 지원을 추가합니다. 더 보기...

Header: #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 항목은 눈금 위치에 표시됩니다.

속성 문서

labelFormat : QString

이 속성은 축에 있는 날짜/시간 레이블의 형식을 유지합니다. 형식 속성을 사용하면 일, 월, 년 단위로 DateTime 개체의 시각적 표현을 나타낼 수 있습니다. 기본값은 dd-MMMM-yy입니다.

함수에 액세스합니다:

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

알림 신호:

void labelFormatChanged(const QString &format)

max : QDateTime

이 속성은 축의 최대값을 보유합니다.

이 값은 최소값보다 낮거나 높을 수 있습니다. DateTime은 내부적으로 UTC로 저장됩니다. 기본값은 새로운 Date(1980,1,1)입니다.

함수에 액세스합니다:

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

알림 신호:

void maxChanged(const QDateTime &max)

min : QDateTime

이 속성은 축의 최소값을 보유합니다.

이 값은 최대값보다 낮거나 높을 수 있습니다. DateTime은 내부적으로 UTC로 저장됩니다. 기본값은 새로운 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.