QDateTimeAxis Class

QDateTimeAxis unterstützt die Hinzufügung von DateTime-Werten zu den Achsen eines Diagramms. Mehr...

Kopfzeile: #include <QDateTimeAxis>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake: QT += graphs
In QML: DateTimeAxis
Vererbt: QAbstractAxis

Eigenschaften

Öffentliche Funktionen

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

Signale

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

Detaillierte Beschreibung

Eine DateTime-Achse kann verwendet werden, um DateTime-Darstellungen mit Tick-Markierungen und Gitternetzlinien anzuzeigen. Die DateTime-Elemente auf der Achse werden an der Position der Häkchen angezeigt.

Dokumentation der Eigenschaft

labelFormat : QString

Diese Eigenschaft enthält das Format der DateTime-Etiketten auf der Achse. Mit der Eigenschaft format kann die visuelle Darstellung des DateTime-Objekts in Tagen, Monaten und Jahren angegeben werden. Der Standardwert ist dd-MMMM-yy.

Zugriffsfunktionen:

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

Melder-Signal:

void labelFormatChanged(const QString &format)

max : QDateTime

Diese Eigenschaft enthält den maximalen Wert auf der Achse

Dieser Wert kann niedriger oder höher als der Mindestwert sein. Die DateTime wird intern als UTC gespeichert. Der Standardwert ist new Date(1980,1,1)

Zugriffsfunktionen:

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

Benachrichtigungssignal:

void maxChanged(const QDateTime &max)

min : QDateTime

Diese Eigenschaft enthält den Mindestwert auf der Achse

Dieser Wert kann niedriger oder höher als der Maximalwert sein. Die DateTime wird intern als UTC gespeichert. Der Standardwert ist new Date(1970,1,1)

Zugriffsfunktionen:

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

Benachrichtigungssignal:

void minChanged(const QDateTime &min)

subTickCount : int

Diese Eigenschaft enthält die Anzahl der Unterstriche auf der Achse. Sie gibt an, wie viele Unterstriche zwischen den Hauptlinien im Diagramm gezeichnet werden. Beschriftungen werden für Unterstriche nicht gezeichnet. Der Standardwert ist 0.

Zugriffsfunktionen:

int subTickCount() const
void setSubTickCount(int newSubTickCount)

Benachrichtigungssignal:

void subTickCountChanged()

tickInterval : qreal

Diese Eigenschaft gibt den Abstand zwischen dynamisch platzierten Häkchen und Beschriftungen an. Der Standardwert ist 0, was bedeutet, dass die Intervalle automatisch auf der Grundlage des Min- und Max-Bereichs berechnet werden.

Zugriffsfunktionen:

qreal tickInterval() const
void setTickInterval(qreal newTickInterval)

Melder-Signal:

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.