QwtAbstractScale.3 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. .TH "QwtAbstractScale" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtAbstractScale \- An abstract base class for widgets having a scale\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_abstract_scale\&.h>\fP
  11. .PP
  12. Inherits QWidget\&.
  13. .PP
  14. Inherited by \fBQwtAbstractSlider\fP, and \fBQwtThermo\fP\&.
  15. .SS "Public Member Functions"
  16. .in +1c
  17. .ti -1c
  18. .RI "\fBQwtAbstractScale\fP (QWidget *parent=NULL)"
  19. .br
  20. .ti -1c
  21. .RI "virtual \fB~QwtAbstractScale\fP ()"
  22. .br
  23. .RI "Destructor\&. "
  24. .ti -1c
  25. .RI "void \fBsetScale\fP (double \fBlowerBound\fP, double \fBupperBound\fP)"
  26. .br
  27. .RI "Specify a scale\&. "
  28. .ti -1c
  29. .RI "void \fBsetScale\fP (const \fBQwtInterval\fP &)"
  30. .br
  31. .RI "Specify a scale\&. "
  32. .ti -1c
  33. .RI "void \fBsetScale\fP (const \fBQwtScaleDiv\fP &)"
  34. .br
  35. .RI "Specify a scale\&. "
  36. .ti -1c
  37. .RI "const \fBQwtScaleDiv\fP & \fBscaleDiv\fP () const"
  38. .br
  39. .ti -1c
  40. .RI "void \fBsetLowerBound\fP (double value)"
  41. .br
  42. .ti -1c
  43. .RI "double \fBlowerBound\fP () const"
  44. .br
  45. .ti -1c
  46. .RI "void \fBsetUpperBound\fP (double value)"
  47. .br
  48. .ti -1c
  49. .RI "double \fBupperBound\fP () const"
  50. .br
  51. .ti -1c
  52. .RI "void \fBsetScaleStepSize\fP (double stepSize)"
  53. .br
  54. .RI "Set the step size used for calculating a scale division\&. "
  55. .ti -1c
  56. .RI "double \fBscaleStepSize\fP () const"
  57. .br
  58. .ti -1c
  59. .RI "void \fBsetScaleMaxMajor\fP (int ticks)"
  60. .br
  61. .RI "Set the maximum number of major tick intervals\&. "
  62. .ti -1c
  63. .RI "int \fBscaleMaxMinor\fP () const"
  64. .br
  65. .ti -1c
  66. .RI "void \fBsetScaleMaxMinor\fP (int ticks)"
  67. .br
  68. .RI "Set the maximum number of minor tick intervals\&. "
  69. .ti -1c
  70. .RI "int \fBscaleMaxMajor\fP () const"
  71. .br
  72. .ti -1c
  73. .RI "void \fBsetScaleEngine\fP (\fBQwtScaleEngine\fP *)"
  74. .br
  75. .RI "Set a scale engine\&. "
  76. .ti -1c
  77. .RI "const \fBQwtScaleEngine\fP * \fBscaleEngine\fP () const"
  78. .br
  79. .ti -1c
  80. .RI "\fBQwtScaleEngine\fP * \fBscaleEngine\fP ()"
  81. .br
  82. .ti -1c
  83. .RI "int \fBtransform\fP (double) const"
  84. .br
  85. .ti -1c
  86. .RI "double \fBinvTransform\fP (int) const"
  87. .br
  88. .ti -1c
  89. .RI "bool \fBisInverted\fP () const"
  90. .br
  91. .ti -1c
  92. .RI "double \fBminimum\fP () const"
  93. .br
  94. .ti -1c
  95. .RI "double \fBmaximum\fP () const"
  96. .br
  97. .ti -1c
  98. .RI "const \fBQwtScaleMap\fP & \fBscaleMap\fP () const"
  99. .br
  100. .in -1c
  101. .SS "Protected Member Functions"
  102. .in +1c
  103. .ti -1c
  104. .RI "void \fBrescale\fP (double \fBlowerBound\fP, double \fBupperBound\fP, double stepSize)"
  105. .br
  106. .ti -1c
  107. .RI "void \fBsetAbstractScaleDraw\fP (\fBQwtAbstractScaleDraw\fP *)"
  108. .br
  109. .RI "Set a scale draw\&. "
  110. .ti -1c
  111. .RI "const \fBQwtAbstractScaleDraw\fP * \fBabstractScaleDraw\fP () const"
  112. .br
  113. .ti -1c
  114. .RI "\fBQwtAbstractScaleDraw\fP * \fBabstractScaleDraw\fP ()"
  115. .br
  116. .ti -1c
  117. .RI "virtual void \fBscaleChange\fP ()"
  118. .br
  119. .RI "Notify changed scale\&. "
  120. .in -1c
  121. .SH "Detailed Description"
  122. .PP
  123. An abstract base class for widgets having a scale\&.
  124. The scale of an \fBQwtAbstractScale\fP is determined by a \fBQwtScaleDiv\fP definition, that contains the boundaries and the ticks of the scale\&. The scale is painted using a \fBQwtScaleDraw\fP object\&.
  125. .PP
  126. The scale division might be assigned explicitly - but usually it is calculated from the boundaries using a \fBQwtScaleEngine\fP\&.
  127. .PP
  128. The scale engine also decides the type of transformation of the scale ( linear, logarithmic \&.\&.\&. )\&.
  129. .SH "Constructor & Destructor Documentation"
  130. .PP
  131. .SS "QwtAbstractScale::QwtAbstractScale (QWidget * parent = \fCNULL\fP)"
  132. Constructor
  133. .PP
  134. \fBParameters\fP
  135. .RS 4
  136. \fIparent\fP Parent widget
  137. .RE
  138. .PP
  139. Creates a default \fBQwtScaleDraw\fP and a \fBQwtLinearScaleEngine\fP\&. The initial scale boundaries are set to [ 0\&.0, 100\&.0 ]
  140. .PP
  141. The \fBscaleStepSize()\fP is initialized to 0\&.0, \fBscaleMaxMajor()\fP to 5 and scaleMaxMajor to 3\&.
  142. .SH "Member Function Documentation"
  143. .PP
  144. .SS "\fBQwtAbstractScaleDraw\fP * QwtAbstractScale::abstractScaleDraw ()\fC [protected]\fP"
  145. .PP
  146. \fBReturns\fP
  147. .RS 4
  148. Scale draw
  149. .RE
  150. .PP
  151. \fBSee also\fP
  152. .RS 4
  153. \fBsetAbstractScaleDraw()\fP
  154. .RE
  155. .PP
  156. .SS "const \fBQwtAbstractScaleDraw\fP * QwtAbstractScale::abstractScaleDraw () const\fC [protected]\fP"
  157. .PP
  158. \fBReturns\fP
  159. .RS 4
  160. Scale draw
  161. .RE
  162. .PP
  163. \fBSee also\fP
  164. .RS 4
  165. \fBsetAbstractScaleDraw()\fP
  166. .RE
  167. .PP
  168. .SS "double QwtAbstractScale::invTransform (int value) const"
  169. Translate a widget coordinate into a scale value
  170. .PP
  171. \fBParameters\fP
  172. .RS 4
  173. \fIvalue\fP Widget coordinate
  174. .RE
  175. .PP
  176. \fBReturns\fP
  177. .RS 4
  178. Corresponding scale coordinate for value
  179. .RE
  180. .PP
  181. \fBSee also\fP
  182. .RS 4
  183. \fBscaleMap()\fP, \fBtransform()\fP
  184. .RE
  185. .PP
  186. .SS "bool QwtAbstractScale::isInverted () const"
  187. .PP
  188. \fBReturns\fP
  189. .RS 4
  190. True, when the scale is increasing in opposite direction to the widget coordinates
  191. .RE
  192. .PP
  193. .SS "double QwtAbstractScale::lowerBound () const"
  194. .PP
  195. \fBReturns\fP
  196. .RS 4
  197. Lower bound of the scale
  198. .RE
  199. .PP
  200. \fBSee also\fP
  201. .RS 4
  202. \fBsetLowerBound()\fP, \fBsetScale()\fP, \fBupperBound()\fP
  203. .RE
  204. .PP
  205. .SS "double QwtAbstractScale::maximum () const"
  206. .PP
  207. \fBReturns\fP
  208. .RS 4
  209. The boundary with the larger value
  210. .RE
  211. .PP
  212. \fBSee also\fP
  213. .RS 4
  214. \fBminimum()\fP, \fBlowerBound()\fP, \fBupperBound()\fP
  215. .RE
  216. .PP
  217. .SS "double QwtAbstractScale::minimum () const"
  218. .PP
  219. \fBReturns\fP
  220. .RS 4
  221. The boundary with the smaller value
  222. .RE
  223. .PP
  224. \fBSee also\fP
  225. .RS 4
  226. \fBmaximum()\fP, \fBlowerBound()\fP, \fBupperBound()\fP
  227. .RE
  228. .PP
  229. .SS "void QwtAbstractScale::rescale (double lowerBound, double upperBound, double stepSize)\fC [protected]\fP"
  230. Recalculate the scale division and update the scale\&.
  231. .PP
  232. \fBParameters\fP
  233. .RS 4
  234. \fIlowerBound\fP Lower limit of the scale interval
  235. .br
  236. \fIupperBound\fP Upper limit of the scale interval
  237. .br
  238. \fIstepSize\fP Major step size
  239. .RE
  240. .PP
  241. \fBSee also\fP
  242. .RS 4
  243. \fBscaleChange()\fP
  244. .RE
  245. .PP
  246. .SS "const \fBQwtScaleDiv\fP & QwtAbstractScale::scaleDiv () const"
  247. .PP
  248. \fBReturns\fP
  249. .RS 4
  250. Scale boundaries and positions of the ticks
  251. .RE
  252. .PP
  253. The scale division might have been assigned explicitly or calculated implicitly by \fBrescale()\fP\&.
  254. .SS "\fBQwtScaleEngine\fP * QwtAbstractScale::scaleEngine ()"
  255. .PP
  256. \fBReturns\fP
  257. .RS 4
  258. Scale engine
  259. .RE
  260. .PP
  261. \fBSee also\fP
  262. .RS 4
  263. \fBsetScaleEngine()\fP
  264. .RE
  265. .PP
  266. .SS "const \fBQwtScaleEngine\fP * QwtAbstractScale::scaleEngine () const"
  267. .PP
  268. \fBReturns\fP
  269. .RS 4
  270. Scale engine
  271. .RE
  272. .PP
  273. \fBSee also\fP
  274. .RS 4
  275. \fBsetScaleEngine()\fP
  276. .RE
  277. .PP
  278. .SS "const \fBQwtScaleMap\fP & QwtAbstractScale::scaleMap () const"
  279. .PP
  280. \fBReturns\fP
  281. .RS 4
  282. Map to translate between scale and widget coordinates
  283. .RE
  284. .PP
  285. .SS "int QwtAbstractScale::scaleMaxMajor () const"
  286. .PP
  287. \fBReturns\fP
  288. .RS 4
  289. Maximal number of major tick intervals
  290. .RE
  291. .PP
  292. \fBSee also\fP
  293. .RS 4
  294. \fBsetScaleMaxMajor()\fP, \fBscaleMaxMinor()\fP
  295. .RE
  296. .PP
  297. .SS "int QwtAbstractScale::scaleMaxMinor () const"
  298. .PP
  299. \fBReturns\fP
  300. .RS 4
  301. Maximal number of minor tick intervals
  302. .RE
  303. .PP
  304. \fBSee also\fP
  305. .RS 4
  306. \fBsetScaleMaxMinor()\fP, \fBscaleMaxMajor()\fP
  307. .RE
  308. .PP
  309. .SS "double QwtAbstractScale::scaleStepSize () const"
  310. .PP
  311. \fBReturns\fP
  312. .RS 4
  313. Hint for the step size of the scale
  314. .RE
  315. .PP
  316. \fBSee also\fP
  317. .RS 4
  318. \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP
  319. .RE
  320. .PP
  321. .SS "void QwtAbstractScale::setAbstractScaleDraw (\fBQwtAbstractScaleDraw\fP * scaleDraw)\fC [protected]\fP"
  322. .PP
  323. Set a scale draw\&. scaleDraw has to be created with new and will be deleted in the destructor or the next call of \fBsetAbstractScaleDraw()\fP\&.
  324. .PP
  325. \fBSee also\fP
  326. .RS 4
  327. \fBabstractScaleDraw()\fP
  328. .RE
  329. .PP
  330. .SS "void QwtAbstractScale::setLowerBound (double value)"
  331. Set the lower bound of the scale
  332. .PP
  333. \fBParameters\fP
  334. .RS 4
  335. \fIvalue\fP Lower bound
  336. .RE
  337. .PP
  338. \fBSee also\fP
  339. .RS 4
  340. \fBlowerBound()\fP, \fBsetScale()\fP, \fBsetUpperBound()\fP
  341. .RE
  342. .PP
  343. \fBNote\fP
  344. .RS 4
  345. For inverted scales the lower bound is greater than the upper bound
  346. .RE
  347. .PP
  348. .SS "void QwtAbstractScale::setScale (const \fBQwtInterval\fP & interval)"
  349. .PP
  350. Specify a scale\&. Define a scale by an interval
  351. .PP
  352. The ticks are calculated using \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP\&.
  353. .PP
  354. \fBParameters\fP
  355. .RS 4
  356. \fIinterval\fP Interval
  357. .RE
  358. .PP
  359. .SS "void QwtAbstractScale::setScale (const \fBQwtScaleDiv\fP & scaleDiv)"
  360. .PP
  361. Specify a scale\&. \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP and have no effect\&.
  362. .PP
  363. \fBParameters\fP
  364. .RS 4
  365. \fIscaleDiv\fP Scale division
  366. .RE
  367. .PP
  368. \fBSee also\fP
  369. .RS 4
  370. setAutoScale()
  371. .RE
  372. .PP
  373. .SS "void QwtAbstractScale::setScale (double lowerBound, double upperBound)"
  374. .PP
  375. Specify a scale\&. Define a scale by an interval
  376. .PP
  377. The ticks are calculated using \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP\&.
  378. .PP
  379. \fBParameters\fP
  380. .RS 4
  381. \fIlowerBound\fP lower limit of the scale interval
  382. .br
  383. \fIupperBound\fP upper limit of the scale interval
  384. .RE
  385. .PP
  386. \fBNote\fP
  387. .RS 4
  388. For inverted scales the lower bound is greater than the upper bound
  389. .RE
  390. .PP
  391. .SS "void QwtAbstractScale::setScaleEngine (\fBQwtScaleEngine\fP * scaleEngine)"
  392. .PP
  393. Set a scale engine\&. The scale engine is responsible for calculating the scale division and provides a transformation between scale and widget coordinates\&.
  394. .PP
  395. scaleEngine has to be created with new and will be deleted in the destructor or the next call of setScaleEngine\&.
  396. .SS "void QwtAbstractScale::setScaleMaxMajor (int ticks)"
  397. .PP
  398. Set the maximum number of major tick intervals\&. The scale's major ticks are calculated automatically such that the number of major intervals does not exceed ticks\&.
  399. .PP
  400. The default value is 5\&.
  401. .PP
  402. \fBParameters\fP
  403. .RS 4
  404. \fIticks\fP Maximal number of major ticks\&.
  405. .RE
  406. .PP
  407. \fBSee also\fP
  408. .RS 4
  409. \fBscaleMaxMajor()\fP, \fBsetScaleMaxMinor()\fP, \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideInterval()\fP
  410. .RE
  411. .PP
  412. .SS "void QwtAbstractScale::setScaleMaxMinor (int ticks)"
  413. .PP
  414. Set the maximum number of minor tick intervals\&. The scale's minor ticks are calculated automatically such that the number of minor intervals does not exceed ticks\&. The default value is 3\&.
  415. .PP
  416. \fBParameters\fP
  417. .RS 4
  418. \fIticks\fP Maximal number of minor ticks\&.
  419. .RE
  420. .PP
  421. \fBSee also\fP
  422. .RS 4
  423. \fBscaleMaxMajor()\fP, \fBsetScaleMaxMinor()\fP, \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideInterval()\fP
  424. .RE
  425. .PP
  426. .SS "void QwtAbstractScale::setScaleStepSize (double stepSize)"
  427. .PP
  428. Set the step size used for calculating a scale division\&. The step size is hint for calculating the intervals for the major ticks of the scale\&. A value of 0\&.0 is interpreted as no hint\&.
  429. .PP
  430. \fBParameters\fP
  431. .RS 4
  432. \fIstepSize\fP Hint for the step size of the scale
  433. .RE
  434. .PP
  435. \fBSee also\fP
  436. .RS 4
  437. \fBscaleStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP
  438. .RE
  439. .PP
  440. \fBNote\fP
  441. .RS 4
  442. Position and distance between the major ticks also depends on \fBscaleMaxMajor()\fP\&.
  443. .RE
  444. .PP
  445. .SS "void QwtAbstractScale::setUpperBound (double value)"
  446. Set the upper bound of the scale
  447. .PP
  448. \fBParameters\fP
  449. .RS 4
  450. \fIvalue\fP Upper bound
  451. .RE
  452. .PP
  453. \fBSee also\fP
  454. .RS 4
  455. \fBupperBound()\fP, \fBsetScale()\fP, \fBsetLowerBound()\fP
  456. .RE
  457. .PP
  458. \fBNote\fP
  459. .RS 4
  460. For inverted scales the lower bound is greater than the upper bound
  461. .RE
  462. .PP
  463. .SS "int QwtAbstractScale::transform (double value) const"
  464. Translate a scale value into a widget coordinate
  465. .PP
  466. \fBParameters\fP
  467. .RS 4
  468. \fIvalue\fP Scale value
  469. .RE
  470. .PP
  471. \fBReturns\fP
  472. .RS 4
  473. Corresponding widget coordinate for value
  474. .RE
  475. .PP
  476. \fBSee also\fP
  477. .RS 4
  478. \fBscaleMap()\fP, \fBinvTransform()\fP
  479. .RE
  480. .PP
  481. .SS "double QwtAbstractScale::upperBound () const"
  482. .PP
  483. \fBReturns\fP
  484. .RS 4
  485. Upper bound of the scale
  486. .RE
  487. .PP
  488. \fBSee also\fP
  489. .RS 4
  490. \fBsetUpperBound()\fP, \fBsetScale()\fP, \fBlowerBound()\fP
  491. .RE
  492. .PP
  493. .SH "Author"
  494. .PP
  495. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.