QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
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
82class QWT_EXPORT QwtDateScaleDraw : public QwtScaleDraw
83{
84public:
86 explicit QwtDateScaleDraw(Qt::TimeSpec timeSpec = Qt::LocalTime);
87
89 virtual ~QwtDateScaleDraw();
90
92 void setDateFormat(QwtDate::IntervalType, const QString&);
93
95 QString dateFormat(QwtDate::IntervalType) const;
96
98 void setTimeSpec(Qt::TimeSpec);
99
101 Qt::TimeSpec timeSpec() const;
102
104 void setUtcOffset(int seconds);
105
107 int utcOffset() const;
108
110 void setWeek0Type(QwtDate::Week0Type);
111
113 QwtDate::Week0Type week0Type() const;
114
116 virtual QwtText label(double) const override;
117
119 QDateTime toDateTime(double) const;
120
121protected:
122 virtual QwtDate::IntervalType intervalType(const QwtScaleDiv&) const;
123
124 virtual QString dateFormatOfDate(const QDateTime&, QwtDate::IntervalType) const;
125
126private:
127 class PrivateData;
128 PrivateData* m_data;
129};
130
131#endif
virtual QwtText label(double) const
将值转换为表示标签
Definition qwt_abstract_scale_draw.cpp:585
用于绘制日期时间刻度的类
Definition qwt_date_scale_draw.h:83
Week0Type
如何确定一年的第一周(不同国家标准不同)
Definition qwt_date.h:91
IntervalType
时间间隔的分类
Definition qwt_date.h:133
A class representing a scale division/表示刻度划分的类
Definition qwt_scale_div.h:53
用于绘制刻度的类
Definition qwt_scale_draw.h:62
表示文本的类
Definition qwt_text.h:93