QwtAnalogClock.3 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. .TH "QwtAnalogClock" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtAnalogClock \- An analog clock\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_analog_clock\&.h>\fP
  11. .PP
  12. Inherits \fBQwtDial\fP\&.
  13. .SS "Public Types"
  14. .in +1c
  15. .ti -1c
  16. .RI "enum \fBHand\fP { \fBSecondHand\fP, \fBMinuteHand\fP, \fBHourHand\fP, \fBNHands\fP }"
  17. .br
  18. .in -1c
  19. .SS "Public Slots"
  20. .in +1c
  21. .ti -1c
  22. .RI "void \fBsetCurrentTime\fP ()"
  23. .br
  24. .RI "Set the current time\&. "
  25. .ti -1c
  26. .RI "void \fBsetTime\fP (const QTime &)"
  27. .br
  28. .in -1c
  29. .SS "Public Member Functions"
  30. .in +1c
  31. .ti -1c
  32. .RI "\fBQwtAnalogClock\fP (QWidget *parent=NULL)"
  33. .br
  34. .ti -1c
  35. .RI "virtual \fB~QwtAnalogClock\fP ()"
  36. .br
  37. .RI "Destructor\&. "
  38. .ti -1c
  39. .RI "void \fBsetHand\fP (\fBHand\fP, \fBQwtDialNeedle\fP *)"
  40. .br
  41. .ti -1c
  42. .RI "const \fBQwtDialNeedle\fP * \fBhand\fP (\fBHand\fP) const"
  43. .br
  44. .ti -1c
  45. .RI "\fBQwtDialNeedle\fP * \fBhand\fP (\fBHand\fP)"
  46. .br
  47. .in -1c
  48. .SS "Protected Member Functions"
  49. .in +1c
  50. .ti -1c
  51. .RI "virtual void \fBdrawNeedle\fP (QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) const"
  52. .br
  53. .RI "Draw the needle\&. "
  54. .ti -1c
  55. .RI "virtual void \fBdrawHand\fP (QPainter *, \fBHand\fP, const QPointF &, double radius, double direction, QPalette::ColorGroup) const"
  56. .br
  57. .in -1c
  58. .SS "Additional Inherited Members"
  59. .SH "Detailed Description"
  60. .PP
  61. An analog clock\&.
  62. .PP
  63. \fBExample\fP
  64. .RS 4
  65. .PP
  66. .nf
  67. #include <qwt_analog_clock\&.h>
  68. QwtAnalogClock *clock = new QwtAnalogClock(\&.\&.\&.);
  69. clock->scaleDraw()->setPenWidth(3);
  70. clock->setLineWidth(6);
  71. clock->setFrameShadow(QwtDial::Sunken);
  72. clock->setTime();
  73. // update the clock every second
  74. QTimer *timer = new QTimer(clock);
  75. timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime()));
  76. timer->start(1000);
  77. .fi
  78. .PP
  79. .RE
  80. .PP
  81. \fBNote\fP
  82. .RS 4
  83. The examples/dials example shows how to use \fBQwtAnalogClock\fP\&.
  84. .RE
  85. .PP
  86. .SH "Member Enumeration Documentation"
  87. .PP
  88. .SS "enum \fBQwtAnalogClock::Hand\fP"
  89. Hand type
  90. .PP
  91. \fBSee also\fP
  92. .RS 4
  93. \fBsetHand()\fP, \fBhand()\fP
  94. .RE
  95. .PP
  96. .PP
  97. \fBEnumerator\fP
  98. .in +1c
  99. .TP
  100. \fB\fISecondHand \fP\fP
  101. Needle displaying the seconds\&.
  102. .TP
  103. \fB\fIMinuteHand \fP\fP
  104. Needle displaying the minutes\&.
  105. .TP
  106. \fB\fIHourHand \fP\fP
  107. Needle displaying the hours\&.
  108. .TP
  109. \fB\fINHands \fP\fP
  110. Number of needles\&.
  111. .SH "Constructor & Destructor Documentation"
  112. .PP
  113. .SS "QwtAnalogClock::QwtAnalogClock (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
  114. Constructor
  115. .PP
  116. \fBParameters\fP
  117. .RS 4
  118. \fIparent\fP Parent widget
  119. .RE
  120. .PP
  121. .SH "Member Function Documentation"
  122. .PP
  123. .SS "void QwtAnalogClock::drawHand (QPainter * painter, \fBHand\fP hd, const QPointF & center, double radius, double direction, QPalette::ColorGroup cg) const\fC [protected]\fP, \fC [virtual]\fP"
  124. Draw a clock hand
  125. .PP
  126. \fBParameters\fP
  127. .RS 4
  128. \fIpainter\fP Painter
  129. .br
  130. \fIhd\fP Specify the type of hand
  131. .br
  132. \fIcenter\fP Center of the clock
  133. .br
  134. \fIradius\fP Maximum length for the hands
  135. .br
  136. \fIdirection\fP Direction of the hand in degrees, counter clockwise
  137. .br
  138. \fIcg\fP ColorGroup
  139. .RE
  140. .PP
  141. .SS "void QwtAnalogClock::drawNeedle (QPainter * painter, const QPointF & center, double radius, double dir, QPalette::ColorGroup colorGroup) const\fC [protected]\fP, \fC [virtual]\fP"
  142. .PP
  143. Draw the needle\&. A clock has no single needle but three hands instead\&. \fBdrawNeedle()\fP translates \fBvalue()\fP into directions for the hands and calls \fBdrawHand()\fP\&.
  144. .PP
  145. \fBParameters\fP
  146. .RS 4
  147. \fIpainter\fP Painter
  148. .br
  149. \fIcenter\fP Center of the clock
  150. .br
  151. \fIradius\fP Maximum length for the hands
  152. .br
  153. \fIdir\fP Dummy, not used\&.
  154. .br
  155. \fIcolorGroup\fP ColorGroup
  156. .RE
  157. .PP
  158. \fBSee also\fP
  159. .RS 4
  160. \fBdrawHand()\fP
  161. .RE
  162. .PP
  163. .PP
  164. Reimplemented from \fBQwtDial\fP\&.
  165. .SS "\fBQwtDialNeedle\fP * QwtAnalogClock::hand (\fBHand\fP hd)"
  166. .PP
  167. \fBReturns\fP
  168. .RS 4
  169. Clock hand
  170. .RE
  171. .PP
  172. \fBParameters\fP
  173. .RS 4
  174. \fIhd\fP Specifies the type of hand
  175. .RE
  176. .PP
  177. \fBSee also\fP
  178. .RS 4
  179. \fBsetHand()\fP
  180. .RE
  181. .PP
  182. .SS "const \fBQwtDialNeedle\fP * QwtAnalogClock::hand (\fBHand\fP hd) const"
  183. .PP
  184. \fBReturns\fP
  185. .RS 4
  186. Clock hand
  187. .RE
  188. .PP
  189. \fBParameters\fP
  190. .RS 4
  191. \fIhd\fP Specifies the type of hand
  192. .RE
  193. .PP
  194. \fBSee also\fP
  195. .RS 4
  196. \fBsetHand()\fP
  197. .RE
  198. .PP
  199. .SS "void QwtAnalogClock::setHand (\fBHand\fP hand, \fBQwtDialNeedle\fP * needle)"
  200. Set a clock hand
  201. .PP
  202. \fBParameters\fP
  203. .RS 4
  204. \fIhand\fP Specifies the type of hand
  205. .br
  206. \fIneedle\fP Hand
  207. .RE
  208. .PP
  209. \fBSee also\fP
  210. .RS 4
  211. \fBhand()\fP
  212. .RE
  213. .PP
  214. .SS "void QwtAnalogClock::setTime (const QTime & time)\fC [slot]\fP"
  215. Set a time
  216. .PP
  217. \fBParameters\fP
  218. .RS 4
  219. \fItime\fP Time to display
  220. .RE
  221. .PP
  222. .SH "Author"
  223. .PP
  224. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.