|
| QwtDateScaleDraw (Qt::TimeSpec=Qt::LocalTime) |
| Constructor. More...
|
|
virtual | ~QwtDateScaleDraw () |
| Destructor.
|
|
void | setDateFormat (QwtDate::IntervalType, const QString &) |
|
QString | dateFormat (QwtDate::IntervalType) const |
|
void | setTimeSpec (Qt::TimeSpec) |
|
Qt::TimeSpec | timeSpec () const |
|
void | setUtcOffset (int seconds) |
|
int | utcOffset () const |
|
void | setWeek0Type (QwtDate::Week0Type) |
|
QwtDate::Week0Type | week0Type () const |
|
virtual QwtText | label (double) const |
| Convert a value into its representing label. More...
|
|
QDateTime | toDateTime (double) const |
|
| QwtScaleDraw () |
| Constructor. More...
|
|
virtual | ~QwtScaleDraw () |
| Destructor.
|
|
void | getBorderDistHint (const QFont &, int &start, int &end) const |
| Determine the minimum border distance. More...
|
|
int | minLabelDist (const QFont &) const |
|
int | minLength (const QFont &) const |
|
virtual double | extent (const QFont &) const |
|
void | move (double x, double y) |
|
void | move (const QPointF &) |
| Move the position of the scale. More...
|
|
void | setLength (double length) |
|
Alignment | alignment () const |
|
void | setAlignment (Alignment) |
|
Qt::Orientation | orientation () const |
|
QPointF | pos () const |
|
double | length () const |
|
void | setLabelAlignment (Qt::Alignment) |
| Change the label flags. More...
|
|
Qt::Alignment | labelAlignment () const |
|
void | setLabelRotation (double rotation) |
|
double | labelRotation () const |
|
int | maxLabelHeight (const QFont &) const |
|
int | maxLabelWidth (const QFont &) const |
|
QPointF | labelPosition (double val) const |
|
QRectF | labelRect (const QFont &, double val) const |
|
QSizeF | labelSize (const QFont &, double val) const |
|
QRect | boundingLabelRect (const QFont &, double val) const |
| Find the bounding rectangle for the label. More...
|
|
| QwtAbstractScaleDraw () |
| Constructor. More...
|
|
virtual | ~QwtAbstractScaleDraw () |
| Destructor.
|
|
void | setScaleDiv (const QwtScaleDiv &s) |
|
const QwtScaleDiv & | scaleDiv () const |
|
void | setTransformation (QwtTransform *) |
|
const QwtScaleMap & | scaleMap () const |
|
QwtScaleMap & | scaleMap () |
|
void | enableComponent (ScaleComponent, bool enable=true) |
|
bool | hasComponent (ScaleComponent) const |
|
void | setTickLength (QwtScaleDiv::TickType, double length) |
|
double | tickLength (QwtScaleDiv::TickType) const |
|
double | maxTickLength () const |
|
void | setSpacing (double margin) |
| Set the spacing between tick and labels. More...
|
|
double | spacing () const |
| Get the spacing. More...
|
|
void | setPenWidth (int width) |
| Specify the width of the scale pen. More...
|
|
int | penWidth () const |
|
virtual void | draw (QPainter *, const QPalette &) const |
| Draw the scale. More...
|
|
void | setMinimumExtent (double) |
| Set a minimum for the extent. More...
|
|
double | minimumExtent () const |
|
A class for drawing datetime scales.
QwtDateScaleDraw displays values as datetime labels. The format of the labels depends on the alignment of the major tick labels.
The default format strings are:
- Millisecond
"hh:mm:ss:zzz\nddd dd MMM yyyy"
- Second
"hh:mm:ss\nddd dd MMM yyyy"
- Minute
"hh:mm\nddd dd MMM yyyy"
- Hour
"hh:mm\nddd dd MMM yyyy"
- Day
"ddd dd MMM yyyy"
- Week
"Www yyyy"
- Month
"MMM yyyy"
- Year
"yyyy"
The format strings can be modified using setDateFormat() or individually for each tick label by overloading dateFormatOfDate(),
Usually QwtDateScaleDraw is used in combination with QwtDateScaleEngine, that calculates scales for datetime intervals.
- See Also
- QwtDateScaleEngine, QwtPlot::setAxisScaleDraw()