File: classQCPAxisTickerTime.html

package info (click to toggle)
qcustomplot 2.0.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,376 kB
  • sloc: cpp: 21,746; sh: 180; makefile: 2
file content (390 lines) | stat: -rw-r--r-- 31,705 bytes parent folder | download | duplicates (2)
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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="author" content="Emanuel Eichhammer" />
<meta name="copyright" content="(C) 2011-2016 Emanuel Eichhammer" />
<title>QCPAxisTickerTime Class Reference</title>
<link href="qcp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top">
<a class="headerLink"  href="index.html">Main Page</a> &middot;
<a class="headerLink"  href="classoverview.html">Class Overview</a> &middot;
<a class="headerLink"  href="hierarchy.html">Hierarchy</a> &middot;
<a class="headerLink"  href="annotated.html">All Classes</a> &middot;
<a class="headerLink"  href="pages.html">Special Pages</a>
<!-- Generated by Doxygen 1.8.12 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Functions</a> &#124;
<a href="#pro-methods">Protected Functions</a>  </div>
  <div class="headertitle">
<div class="title">QCPAxisTickerTime Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Specialized axis ticker for time spans in units of milliseconds to days.  
 <a href="classQCPAxisTickerTime.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for QCPAxisTickerTime:</div>
<div class="dyncontent">
<div class="center"><img src="classQCPAxisTickerTime__inherit__graph.png" border="0" usemap="#QCPAxisTickerTime_inherit__map" alt="Inheritance graph"/></div>
<map name="QCPAxisTickerTime_inherit__map" id="QCPAxisTickerTime_inherit__map">
<area shape="rect" id="node2" href="classQCPAxisTicker.html" title="The base class tick generator used by QCPAxis to create tick positions and tick labels. " alt="" coords="18,5,120,29"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5c48ded8c6d3a1aca9b68219469fea3e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">TimeUnit</a> </td></tr>
<tr class="separator:a5c48ded8c6d3a1aca9b68219469fea3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classQCPAxisTicker"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classQCPAxisTicker')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classQCPAxisTicker.html">QCPAxisTicker</a></td></tr>
<tr class="memitem:ab6d2f9d9477821623ac9bc4b21ddf49a inherit pub_types_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#ab6d2f9d9477821623ac9bc4b21ddf49a">TickStepStrategy</a> </td></tr>
<tr class="separator:ab6d2f9d9477821623ac9bc4b21ddf49a inherit pub_types_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Functions</h2></td></tr>
<tr class="memitem:a5145aac1d2117fdac411d9e8552cc41b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#a5145aac1d2117fdac411d9e8552cc41b">QCPAxisTickerTime</a> ()</td></tr>
<tr class="separator:a5145aac1d2117fdac411d9e8552cc41b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ad61dc7434a7fed1850e96bf748834"><td class="memItemLeft" align="right" valign="top"><a id="a99ad61dc7434a7fed1850e96bf748834"></a>
QString&#160;</td><td class="memItemRight" valign="bottom"><b>timeFormat</b> () const</td></tr>
<tr class="separator:a99ad61dc7434a7fed1850e96bf748834"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b58a98e4d64c6764aa61a707e4a344d"><td class="memItemLeft" align="right" valign="top"><a id="a6b58a98e4d64c6764aa61a707e4a344d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>fieldWidth</b> (<a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">TimeUnit</a> unit) const</td></tr>
<tr class="separator:a6b58a98e4d64c6764aa61a707e4a344d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f30b6e5125bce4256be9ce3177088ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a> (const QString &amp;format)</td></tr>
<tr class="separator:a2f30b6e5125bce4256be9ce3177088ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc13e54fc969be98a5c0e3fa0dbaa293"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#adc13e54fc969be98a5c0e3fa0dbaa293">setFieldWidth</a> (<a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">TimeUnit</a> unit, int width)</td></tr>
<tr class="separator:adc13e54fc969be98a5c0e3fa0dbaa293"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classQCPAxisTicker"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classQCPAxisTicker')"><img src="closed.png" alt="-"/>&#160;Public Functions inherited from <a class="el" href="classQCPAxisTicker.html">QCPAxisTicker</a></td></tr>
<tr class="memitem:a8fcf23c79ebd72202fe79253f9f01ea8 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a8fcf23c79ebd72202fe79253f9f01ea8">QCPAxisTicker</a> ()</td></tr>
<tr class="separator:a8fcf23c79ebd72202fe79253f9f01ea8 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58df76f2ec3eb48401bdd314b0e14ba1 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top"><a id="a58df76f2ec3eb48401bdd314b0e14ba1"></a>
<a class="el" href="classQCPAxisTicker.html#ab6d2f9d9477821623ac9bc4b21ddf49a">TickStepStrategy</a>&#160;</td><td class="memItemRight" valign="bottom"><b>tickStepStrategy</b> () const</td></tr>
<tr class="separator:a58df76f2ec3eb48401bdd314b0e14ba1 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf9edbe4169ce55e216fd067cc139452 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top"><a id="aaf9edbe4169ce55e216fd067cc139452"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>tickCount</b> () const</td></tr>
<tr class="separator:aaf9edbe4169ce55e216fd067cc139452 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0c6e9587c36fdeefb5518c00fe7ab15 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top"><a id="ac0c6e9587c36fdeefb5518c00fe7ab15"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>tickOrigin</b> () const</td></tr>
<tr class="separator:ac0c6e9587c36fdeefb5518c00fe7ab15 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b1d847c1a12159af6bfda4ebebe7d5 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a73b1d847c1a12159af6bfda4ebebe7d5">setTickStepStrategy</a> (<a class="el" href="classQCPAxisTicker.html#ab6d2f9d9477821623ac9bc4b21ddf49a">TickStepStrategy</a> strategy)</td></tr>
<tr class="separator:a73b1d847c1a12159af6bfda4ebebe7d5 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47752abba8293e6dc18491501ae34008 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a47752abba8293e6dc18491501ae34008">setTickCount</a> (int count)</td></tr>
<tr class="separator:a47752abba8293e6dc18491501ae34008 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab509c7e500293bf66a8409f0d7c23943 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#ab509c7e500293bf66a8409f0d7c23943">setTickOrigin</a> (double origin)</td></tr>
<tr class="separator:ab509c7e500293bf66a8409f0d7c23943 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefbd11725678ca824add8cf926cbc856 inherit pub_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#aefbd11725678ca824add8cf926cbc856">generate</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;range, const QLocale &amp;locale, QChar formatChar, int precision, QVector&lt; double &gt; &amp;ticks, QVector&lt; double &gt; *subTicks, QVector&lt; QString &gt; *tickLabels)</td></tr>
<tr class="separator:aefbd11725678ca824add8cf926cbc856 inherit pub_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Functions</h2></td></tr>
<tr class="memitem:ae651cc7e62a37d95e777913d3481f37f"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#ae651cc7e62a37d95e777913d3481f37f">getTickStep</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;range)</td></tr>
<tr class="separator:ae651cc7e62a37d95e777913d3481f37f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63262ef6286741344b5fcb9958707865"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#a63262ef6286741344b5fcb9958707865">getSubTickCount</a> (double tickStep)</td></tr>
<tr class="separator:a63262ef6286741344b5fcb9958707865"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a306a188fc7e428eeef4fdcf5c995b063"><td class="memItemLeft" align="right" valign="top">virtual QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#a306a188fc7e428eeef4fdcf5c995b063">getTickLabel</a> (double tick, const QLocale &amp;locale, QChar formatChar, int precision)</td></tr>
<tr class="separator:a306a188fc7e428eeef4fdcf5c995b063"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03b6c980be36f2672e3fc31d109a28a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTickerTime.html#a03b6c980be36f2672e3fc31d109a28a0">replaceUnit</a> (QString &amp;text, <a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">TimeUnit</a> unit, int value) const</td></tr>
<tr class="separator:a03b6c980be36f2672e3fc31d109a28a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classQCPAxisTicker"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classQCPAxisTicker')"><img src="closed.png" alt="-"/>&#160;Protected Functions inherited from <a class="el" href="classQCPAxisTicker.html">QCPAxisTicker</a></td></tr>
<tr class="memitem:af4645a824c7bd2ca8fc7e86ebf9055bd inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">virtual QVector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#af4645a824c7bd2ca8fc7e86ebf9055bd">createTickVector</a> (double tickStep, const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;range)</td></tr>
<tr class="separator:af4645a824c7bd2ca8fc7e86ebf9055bd inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a6435723fa0bd366d1ea4c2cff7c33f inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">virtual QVector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a9a6435723fa0bd366d1ea4c2cff7c33f">createSubTickVector</a> (int subTickCount, const QVector&lt; double &gt; &amp;ticks)</td></tr>
<tr class="separator:a9a6435723fa0bd366d1ea4c2cff7c33f inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a804050e408f37a0b9770c6654ebe6aa7 inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">virtual QVector&lt; QString &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a804050e408f37a0b9770c6654ebe6aa7">createLabelVector</a> (const QVector&lt; double &gt; &amp;ticks, const QLocale &amp;locale, QChar formatChar, int precision)</td></tr>
<tr class="separator:a804050e408f37a0b9770c6654ebe6aa7 inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab28cc1ab549489be7975f5ce7e717916 inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#ab28cc1ab549489be7975f5ce7e717916">trimTicks</a> (const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;range, QVector&lt; double &gt; &amp;ticks, bool keepOneOutlier) const</td></tr>
<tr class="separator:ab28cc1ab549489be7975f5ce7e717916 inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ea0a7c4ca1c610f92b9bd5944ab4260 inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a4ea0a7c4ca1c610f92b9bd5944ab4260">pickClosest</a> (double target, const QVector&lt; double &gt; &amp;candidates) const</td></tr>
<tr class="separator:a4ea0a7c4ca1c610f92b9bd5944ab4260 inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f1e223bafbf2cec7c3ba8b08d5c77e8 inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#a2f1e223bafbf2cec7c3ba8b08d5c77e8">getMantissa</a> (double input, double *magnitude=0) const</td></tr>
<tr class="separator:a2f1e223bafbf2cec7c3ba8b08d5c77e8 inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7df6c72876b7abd67c932663a0b0f6a inherit pro_methods_classQCPAxisTicker"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPAxisTicker.html#ac7df6c72876b7abd67c932663a0b0f6a">cleanMantissa</a> (double input) const</td></tr>
<tr class="separator:ac7df6c72876b7abd67c932663a0b0f6a inherit pro_methods_classQCPAxisTicker"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Specialized axis ticker for time spans in units of milliseconds to days. </p>
<div class="image">
<img src="axisticker-time.png" alt="axisticker-time.png"/>
</div>
<p>This <a class="el" href="classQCPAxisTicker.html" title="The base class tick generator used by QCPAxis to create tick positions and tick labels. ">QCPAxisTicker</a> subclass generates ticks that corresponds to time intervals.</p>
<p>The format of the time display in the tick labels is controlled with <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a> and <a class="el" href="classQCPAxisTickerTime.html#adc13e54fc969be98a5c0e3fa0dbaa293">setFieldWidth</a>. The time coordinate is in the unit of seconds with respect to the time coordinate zero. Unlike with <a class="el" href="classQCPAxisTickerDateTime.html" title="Specialized axis ticker for calendar dates and times as axis ticks. ">QCPAxisTickerDateTime</a>, the ticks don't correspond to a specific calendar date and time.</p>
<p>The time can be displayed in milliseconds, seconds, minutes, hours and days. Depending on the largest available unit in the format specified with <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>, any time spans above will be carried in that largest unit. So for example if the format string is "%m:%s" and a tick at coordinate value 7815 (being 2 hours, 10 minutes and 15 seconds) is created, the resulting tick label will show "130:15" (130 minutes, 15 seconds). If the format string is "%h:%m:%s", the hour unit will be used and the label will thus be "02:10:15". Negative times with respect to the axis zero will carry a leading minus sign.</p>
<p>The ticker can be created and assigned to an axis like this: </p><div class="fragment"><div class="line">  QSharedPointer&lt;QCPAxisTickerTime&gt; timeTicker(<span class="keyword">new</span> <a class="code" href="classQCPAxisTickerTime.html">QCPAxisTickerTime</a>);</div><div class="line">  customPlot-&gt;xAxis-&gt;setTicker(timeTicker);</div><div class="line">  </div><div class="line">  customPlot-&gt;xAxis-&gt;setRange(-60*3.5, 60*11);</div><div class="line">  timeTicker-&gt;setTimeFormat(<span class="stringliteral">&quot;%m:%s&quot;</span>);</div></div><!-- fragment --><p> Here is an example of a time axis providing time information in days, hours and minutes. Due to the axis range spanning a few days and the wanted tick count (<a class="el" href="classQCPAxisTicker.html#a47752abba8293e6dc18491501ae34008">setTickCount</a>), the ticker decided to use tick steps of 12 hours:</p>
<div class="image">
<img src="axisticker-time2.png" alt="axisticker-time2.png"/>
</div>
<p>The format string for this example is </p><div class="fragment"><div class="line">  timeTicker-&gt;setTimeFormat(<span class="stringliteral">&quot;day %d\n%h:%m&quot;</span>);</div></div><!-- fragment --> <dl class="section note"><dt>Note</dt><dd>If you rather wish to display calendar dates and times, have a look at <a class="el" href="classQCPAxisTickerDateTime.html" title="Specialized axis ticker for calendar dates and times as axis ticks. ">QCPAxisTickerDateTime</a> instead. </dd></dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a5c48ded8c6d3a1aca9b68219469fea3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c48ded8c6d3a1aca9b68219469fea3e">&sect;&nbsp;</a></span>TimeUnit</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">QCPAxisTickerTime::TimeUnit</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Defines the logical units in which fractions of time spans can be expressed.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPAxisTickerTime.html#adc13e54fc969be98a5c0e3fa0dbaa293">setFieldWidth</a>, <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5c48ded8c6d3a1aca9b68219469fea3ea809db637d2a7f601287c8790facc25cf"></a>tuMilliseconds&#160;</td><td class="fielddoc"><p>Milliseconds, one thousandth of a second (%z in <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="a5c48ded8c6d3a1aca9b68219469fea3ea22b2c1842215272ae827eea2d1cc037d"></a>tuSeconds&#160;</td><td class="fielddoc"><p>Seconds (%s in <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="a5c48ded8c6d3a1aca9b68219469fea3ea682de6640daef46cffd8a080348d7d00"></a>tuMinutes&#160;</td><td class="fielddoc"><p>Minutes (%m in <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="a5c48ded8c6d3a1aca9b68219469fea3ea83a5713594424ba17f1f62f18f0e5935"></a>tuHours&#160;</td><td class="fielddoc"><p>Hours (%h in <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>) </p>
</td></tr>
<tr><td class="fieldname"><a id="a5c48ded8c6d3a1aca9b68219469fea3eaf9729e64545307a80a0e3527d6da6556"></a>tuDays&#160;</td><td class="fielddoc"><p>Days (%d in <a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>) </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a5145aac1d2117fdac411d9e8552cc41b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5145aac1d2117fdac411d9e8552cc41b">&sect;&nbsp;</a></span>QCPAxisTickerTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCPAxisTickerTime::QCPAxisTickerTime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to <a class="el" href="classQCPAxis.html#a4ee03fcd2c74d05cd1a419b9af5cfbdc">QCPAxis::setTicker</a>. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2f30b6e5125bce4256be9ce3177088ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f30b6e5125bce4256be9ce3177088ea">&sect;&nbsp;</a></span>setTimeFormat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAxisTickerTime::setTimeFormat </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>format</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the format that will be used to display time in the tick labels.</p>
<p>The available patterns are:</p><ul>
<li>%z for milliseconds</li>
<li>%s for seconds</li>
<li>%m for minutes</li>
<li>%h for hours</li>
<li>%d for days</li>
</ul>
<p>The field width (zero padding) can be controlled for each unit with <a class="el" href="classQCPAxisTickerTime.html#adc13e54fc969be98a5c0e3fa0dbaa293">setFieldWidth</a>.</p>
<p>The largest unit that appears in <em>format</em> will carry all the remaining time of a certain tick coordinate, even if it overflows the natural limit of the unit. For example, if %m is the largest unit it might become larger than 59 in order to consume larger time values. If on the other hand %h is available, the minutes will wrap around to zero after 59 and the time will carry to the hour digit. </p>

</div>
</div>
<a id="adc13e54fc969be98a5c0e3fa0dbaa293"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc13e54fc969be98a5c0e3fa0dbaa293">&sect;&nbsp;</a></span>setFieldWidth()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAxisTickerTime::setFieldWidth </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">QCPAxisTickerTime::TimeUnit</a>&#160;</td>
          <td class="paramname"><em>unit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the field widh of the specified <em>unit</em> to be <em>width</em> digits, when displayed in the tick label. If the number for the specific unit is shorter than <em>width</em>, it will be padded with an according number of zeros to the left in order to reach the field width.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a> </dd></dl>

</div>
</div>
<a id="ae651cc7e62a37d95e777913d3481f37f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae651cc7e62a37d95e777913d3481f37f">&sect;&nbsp;</a></span>getTickStep()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double QCPAxisTickerTime::getTickStep </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;&#160;</td>
          <td class="paramname"><em>range</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the tick step appropriate for time displays, depending on the provided <em>range</em> and the smallest available time unit in the current format (<a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>). For example if the unit of seconds isn't available in the format, this method will not generate steps (like 2.5 minutes) that require sub-minute precision to be displayed correctly.</p>
<p>For general information about this virtual method, see the base class implementation. </p>

<p>Reimplemented from <a class="el" href="classQCPAxisTicker.html#a910d69bcec2de37e92d8d4e1ecf201e2">QCPAxisTicker</a>.</p>

</div>
</div>
<a id="a63262ef6286741344b5fcb9958707865"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63262ef6286741344b5fcb9958707865">&sect;&nbsp;</a></span>getSubTickCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int QCPAxisTickerTime::getSubTickCount </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tickStep</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the sub tick count appropriate for the provided <em>tickStep</em> and time displays.</p>
<p>For general information about this virtual method, see the base class implementation. </p>

<p>Reimplemented from <a class="el" href="classQCPAxisTicker.html#a4ccc403ced7a1457ce6ba293509933c8">QCPAxisTicker</a>.</p>

</div>
</div>
<a id="a306a188fc7e428eeef4fdcf5c995b063"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a306a188fc7e428eeef4fdcf5c995b063">&sect;&nbsp;</a></span>getTickLabel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString QCPAxisTickerTime::getTickLabel </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tick</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QLocale &amp;&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QChar&#160;</td>
          <td class="paramname"><em>formatChar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>precision</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the tick label corresponding to the provided <em>tick</em> and the configured format and field widths (<a class="el" href="classQCPAxisTickerTime.html#a2f30b6e5125bce4256be9ce3177088ea">setTimeFormat</a>, <a class="el" href="classQCPAxisTickerTime.html#adc13e54fc969be98a5c0e3fa0dbaa293">setFieldWidth</a>).</p>
<p>For general information about this virtual method, see the base class implementation. </p>

<p>Reimplemented from <a class="el" href="classQCPAxisTicker.html#a8201eb4aa8be192bf786b126eb5ee089">QCPAxisTicker</a>.</p>

</div>
</div>
<a id="a03b6c980be36f2672e3fc31d109a28a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03b6c980be36f2672e3fc31d109a28a0">&sect;&nbsp;</a></span>replaceUnit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPAxisTickerTime::replaceUnit </td>
          <td>(</td>
          <td class="paramtype">QString &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classQCPAxisTickerTime.html#a5c48ded8c6d3a1aca9b68219469fea3e">QCPAxisTickerTime::TimeUnit</a>&#160;</td>
          <td class="paramname"><em>unit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Replaces all occurrences of the format pattern belonging to <em>unit</em> in <em>text</em> with the specified <em>value</em>, using the field width as specified with <a class="el" href="classQCPAxisTickerTime.html#adc13e54fc969be98a5c0e3fa0dbaa293">setFieldWidth</a> for the <em>unit</em>. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/axis/axistickertime.h</li>
<li>src/axis/axistickertime.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>