QwtDateScaleDraw.3 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. .TH "QwtDateScaleDraw" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtDateScaleDraw \- A class for drawing datetime scales\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_date_scale_draw\&.h>\fP
  11. .PP
  12. Inherits \fBQwtScaleDraw\fP\&.
  13. .SS "Public Member Functions"
  14. .in +1c
  15. .ti -1c
  16. .RI "\fBQwtDateScaleDraw\fP (Qt::TimeSpec=Qt::LocalTime)"
  17. .br
  18. .RI "Constructor\&. "
  19. .ti -1c
  20. .RI "virtual \fB~QwtDateScaleDraw\fP ()"
  21. .br
  22. .RI "Destructor\&. "
  23. .ti -1c
  24. .RI "void \fBsetDateFormat\fP (\fBQwtDate::IntervalType\fP, const QString &)"
  25. .br
  26. .ti -1c
  27. .RI "QString \fBdateFormat\fP (\fBQwtDate::IntervalType\fP) const"
  28. .br
  29. .ti -1c
  30. .RI "void \fBsetTimeSpec\fP (Qt::TimeSpec)"
  31. .br
  32. .ti -1c
  33. .RI "Qt::TimeSpec \fBtimeSpec\fP () const"
  34. .br
  35. .ti -1c
  36. .RI "void \fBsetUtcOffset\fP (int seconds)"
  37. .br
  38. .ti -1c
  39. .RI "int \fButcOffset\fP () const"
  40. .br
  41. .ti -1c
  42. .RI "void \fBsetWeek0Type\fP (\fBQwtDate::Week0Type\fP)"
  43. .br
  44. .ti -1c
  45. .RI "\fBQwtDate::Week0Type\fP \fBweek0Type\fP () const"
  46. .br
  47. .ti -1c
  48. .RI "virtual \fBQwtText\fP \fBlabel\fP (double) const"
  49. .br
  50. .RI "Convert a value into its representing label\&. "
  51. .ti -1c
  52. .RI "QDateTime \fBtoDateTime\fP (double) const"
  53. .br
  54. .in -1c
  55. .SS "Protected Member Functions"
  56. .in +1c
  57. .ti -1c
  58. .RI "virtual \fBQwtDate::IntervalType\fP \fBintervalType\fP (const \fBQwtScaleDiv\fP &) const"
  59. .br
  60. .ti -1c
  61. .RI "virtual QString \fBdateFormatOfDate\fP (const QDateTime &, \fBQwtDate::IntervalType\fP) const"
  62. .br
  63. .in -1c
  64. .SS "Additional Inherited Members"
  65. .SH "Detailed Description"
  66. .PP
  67. A class for drawing datetime scales\&.
  68. \fBQwtDateScaleDraw\fP displays values as datetime labels\&. The format of the labels depends on the alignment of the major tick labels\&.
  69. .PP
  70. The default format strings are:
  71. .PP
  72. .IP "\(bu" 2
  73. Millisecond
  74. .br
  75. 'hh:mm:ss:zzz\\nddd dd MMM yyyy'
  76. .IP "\(bu" 2
  77. Second
  78. .br
  79. 'hh:mm:ss\\nddd dd MMM yyyy'
  80. .IP "\(bu" 2
  81. Minute
  82. .br
  83. 'hh:mm\\nddd dd MMM yyyy'
  84. .IP "\(bu" 2
  85. Hour
  86. .br
  87. 'hh:mm\\nddd dd MMM yyyy'
  88. .IP "\(bu" 2
  89. Day
  90. .br
  91. 'ddd dd MMM yyyy'
  92. .IP "\(bu" 2
  93. Week
  94. .br
  95. 'Www yyyy'
  96. .IP "\(bu" 2
  97. Month
  98. .br
  99. 'MMM yyyy'
  100. .IP "\(bu" 2
  101. Year
  102. .br
  103. 'yyyy'
  104. .PP
  105. .PP
  106. The format strings can be modified using \fBsetDateFormat()\fP or individually for each tick label by overloading \fBdateFormatOfDate()\fP,
  107. .PP
  108. Usually \fBQwtDateScaleDraw\fP is used in combination with \fBQwtDateScaleEngine\fP, that calculates scales for datetime intervals\&.
  109. .PP
  110. \fBSee also\fP
  111. .RS 4
  112. \fBQwtDateScaleEngine\fP, \fBQwtPlot::setAxisScaleDraw()\fP
  113. .RE
  114. .PP
  115. .SH "Constructor & Destructor Documentation"
  116. .PP
  117. .SS "QwtDateScaleDraw::QwtDateScaleDraw (Qt::TimeSpec timeSpec = \fCQt::LocalTime\fP)"
  118. .PP
  119. 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\&.
  120. .PP
  121. \fBParameters\fP
  122. .RS 4
  123. \fItimeSpec\fP Time specification
  124. .RE
  125. .PP
  126. \fBSee also\fP
  127. .RS 4
  128. \fBsetTimeSpec()\fP, \fBsetWeek0Type()\fP
  129. .RE
  130. .PP
  131. .SH "Member Function Documentation"
  132. .PP
  133. .SS "QString QwtDateScaleDraw::dateFormat (\fBQwtDate::IntervalType\fP intervalType) const"
  134. .PP
  135. \fBParameters\fP
  136. .RS 4
  137. \fIintervalType\fP Interval type
  138. .RE
  139. .PP
  140. \fBReturns\fP
  141. .RS 4
  142. Default format string for an datetime interval type
  143. .RE
  144. .PP
  145. \fBSee also\fP
  146. .RS 4
  147. \fBsetDateFormat()\fP, \fBdateFormatOfDate()\fP
  148. .RE
  149. .PP
  150. .SS "QString QwtDateScaleDraw::dateFormatOfDate (const QDateTime & dateTime, \fBQwtDate::IntervalType\fP intervalType) const\fC [protected]\fP, \fC [virtual]\fP"
  151. Format string for the representation of a datetime
  152. .PP
  153. \fBdateFormatOfDate()\fP is intended to be overloaded for situations, where formats are individual for specific datetime values\&.
  154. .PP
  155. The default setting ignores dateTime and return the default format for the interval type\&.
  156. .PP
  157. \fBParameters\fP
  158. .RS 4
  159. \fIdateTime\fP Datetime value
  160. .br
  161. \fIintervalType\fP Interval type
  162. .RE
  163. .PP
  164. \fBReturns\fP
  165. .RS 4
  166. Format string
  167. .RE
  168. .PP
  169. \fBSee also\fP
  170. .RS 4
  171. \fBsetDateFormat()\fP, \fBQwtDate::toString()\fP
  172. .RE
  173. .PP
  174. .SS "\fBQwtDate::IntervalType\fP QwtDateScaleDraw::intervalType (const \fBQwtScaleDiv\fP & scaleDiv) const\fC [protected]\fP, \fC [virtual]\fP"
  175. Find the less detailed datetime unit, where no rounding errors happen\&.
  176. .PP
  177. \fBParameters\fP
  178. .RS 4
  179. \fIscaleDiv\fP Scale division
  180. .RE
  181. .PP
  182. \fBReturns\fP
  183. .RS 4
  184. Interval type
  185. .RE
  186. .PP
  187. \fBSee also\fP
  188. .RS 4
  189. \fBdateFormatOfDate()\fP
  190. .RE
  191. .PP
  192. .SS "\fBQwtText\fP QwtDateScaleDraw::label (double value) const\fC [virtual]\fP"
  193. .PP
  194. 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\&.
  195. .PP
  196. \fBParameters\fP
  197. .RS 4
  198. \fIvalue\fP Value
  199. .RE
  200. .PP
  201. \fBReturns\fP
  202. .RS 4
  203. Label string\&.
  204. .RE
  205. .PP
  206. \fBSee also\fP
  207. .RS 4
  208. \fBdateFormatOfDate()\fP
  209. .RE
  210. .PP
  211. .PP
  212. Reimplemented from \fBQwtAbstractScaleDraw\fP\&.
  213. .SS "void QwtDateScaleDraw::setDateFormat (\fBQwtDate::IntervalType\fP intervalType, const QString & format)"
  214. Set the default format string for an datetime interval type
  215. .PP
  216. \fBParameters\fP
  217. .RS 4
  218. \fIintervalType\fP Interval type
  219. .br
  220. \fIformat\fP Default format string
  221. .RE
  222. .PP
  223. \fBSee also\fP
  224. .RS 4
  225. \fBdateFormat()\fP, \fBdateFormatOfDate()\fP, \fBQwtDate::toString()\fP
  226. .RE
  227. .PP
  228. .SS "void QwtDateScaleDraw::setTimeSpec (Qt::TimeSpec timeSpec)"
  229. Set the time specification used for the tick labels
  230. .PP
  231. \fBParameters\fP
  232. .RS 4
  233. \fItimeSpec\fP Time specification
  234. .RE
  235. .PP
  236. \fBSee also\fP
  237. .RS 4
  238. \fBtimeSpec()\fP, \fBsetUtcOffset()\fP, \fBtoDateTime()\fP
  239. .RE
  240. .PP
  241. .SS "void QwtDateScaleDraw::setUtcOffset (int seconds)"
  242. Set the offset in seconds from Coordinated Universal Time
  243. .PP
  244. \fBParameters\fP
  245. .RS 4
  246. \fIseconds\fP Offset in seconds
  247. .RE
  248. .PP
  249. \fBNote\fP
  250. .RS 4
  251. The offset has no effect beside for the time specification Qt::OffsetFromUTC\&.
  252. .RE
  253. .PP
  254. \fBSee also\fP
  255. .RS 4
  256. QDate::utcOffset(), \fBsetTimeSpec()\fP, \fBtoDateTime()\fP
  257. .RE
  258. .PP
  259. .SS "void QwtDateScaleDraw::setWeek0Type (\fBQwtDate::Week0Type\fP week0Type)"
  260. Sets how to identify the first week of a year\&.
  261. .PP
  262. \fBParameters\fP
  263. .RS 4
  264. \fIweek0Type\fP Mode how to identify the first week of a year
  265. .RE
  266. .PP
  267. \fBSee also\fP
  268. .RS 4
  269. \fBweek0Type()\fP\&.
  270. .RE
  271. .PP
  272. \fBNote\fP
  273. .RS 4
  274. week0Type has no effect beside for intervals classified as \fBQwtDate::Week\fP\&.
  275. .RE
  276. .PP
  277. .SS "Qt::TimeSpec QwtDateScaleDraw::timeSpec () const"
  278. .PP
  279. \fBReturns\fP
  280. .RS 4
  281. Time specification used for the tick labels
  282. .RE
  283. .PP
  284. \fBSee also\fP
  285. .RS 4
  286. \fBsetTimeSpec()\fP, \fButcOffset()\fP, \fBtoDateTime()\fP
  287. .RE
  288. .PP
  289. .SS "QDateTime QwtDateScaleDraw::toDateTime (double value) const"
  290. Translate a double value into a QDateTime object\&.
  291. .PP
  292. \fBReturns\fP
  293. .RS 4
  294. QDateTime object initialized with \fBtimeSpec()\fP and \fButcOffset()\fP\&.
  295. .RE
  296. .PP
  297. \fBSee also\fP
  298. .RS 4
  299. \fBtimeSpec()\fP, \fButcOffset()\fP, \fBQwtDate::toDateTime()\fP
  300. .RE
  301. .PP
  302. .SS "int QwtDateScaleDraw::utcOffset () const"
  303. .PP
  304. \fBReturns\fP
  305. .RS 4
  306. Offset in seconds from Coordinated Universal Time
  307. .RE
  308. .PP
  309. \fBNote\fP
  310. .RS 4
  311. The offset has no effect beside for the time specification Qt::OffsetFromUTC\&.
  312. .RE
  313. .PP
  314. \fBSee also\fP
  315. .RS 4
  316. QDate::setUtcOffset(), \fBsetTimeSpec()\fP, \fBtoDateTime()\fP
  317. .RE
  318. .PP
  319. .SS "\fBQwtDate::Week0Type\fP QwtDateScaleDraw::week0Type () const"
  320. .PP
  321. \fBReturns\fP
  322. .RS 4
  323. Setting how to identify the first week of a year\&.
  324. .RE
  325. .PP
  326. \fBSee also\fP
  327. .RS 4
  328. \fBsetWeek0Type()\fP
  329. .RE
  330. .PP
  331. .SH "Author"
  332. .PP
  333. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.