QwtRoundScaleDraw.3 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. .TH "QwtRoundScaleDraw" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtRoundScaleDraw \- A class for drawing round scales\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_round_scale_draw\&.h>\fP
  11. .PP
  12. Inherits \fBQwtAbstractScaleDraw\fP\&.
  13. .PP
  14. Inherited by QwtAnalogClockScaleDraw, and \fBQwtCompassScaleDraw\fP\&.
  15. .SS "Public Member Functions"
  16. .in +1c
  17. .ti -1c
  18. .RI "\fBQwtRoundScaleDraw\fP ()"
  19. .br
  20. .RI "Constructor\&. "
  21. .ti -1c
  22. .RI "virtual \fB~QwtRoundScaleDraw\fP ()"
  23. .br
  24. .RI "Destructor\&. "
  25. .ti -1c
  26. .RI "void \fBsetRadius\fP (double \fBradius\fP)"
  27. .br
  28. .ti -1c
  29. .RI "double \fBradius\fP () const"
  30. .br
  31. .ti -1c
  32. .RI "void \fBmoveCenter\fP (double x, double y)"
  33. .br
  34. .RI "Move the center of the scale draw, leaving the radius unchanged\&. "
  35. .ti -1c
  36. .RI "void \fBmoveCenter\fP (const QPointF &)"
  37. .br
  38. .ti -1c
  39. .RI "QPointF \fBcenter\fP () const"
  40. .br
  41. .RI "Get the center of the scale\&. "
  42. .ti -1c
  43. .RI "void \fBsetAngleRange\fP (double angle1, double angle2)"
  44. .br
  45. .RI "Adjust the baseline circle segment for round scales\&. "
  46. .ti -1c
  47. .RI "virtual double \fBextent\fP (const QFont &) const"
  48. .br
  49. .in -1c
  50. .SS "Protected Member Functions"
  51. .in +1c
  52. .ti -1c
  53. .RI "virtual void \fBdrawTick\fP (QPainter *, double value, double len) const"
  54. .br
  55. .ti -1c
  56. .RI "virtual void \fBdrawBackbone\fP (QPainter *) const"
  57. .br
  58. .ti -1c
  59. .RI "virtual void \fBdrawLabel\fP (QPainter *, double val) const"
  60. .br
  61. .in -1c
  62. .SS "Additional Inherited Members"
  63. .SH "Detailed Description"
  64. .PP
  65. A class for drawing round scales\&.
  66. \fBQwtRoundScaleDraw\fP can be used to draw round scales\&. The circle segment can be adjusted by \fBsetAngleRange()\fP\&. The geometry of the scale can be specified with \fBmoveCenter()\fP and \fBsetRadius()\fP\&.
  67. .PP
  68. After a scale division has been specified as a \fBQwtScaleDiv\fP object using \fBQwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s)\fP, the scale can be drawn with the \fBQwtAbstractScaleDraw::draw()\fP member\&.
  69. .SH "Constructor & Destructor Documentation"
  70. .PP
  71. .SS "QwtRoundScaleDraw::QwtRoundScaleDraw ()"
  72. .PP
  73. Constructor\&. The range of the scale is initialized to [0, 100], The center is set to (50, 50) with a radius of 50\&. The angle range is set to [-135, 135]\&.
  74. .SH "Member Function Documentation"
  75. .PP
  76. .SS "void QwtRoundScaleDraw::drawBackbone (QPainter * painter) const\fC [protected]\fP, \fC [virtual]\fP"
  77. Draws the baseline of the scale
  78. .PP
  79. \fBParameters\fP
  80. .RS 4
  81. \fIpainter\fP Painter
  82. .RE
  83. .PP
  84. \fBSee also\fP
  85. .RS 4
  86. \fBdrawTick()\fP, \fBdrawLabel()\fP
  87. .RE
  88. .PP
  89. .PP
  90. Implements \fBQwtAbstractScaleDraw\fP\&.
  91. .SS "void QwtRoundScaleDraw::drawLabel (QPainter * painter, double value) const\fC [protected]\fP, \fC [virtual]\fP"
  92. Draws the label for a major scale tick
  93. .PP
  94. \fBParameters\fP
  95. .RS 4
  96. \fIpainter\fP Painter
  97. .br
  98. \fIvalue\fP Value
  99. .RE
  100. .PP
  101. \fBSee also\fP
  102. .RS 4
  103. \fBdrawTick()\fP, \fBdrawBackbone()\fP
  104. .RE
  105. .PP
  106. .PP
  107. Implements \fBQwtAbstractScaleDraw\fP\&.
  108. .SS "void QwtRoundScaleDraw::drawTick (QPainter * painter, double value, double len) const\fC [protected]\fP, \fC [virtual]\fP"
  109. Draw a tick
  110. .PP
  111. \fBParameters\fP
  112. .RS 4
  113. \fIpainter\fP Painter
  114. .br
  115. \fIvalue\fP Value of the tick
  116. .br
  117. \fIlen\fP Length of the tick
  118. .RE
  119. .PP
  120. \fBSee also\fP
  121. .RS 4
  122. \fBdrawBackbone()\fP, \fBdrawLabel()\fP
  123. .RE
  124. .PP
  125. .PP
  126. Implements \fBQwtAbstractScaleDraw\fP\&.
  127. .SS "double QwtRoundScaleDraw::extent (const QFont & font) const\fC [virtual]\fP"
  128. Calculate the extent of the scale
  129. .PP
  130. The extent is the distance between the baseline to the outermost pixel of the scale draw\&. \fBradius()\fP + \fBextent()\fP is an upper limit for the radius of the bounding circle\&.
  131. .PP
  132. \fBParameters\fP
  133. .RS 4
  134. \fIfont\fP Font used for painting the labels
  135. .RE
  136. .PP
  137. \fBReturns\fP
  138. .RS 4
  139. Calculated extent
  140. .RE
  141. .PP
  142. \fBSee also\fP
  143. .RS 4
  144. \fBsetMinimumExtent()\fP, \fBminimumExtent()\fP
  145. .RE
  146. .PP
  147. \fBWarning\fP
  148. .RS 4
  149. The implemented algorithm is not too smart and calculates only an upper limit, that might be a few pixels too large
  150. .RE
  151. .PP
  152. .PP
  153. Implements \fBQwtAbstractScaleDraw\fP\&.
  154. .SS "void QwtRoundScaleDraw::moveCenter (const QPointF & center)"
  155. Move the center of the scale draw, leaving the radius unchanged
  156. .PP
  157. \fBParameters\fP
  158. .RS 4
  159. \fIcenter\fP New center
  160. .RE
  161. .PP
  162. \fBSee also\fP
  163. .RS 4
  164. \fBsetRadius()\fP
  165. .RE
  166. .PP
  167. .SS "double QwtRoundScaleDraw::radius () const"
  168. Get the radius
  169. .PP
  170. Radius is the radius of the backbone without ticks and labels\&.
  171. .PP
  172. \fBReturns\fP
  173. .RS 4
  174. Radius of the scale
  175. .RE
  176. .PP
  177. \fBSee also\fP
  178. .RS 4
  179. \fBsetRadius()\fP, \fBextent()\fP
  180. .RE
  181. .PP
  182. .SS "void QwtRoundScaleDraw::setAngleRange (double angle1, double angle2)"
  183. .PP
  184. Adjust the baseline circle segment for round scales\&. The baseline will be drawn from min(angle1,angle2) to max(angle1, angle2)\&. The default setting is [ -135, 135 ]\&. An angle of 0 degrees corresponds to the 12 o'clock position, and positive angles count in a clockwise direction\&.
  185. .PP
  186. \fBParameters\fP
  187. .RS 4
  188. \fIangle1\fP
  189. .br
  190. \fIangle2\fP boundaries of the angle interval in degrees\&.
  191. .RE
  192. .PP
  193. \fBWarning\fP
  194. .RS 4
  195. .PD 0
  196. .IP "\(bu" 2
  197. The angle range is limited to [-360, 360] degrees\&. Angles exceeding this range will be clipped\&.
  198. .IP "\(bu" 2
  199. For angles more or equal than 360 degrees above or below min(angle1, angle2), scale marks will not be drawn\&.
  200. .IP "\(bu" 2
  201. If you need a counterclockwise scale, use \fBQwtScaleDiv::setInterval()\fP
  202. .PP
  203. .RE
  204. .PP
  205. .SS "void QwtRoundScaleDraw::setRadius (double radius)"
  206. Change of radius the scale
  207. .PP
  208. Radius is the radius of the backbone without ticks and labels\&.
  209. .PP
  210. \fBParameters\fP
  211. .RS 4
  212. \fIradius\fP New Radius
  213. .RE
  214. .PP
  215. \fBSee also\fP
  216. .RS 4
  217. \fBmoveCenter()\fP
  218. .RE
  219. .PP
  220. .SH "Author"
  221. .PP
  222. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.