QWT API (中文)
7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
src
plot
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
58
class
QWT_EXPORT
QwtDateScaleDraw
:
public
QwtScaleDraw
59
{
60
public
:
62
explicit
QwtDateScaleDraw
(Qt::TimeSpec timeSpec = Qt::LocalTime);
63
65
~QwtDateScaleDraw
()
override
;
66
68
void
setDateFormat(
QwtDate::IntervalType
,
const
QString&);
69
71
QString dateFormat(
QwtDate::IntervalType
)
const
;
72
74
void
setTimeSpec(Qt::TimeSpec);
75
77
Qt::TimeSpec timeSpec()
const
;
78
80
void
setUtcOffset(
int
seconds);
81
83
int
utcOffset()
const
;
84
86
void
setWeek0Type(
QwtDate::Week0Type
);
87
89
QwtDate::Week0Type
week0Type()
const
;
90
92
virtual
QwtText
label
(
double
)
const override
;
93
95
QDateTime toDateTime(
double
)
const
;
96
97
protected
:
98
virtual
QwtDate::IntervalType
intervalType(
const
QwtScaleDiv
&)
const
;
99
100
virtual
QString dateFormatOfDate(
const
QDateTime&,
QwtDate::IntervalType
)
const
;
101
102
private
:
103
QWT_DECLARE_PRIVATE(
QwtDateScaleDraw
)
104
};
105
106
#endif
QwtAbstractScaleDraw::label
virtual QwtText label(double) const
Convert a value into its representing label
Definition
qwt_abstract_scale_draw.cpp:431
QwtDateScaleDraw
A class for drawing datetime scales
Definition
qwt_date_scale_draw.h:59
QwtDate::Week0Type
Week0Type
How to identify the first week of year differs between countries
Definition
qwt_date.h:68
QwtDate::IntervalType
IntervalType
Classification of a time interval
Definition
qwt_date.h:91
QwtScaleDiv
A class representing a scale division
Definition
qwt_scale_div.h:47
QwtScaleDraw
A class for drawing scales
Definition
qwt_scale_draw.h:52
QwtText
A class representing a text
Definition
qwt_text.h:70
制作者
1.9.8