Skip to content

Class QAccelPlot::DateTimeTickLabelFormatter

ClassList > QAccelPlot > DateTimeTickLabelFormatter

A tick label formatter that displays tick values as formatted date/time strings. More...

  • #include <DateTimeTickLabelFormatter.hpp>

Inherits the following classes: QAccelPlot::TickLabelFormatter

Inheritance diagram

flowchart TB
  classQAccelPlot_1_1DateTimeTickLabelFormatter["QAccelPlot::DateTimeTickLabelFormatter"]

  classQAccelPlot_1_1TickLabelFormatter["QAccelPlot::TickLabelFormatter"]
  classQAccelPlot_1_1TickLabelFormatter --> classQAccelPlot_1_1DateTimeTickLabelFormatter
  click classQAccelPlot_1_1TickLabelFormatter "../classQAccelPlot_1_1TickLabelFormatter/" "Open QAccelPlot::TickLabelFormatter"

  external_base_classQAccelPlot_1_1TickLabelFormatter_1["QObject"]
  external_base_classQAccelPlot_1_1TickLabelFormatter_1 --> classQAccelPlot_1_1TickLabelFormatter

Public Properties

Type Name
property QString dateTimeFormat
The QDateTime format string used to render each tick label. Default: "yyyy-MM-dd HH:mm:ss" .

Public Properties inherited from QAccelPlot::TickLabelFormatter

See QAccelPlot::TickLabelFormatter

Type Name
property QML_ANONYMOUSQJSValue tickLabel
Optional JavaScript callback function(value, tickStep) that overridesdoFormat() .

Public Signals

Type Name
signal void dateTimeFormatChanged
Emitted when the dateTimeFormat property changes.

Public Signals inherited from QAccelPlot::TickLabelFormatter

See QAccelPlot::TickLabelFormatter

Type Name
signal void formatChanged
Emitted whenever a property that affects formatted output changes.
signal void tickLabelChanged
Emitted when the tickLabel property changes.

Public Functions

Type Name
DateTimeTickLabelFormatter (QObject * parent=nullptr)
Constructs a DateTimeTickLabelFormatter with the given__parent .
QString dateTimeFormat () const
Returns the current date/time format string.
void setDateTimeFormat (const QString & format)
Sets the date/time format string to format .

Public Functions inherited from QAccelPlot::TickLabelFormatter

See QAccelPlot::TickLabelFormatter

Type Name
TickLabelFormatter (QObject * parent=nullptr)
Constructs an TickLabelFormatter with the given__parent .
QString format (qreal value, qreal tickStep) const
Returns the display string for value at the given__tickStep .
QString formatLogTick (qreal value) const
Returns the display string for a major tick at value on a logarithmic axis.
virtual qreal minimumTickStep () const
Returns the smallest major tick step a linear axis may use with this formatter.
void setTickLabel (const QJSValue & tickLabel)
Sets the JavaScript override callback to tickLabel .
QJSValue tickLabel () const
Returns the optional JavaScript override callback.

Protected Functions

Type Name
virtual QString doFormat (qreal value, qreal tickStep) override const
Returns a date/time string for value (milliseconds since epoch).

Protected Functions inherited from QAccelPlot::TickLabelFormatter

See QAccelPlot::TickLabelFormatter

Type Name
virtual QString doFormat (qreal value, qreal tickStep) const = 0
Subclass entry point — returns the formatted label for value .
virtual QString doFormatLogTick (qreal value) const
Subclass entry point for log-scale major ticks — returns the label for value .

Detailed Description

Tick values are interpreted as milliseconds since the Unix epoch (1970-01-01T00:00:00 UTC). Nonfinite values and values outside the qint64 millisecond range produce an empty label.

See also: NumericTickLabelFormatter, TickLabelFormatter

Public Properties Documentation

property dateTimeFormat

The QDateTime format string used to render each tick label. Default: "yyyy-MM-dd HH:mm:ss" .

QString QAccelPlot::DateTimeTickLabelFormatter::dateTimeFormat;


Public Signals Documentation

signal dateTimeFormatChanged

Emitted when the dateTimeFormat property changes.

void QAccelPlot::DateTimeTickLabelFormatter::dateTimeFormatChanged;


Public Functions Documentation

function DateTimeTickLabelFormatter

Constructs a DateTimeTickLabelFormatter with the given__parent .

explicit QAccelPlot::DateTimeTickLabelFormatter::DateTimeTickLabelFormatter (
    QObject * parent=nullptr
) 


function dateTimeFormat

Returns the current date/time format string.

QString QAccelPlot::DateTimeTickLabelFormatter::dateTimeFormat () const


function setDateTimeFormat

Sets the date/time format string to format .

void QAccelPlot::DateTimeTickLabelFormatter::setDateTimeFormat (
    const QString & format
) 


Protected Functions Documentation

function doFormat

Returns a date/time string for value (milliseconds since epoch).

virtual QString QAccelPlot::DateTimeTickLabelFormatter::doFormat (
    qreal value,
    qreal tickStep
) override const

Implements QAccelPlot::TickLabelFormatter::doFormat



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/formatters/DateTimeTickLabelFormatter.hpp