File: QwtDateScaleDraw.3

package info (click to toggle)
qwt 6.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,848 kB
  • ctags: 15,811
  • sloc: cpp: 57,382; makefile: 41
file content (360 lines) | stat: -rw-r--r-- 7,483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
.TH "QwtDateScaleDraw" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtDateScaleDraw \- 
.PP
A class for drawing datetime scales\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_date_scale_draw\&.h>\fP
.PP
Inherits \fBQwtScaleDraw\fP\&.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtDateScaleDraw\fP (Qt::TimeSpec=Qt::LocalTime)"
.br
.RI "\fIConstructor\&. \fP"
.ti -1c
.RI "virtual \fB~QwtDateScaleDraw\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetDateFormat\fP (\fBQwtDate::IntervalType\fP, const QString &)"
.br
.ti -1c
.RI "QString \fBdateFormat\fP (\fBQwtDate::IntervalType\fP) const "
.br
.ti -1c
.RI "void \fBsetTimeSpec\fP (Qt::TimeSpec)"
.br
.ti -1c
.RI "Qt::TimeSpec \fBtimeSpec\fP () const "
.br
.ti -1c
.RI "void \fBsetUtcOffset\fP (int seconds)"
.br
.ti -1c
.RI "int \fButcOffset\fP () const "
.br
.ti -1c
.RI "void \fBsetWeek0Type\fP (\fBQwtDate::Week0Type\fP)"
.br
.ti -1c
.RI "\fBQwtDate::Week0Type\fP \fBweek0Type\fP () const "
.br
.ti -1c
.RI "virtual \fBQwtText\fP \fBlabel\fP (double) const "
.br
.RI "\fIConvert a value into its representing label\&. \fP"
.ti -1c
.RI "QDateTime \fBtoDateTime\fP (double) const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual \fBQwtDate::IntervalType\fP \fBintervalType\fP (const \fBQwtScaleDiv\fP &) const "
.br
.ti -1c
.RI "virtual QString \fBdateFormatOfDate\fP (const QDateTime &, \fBQwtDate::IntervalType\fP) const "
.br
.in -1c
.SS "Additional Inherited Members"
.SH "Detailed Description"
.PP 
A class for drawing datetime scales\&. 

\fBQwtDateScaleDraw\fP displays values as datetime labels\&. The format of the labels depends on the alignment of the major tick labels\&.
.PP
The default format strings are:
.PP
.IP "\(bu" 2
Millisecond
.br
 'hh:mm:ss:zzz\\nddd dd MMM yyyy'
.IP "\(bu" 2
Second
.br
 'hh:mm:ss\\nddd dd MMM yyyy'
.IP "\(bu" 2
Minute
.br
 'hh:mm\\nddd dd MMM yyyy'
.IP "\(bu" 2
Hour
.br
 'hh:mm\\nddd dd MMM yyyy'
.IP "\(bu" 2
Day
.br
 'ddd dd MMM yyyy'
.IP "\(bu" 2
Week
.br
 'Www yyyy'
.IP "\(bu" 2
Month
.br
 'MMM yyyy'
.IP "\(bu" 2
Year
.br
 'yyyy'
.PP
.PP
The format strings can be modified using \fBsetDateFormat()\fP or individually for each tick label by overloading \fBdateFormatOfDate()\fP,
.PP
Usually \fBQwtDateScaleDraw\fP is used in combination with \fBQwtDateScaleEngine\fP, that calculates scales for datetime intervals\&.
.PP
\fBSee Also:\fP
.RS 4
\fBQwtDateScaleEngine\fP, \fBQwtPlot::setAxisScaleDraw()\fP 
.RE
.PP

.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtDateScaleDraw::QwtDateScaleDraw (Qt::TimeSpectimeSpec = \fCQt::LocalTime\fP)"

.PP
Constructor\&. The default setting is to display tick labels for the given time specification\&. The first week of a year is defined like for \fBQwtDate::FirstThursday\fP\&.
.PP
\fBParameters:\fP
.RS 4
\fItimeSpec\fP Time specification
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetTimeSpec()\fP, \fBsetWeek0Type()\fP 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "QString QwtDateScaleDraw::dateFormat (\fBQwtDate::IntervalType\fPintervalType) const"

.PP
\fBParameters:\fP
.RS 4
\fIintervalType\fP Interval type 
.RE
.PP
\fBReturns:\fP
.RS 4
Default format string for an datetime interval type 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetDateFormat()\fP, \fBdateFormatOfDate()\fP 
.RE
.PP

.SS "QString QwtDateScaleDraw::dateFormatOfDate (const QDateTime &dateTime, \fBQwtDate::IntervalType\fPintervalType) const\fC [protected]\fP, \fC [virtual]\fP"
Format string for the representation of a datetime
.PP
\fBdateFormatOfDate()\fP is intended to be overloaded for situations, where formats are individual for specific datetime values\&.
.PP
The default setting ignores dateTime and return the default format for the interval type\&.
.PP
\fBParameters:\fP
.RS 4
\fIdateTime\fP Datetime value 
.br
\fIintervalType\fP Interval type 
.RE
.PP
\fBReturns:\fP
.RS 4
Format string
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetDateFormat()\fP, \fBQwtDate::toString()\fP 
.RE
.PP

.SS "\fBQwtDate::IntervalType\fP QwtDateScaleDraw::intervalType (const \fBQwtScaleDiv\fP &scaleDiv) const\fC [protected]\fP, \fC [virtual]\fP"
Find the less detailed datetime unit, where no rounding errors happen\&.
.PP
\fBParameters:\fP
.RS 4
\fIscaleDiv\fP Scale division 
.RE
.PP
\fBReturns:\fP
.RS 4
Interval type
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBdateFormatOfDate()\fP 
.RE
.PP

.SS "\fBQwtText\fP QwtDateScaleDraw::label (doublevalue) const\fC [virtual]\fP"

.PP
Convert a value into its representing label\&. The value is converted to a datetime value using \fBtoDateTime()\fP and converted to a plain text using \fBQwtDate::toString()\fP\&.
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Value 
.RE
.PP
\fBReturns:\fP
.RS 4
Label string\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBdateFormatOfDate()\fP 
.RE
.PP

.PP
Reimplemented from \fBQwtAbstractScaleDraw\fP\&.
.SS "void QwtDateScaleDraw::setDateFormat (\fBQwtDate::IntervalType\fPintervalType, const QString &format)"
Set the default format string for an datetime interval type
.PP
\fBParameters:\fP
.RS 4
\fIintervalType\fP Interval type 
.br
\fIformat\fP Default format string
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBdateFormat()\fP, \fBdateFormatOfDate()\fP, \fBQwtDate::toString()\fP 
.RE
.PP

.SS "void QwtDateScaleDraw::setTimeSpec (Qt::TimeSpectimeSpec)"
Set the time specification used for the tick labels
.PP
\fBParameters:\fP
.RS 4
\fItimeSpec\fP Time specification 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBtimeSpec()\fP, \fBsetUtcOffset()\fP, \fBtoDateTime()\fP 
.RE
.PP

.SS "void QwtDateScaleDraw::setUtcOffset (intseconds)"
Set the offset in seconds from Coordinated Universal Time
.PP
\fBParameters:\fP
.RS 4
\fIseconds\fP Offset in seconds
.RE
.PP
\fBNote:\fP
.RS 4
The offset has no effect beside for the time specification Qt::OffsetFromUTC\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
QDate::utcOffset(), \fBsetTimeSpec()\fP, \fBtoDateTime()\fP 
.RE
.PP

.SS "void QwtDateScaleDraw::setWeek0Type (\fBQwtDate::Week0Type\fPweek0Type)"
Sets how to identify the first week of a year\&.
.PP
\fBParameters:\fP
.RS 4
\fIweek0Type\fP Mode how to identify the first week of a year
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBweek0Type()\fP\&. 
.RE
.PP
\fBNote:\fP
.RS 4
week0Type has no effect beside for intervals classified as \fBQwtDate::Week\fP\&. 
.RE
.PP

.SS "Qt::TimeSpec QwtDateScaleDraw::timeSpec () const"

.PP
\fBReturns:\fP
.RS 4
Time specification used for the tick labels 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetTimeSpec()\fP, \fButcOffset()\fP, \fBtoDateTime()\fP 
.RE
.PP

.SS "QDateTime QwtDateScaleDraw::toDateTime (doublevalue) const"
Translate a double value into a QDateTime object\&.
.PP
\fBReturns:\fP
.RS 4
QDateTime object initialized with \fBtimeSpec()\fP and \fButcOffset()\fP\&. 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBtimeSpec()\fP, \fButcOffset()\fP, \fBQwtDate::toDateTime()\fP 
.RE
.PP

.SS "int QwtDateScaleDraw::utcOffset () const"

.PP
\fBReturns:\fP
.RS 4
Offset in seconds from Coordinated Universal Time 
.RE
.PP
\fBNote:\fP
.RS 4
The offset has no effect beside for the time specification Qt::OffsetFromUTC\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
QDate::setUtcOffset(), \fBsetTimeSpec()\fP, \fBtoDateTime()\fP 
.RE
.PP

.SS "\fBQwtDate::Week0Type\fP QwtDateScaleDraw::week0Type () const"

.PP
\fBReturns:\fP
.RS 4
Setting how to identify the first week of a year\&. 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetWeek0Type()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.