QWT
7.0.1
Loading...
Searching...
No Matches
src
qwt_date_scale_draw.h
1
/******************************************************************************
2
* Qwt Widget Library
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*
9
* Modified by ChenZongYan in 2024 <czy.t@163.com>
10
* Summary of major modifications (see ChangeLog.md for full history):
11
* 1. CMake build system & C++11 throughout.
12
* 2. Core panner/ zoomer refactored:
13
* - QwtPanner → QwtCachePanner (pixmap-cache version)
14
* - New real-time QwtPlotPanner derived from QwtPicker.
15
* 3. Zoomer supports multi-axis.
16
* 4. Parasite-plot framework:
17
* - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18
* - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19
* 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20
* 6. Raster & color-map extensions:
21
* - QwtGridRasterData (2-D table + interpolation)
22
* - QwtLinearColorMap::stopColors(), stopPos() API rename.
23
* 7. Bar-chart: expose pen/brush control.
24
* 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25
*****************************************************************************/
26
27
#ifndef QWT_DATE_SCALE_DRAW_H
28
#define QWT_DATE_SCALE_DRAW_H
29
30
#include "qwt_global.h"
31
#include "qwt_scale_draw.h"
32
#include "qwt_date.h"
33
69
class
QWT_EXPORT
QwtDateScaleDraw
:
public
QwtScaleDraw
70
{
71
public
:
72
explicit
QwtDateScaleDraw
(Qt::TimeSpec timeSpec = Qt::LocalTime);
73
virtual
~QwtDateScaleDraw
();
74
75
void
setDateFormat(
QwtDate::IntervalType
,
const
QString&);
76
QString dateFormat(
QwtDate::IntervalType
)
const
;
77
78
void
setTimeSpec(Qt::TimeSpec);
79
Qt::TimeSpec timeSpec()
const
;
80
81
void
setUtcOffset(
int
seconds);
82
int
utcOffset()
const
;
83
84
void
setWeek0Type(
QwtDate::Week0Type
);
85
QwtDate::Week0Type
week0Type()
const
;
86
87
virtual
QwtText
label
(
double
)
const
QWT_OVERRIDE;
88
89
QDateTime toDateTime(
double
)
const
;
90
91
protected
:
92
virtual
QwtDate::IntervalType
intervalType(
const
QwtScaleDiv
&)
const
;
93
94
virtual
QString dateFormatOfDate(
const
QDateTime&,
QwtDate::IntervalType
)
const
;
95
96
private
:
97
class
PrivateData;
98
PrivateData* m_data;
99
};
100
101
#endif
QwtAbstractScaleDraw::label
virtual QwtText label(double) const
Convert a value into its representing label.
Definition
qwt_abstract_scale_draw.cpp:426
QwtDateScaleDraw
A class for drawing datetime scales.
Definition
qwt_date_scale_draw.h:70
QwtDate::Week0Type
Week0Type
How to identify the first week of year differs between countries.
Definition
qwt_date.h:67
QwtDate::IntervalType
IntervalType
Classification of an time interval.
Definition
qwt_date.h:93
QwtScaleDiv
A class representing a scale division/表示刻度划分的类
Definition
qwt_scale_div.h:53
QwtScaleDraw
A class for drawing scales.
Definition
qwt_scale_draw.h:53
QwtText
A class representing a text.
Definition
qwt_text.h:69
Generated by
1.9.8