QwtPlotPicker.3 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. .TH "QwtPlotPicker" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtPlotPicker \- \fBQwtPlotPicker\fP provides selections on a plot canvas\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_plot_picker\&.h>\fP
  11. .PP
  12. Inherits \fBQwtPicker\fP\&.
  13. .PP
  14. Inherited by \fBQwtPlotZoomer\fP\&.
  15. .SS "Signals"
  16. .in +1c
  17. .ti -1c
  18. .RI "void \fBselected\fP (const QPointF &pos)"
  19. .br
  20. .ti -1c
  21. .RI "void \fBselected\fP (const QRectF &rect)"
  22. .br
  23. .ti -1c
  24. .RI "void \fBselected\fP (const QVector< QPointF > &pa)"
  25. .br
  26. .ti -1c
  27. .RI "void \fBappended\fP (const QPointF &pos)"
  28. .br
  29. .ti -1c
  30. .RI "void \fBmoved\fP (const QPointF &pos)"
  31. .br
  32. .in -1c
  33. .SS "Public Member Functions"
  34. .in +1c
  35. .ti -1c
  36. .RI "\fBQwtPlotPicker\fP (QWidget *\fBcanvas\fP)"
  37. .br
  38. .RI "Create a plot picker\&. "
  39. .ti -1c
  40. .RI "virtual \fB~QwtPlotPicker\fP ()"
  41. .br
  42. .RI "Destructor\&. "
  43. .ti -1c
  44. .RI "\fBQwtPlotPicker\fP (int \fBxAxis\fP, int \fByAxis\fP, QWidget *)"
  45. .br
  46. .ti -1c
  47. .RI "\fBQwtPlotPicker\fP (int \fBxAxis\fP, int \fByAxis\fP, \fBRubberBand\fP \fBrubberBand\fP, \fBDisplayMode\fP \fBtrackerMode\fP, QWidget *)"
  48. .br
  49. .ti -1c
  50. .RI "virtual void \fBsetAxis\fP (int \fBxAxis\fP, int \fByAxis\fP)"
  51. .br
  52. .ti -1c
  53. .RI "int \fBxAxis\fP () const"
  54. .br
  55. .RI "Return x axis\&. "
  56. .ti -1c
  57. .RI "int \fByAxis\fP () const"
  58. .br
  59. .RI "Return y axis\&. "
  60. .ti -1c
  61. .RI "\fBQwtPlot\fP * \fBplot\fP ()"
  62. .br
  63. .ti -1c
  64. .RI "const \fBQwtPlot\fP * \fBplot\fP () const"
  65. .br
  66. .ti -1c
  67. .RI "QWidget * \fBcanvas\fP ()"
  68. .br
  69. .ti -1c
  70. .RI "const QWidget * \fBcanvas\fP () const"
  71. .br
  72. .in -1c
  73. .SS "Protected Member Functions"
  74. .in +1c
  75. .ti -1c
  76. .RI "QRectF \fBscaleRect\fP () const"
  77. .br
  78. .ti -1c
  79. .RI "QRectF \fBinvTransform\fP (const QRect &) const"
  80. .br
  81. .ti -1c
  82. .RI "QRect \fBtransform\fP (const QRectF &) const"
  83. .br
  84. .ti -1c
  85. .RI "QPointF \fBinvTransform\fP (const QPoint &) const"
  86. .br
  87. .ti -1c
  88. .RI "QPoint \fBtransform\fP (const QPointF &) const"
  89. .br
  90. .ti -1c
  91. .RI "virtual \fBQwtText\fP \fBtrackerText\fP (const QPoint &) const"
  92. .br
  93. .ti -1c
  94. .RI "virtual \fBQwtText\fP \fBtrackerTextF\fP (const QPointF &) const"
  95. .br
  96. .RI "Translate a position into a position string\&. "
  97. .ti -1c
  98. .RI "virtual void \fBmove\fP (const QPoint &)"
  99. .br
  100. .ti -1c
  101. .RI "virtual void \fBappend\fP (const QPoint &)"
  102. .br
  103. .ti -1c
  104. .RI "virtual bool \fBend\fP (bool ok=true)"
  105. .br
  106. .in -1c
  107. .SS "Additional Inherited Members"
  108. .SH "Detailed Description"
  109. .PP
  110. \fBQwtPlotPicker\fP provides selections on a plot canvas\&.
  111. \fBQwtPlotPicker\fP is a \fBQwtPicker\fP tailored for selections on a plot canvas\&. It is set to a x-Axis and y-Axis and translates all pixel coordinates into this coordinate system\&.
  112. .SH "Constructor & Destructor Documentation"
  113. .PP
  114. .SS "QwtPlotPicker::QwtPlotPicker (QWidget * canvas)\fC [explicit]\fP"
  115. .PP
  116. Create a plot picker\&. The picker is set to those x- and y-axis of the plot that are enabled\&. If both or no x-axis are enabled, the picker is set to \fBQwtPlot::xBottom\fP\&. If both or no y-axis are enabled, it is set to \fBQwtPlot::yLeft\fP\&.
  117. .PP
  118. \fBParameters\fP
  119. .RS 4
  120. \fIcanvas\fP Plot canvas to observe, also the parent object
  121. .RE
  122. .PP
  123. \fBSee also\fP
  124. .RS 4
  125. \fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, \fBscaleRect()\fP
  126. .RE
  127. .PP
  128. .SS "QwtPlotPicker::QwtPlotPicker (int xAxis, int yAxis, QWidget * canvas)\fC [explicit]\fP"
  129. Create a plot picker
  130. .PP
  131. \fBParameters\fP
  132. .RS 4
  133. \fIxAxis\fP Set the x axis of the picker
  134. .br
  135. \fIyAxis\fP Set the y axis of the picker
  136. .br
  137. \fIcanvas\fP Plot canvas to observe, also the parent object
  138. .RE
  139. .PP
  140. \fBSee also\fP
  141. .RS 4
  142. \fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, \fBscaleRect()\fP
  143. .RE
  144. .PP
  145. .SS "QwtPlotPicker::QwtPlotPicker (int xAxis, int yAxis, \fBRubberBand\fP rubberBand, \fBDisplayMode\fP trackerMode, QWidget * canvas)\fC [explicit]\fP"
  146. Create a plot picker
  147. .PP
  148. \fBParameters\fP
  149. .RS 4
  150. \fIxAxis\fP X axis of the picker
  151. .br
  152. \fIyAxis\fP Y axis of the picker
  153. .br
  154. \fIrubberBand\fP Rubber band style
  155. .br
  156. \fItrackerMode\fP Tracker mode
  157. .br
  158. \fIcanvas\fP Plot canvas to observe, also the parent object
  159. .RE
  160. .PP
  161. \fBSee also\fP
  162. .RS 4
  163. \fBQwtPicker\fP, QwtPicker::setSelectionFlags(), \fBQwtPicker::setRubberBand()\fP, \fBQwtPicker::setTrackerMode\fP
  164. .PP
  165. \fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, \fBscaleRect()\fP
  166. .RE
  167. .PP
  168. .SH "Member Function Documentation"
  169. .PP
  170. .SS "void QwtPlotPicker::append (const QPoint & pos)\fC [protected]\fP, \fC [virtual]\fP"
  171. Append a point to the selection and update rubber band and tracker\&.
  172. .PP
  173. \fBParameters\fP
  174. .RS 4
  175. \fIpos\fP Additional point
  176. .RE
  177. .PP
  178. \fBSee also\fP
  179. .RS 4
  180. \fBisActive\fP, \fBbegin()\fP, \fBend()\fP, \fBmove()\fP, \fBappended()\fP
  181. .RE
  182. .PP
  183. \fBNote\fP
  184. .RS 4
  185. The \fBappended(const QPoint &)\fP, appended(const QDoublePoint &) signals are emitted\&.
  186. .RE
  187. .PP
  188. .PP
  189. Reimplemented from \fBQwtPicker\fP\&.
  190. .SS "void QwtPlotPicker::appended (const QPointF & pos)\fC [signal]\fP"
  191. A signal emitted when a point has been appended to the selection
  192. .PP
  193. \fBParameters\fP
  194. .RS 4
  195. \fIpos\fP Position of the appended point\&.
  196. .RE
  197. .PP
  198. \fBSee also\fP
  199. .RS 4
  200. \fBappend()\fP\&. \fBmoved()\fP
  201. .RE
  202. .PP
  203. .SS "QWidget * QwtPlotPicker::canvas ()"
  204. .PP
  205. \fBReturns\fP
  206. .RS 4
  207. Observed plot canvas
  208. .RE
  209. .PP
  210. .SS "const QWidget * QwtPlotPicker::canvas () const"
  211. .PP
  212. \fBReturns\fP
  213. .RS 4
  214. Observed plot canvas
  215. .RE
  216. .PP
  217. .SS "bool QwtPlotPicker::end (bool ok = \fCtrue\fP)\fC [protected]\fP, \fC [virtual]\fP"
  218. Close a selection setting the state to inactive\&.
  219. .PP
  220. \fBParameters\fP
  221. .RS 4
  222. \fIok\fP If true, complete the selection and emit selected signals otherwise discard the selection\&.
  223. .RE
  224. .PP
  225. \fBReturns\fP
  226. .RS 4
  227. True if the selection has been accepted, false otherwise
  228. .RE
  229. .PP
  230. .PP
  231. Reimplemented from \fBQwtPicker\fP\&.
  232. .PP
  233. Reimplemented in \fBQwtPlotZoomer\fP\&.
  234. .SS "QPointF QwtPlotPicker::invTransform (const QPoint & pos) const\fC [protected]\fP"
  235. Translate a point from pixel into plot coordinates
  236. .PP
  237. \fBReturns\fP
  238. .RS 4
  239. Point in plot coordinates
  240. .RE
  241. .PP
  242. \fBSee also\fP
  243. .RS 4
  244. \fBtransform()\fP
  245. .RE
  246. .PP
  247. .SS "QRectF QwtPlotPicker::invTransform (const QRect & rect) const\fC [protected]\fP"
  248. Translate a rectangle from pixel into plot coordinates
  249. .PP
  250. \fBReturns\fP
  251. .RS 4
  252. Rectangle in plot coordinates
  253. .RE
  254. .PP
  255. \fBSee also\fP
  256. .RS 4
  257. \fBtransform()\fP
  258. .RE
  259. .PP
  260. .SS "void QwtPlotPicker::move (const QPoint & pos)\fC [protected]\fP, \fC [virtual]\fP"
  261. Move the last point of the selection
  262. .PP
  263. \fBParameters\fP
  264. .RS 4
  265. \fIpos\fP New position
  266. .RE
  267. .PP
  268. \fBSee also\fP
  269. .RS 4
  270. \fBisActive\fP, \fBbegin()\fP, \fBend()\fP, \fBappend()\fP
  271. .RE
  272. .PP
  273. \fBNote\fP
  274. .RS 4
  275. The \fBmoved(const QPoint &)\fP, moved(const QDoublePoint &) signals are emitted\&.
  276. .RE
  277. .PP
  278. .PP
  279. Reimplemented from \fBQwtPicker\fP\&.
  280. .SS "void QwtPlotPicker::moved (const QPointF & pos)\fC [signal]\fP"
  281. A signal emitted whenever the last appended point of the selection has been moved\&.
  282. .PP
  283. \fBParameters\fP
  284. .RS 4
  285. \fIpos\fP Position of the moved last point of the selection\&.
  286. .RE
  287. .PP
  288. \fBSee also\fP
  289. .RS 4
  290. \fBmove()\fP, \fBappended()\fP
  291. .RE
  292. .PP
  293. .SS "\fBQwtPlot\fP * QwtPlotPicker::plot ()"
  294. .PP
  295. \fBReturns\fP
  296. .RS 4
  297. Plot widget, containing the observed plot canvas
  298. .RE
  299. .PP
  300. .SS "const \fBQwtPlot\fP * QwtPlotPicker::plot () const"
  301. .PP
  302. \fBReturns\fP
  303. .RS 4
  304. Plot widget, containing the observed plot canvas
  305. .RE
  306. .PP
  307. .SS "QRectF QwtPlotPicker::scaleRect () const\fC [protected]\fP"
  308. .PP
  309. \fBReturns\fP
  310. .RS 4
  311. Normalized bounding rectangle of the axes
  312. .RE
  313. .PP
  314. \fBSee also\fP
  315. .RS 4
  316. \fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP\&.
  317. .RE
  318. .PP
  319. .SS "void QwtPlotPicker::selected (const QPointF & pos)\fC [signal]\fP"
  320. A signal emitted in case of \fBQwtPickerMachine::PointSelection\fP\&.
  321. .PP
  322. \fBParameters\fP
  323. .RS 4
  324. \fIpos\fP Selected point
  325. .RE
  326. .PP
  327. .SS "void QwtPlotPicker::selected (const QRectF & rect)\fC [signal]\fP"
  328. A signal emitted in case of \fBQwtPickerMachine::RectSelection\fP\&.
  329. .PP
  330. \fBParameters\fP
  331. .RS 4
  332. \fIrect\fP Selected rectangle
  333. .RE
  334. .PP
  335. .SS "void QwtPlotPicker::selected (const QVector< QPointF > & pa)\fC [signal]\fP"
  336. A signal emitting the selected points, at the end of a selection\&.
  337. .PP
  338. \fBParameters\fP
  339. .RS 4
  340. \fIpa\fP Selected points
  341. .RE
  342. .PP
  343. .SS "void QwtPlotPicker::setAxis (int xAxis, int yAxis)\fC [virtual]\fP"
  344. Set the x and y axes of the picker
  345. .PP
  346. \fBParameters\fP
  347. .RS 4
  348. \fIxAxis\fP X axis
  349. .br
  350. \fIyAxis\fP Y axis
  351. .RE
  352. .PP
  353. .PP
  354. Reimplemented in \fBQwtPlotZoomer\fP\&.
  355. .SS "\fBQwtText\fP QwtPlotPicker::trackerText (const QPoint & pos) const\fC [protected]\fP, \fC [virtual]\fP"
  356. Translate a pixel position into a position string
  357. .PP
  358. \fBParameters\fP
  359. .RS 4
  360. \fIpos\fP Position in pixel coordinates
  361. .RE
  362. .PP
  363. \fBReturns\fP
  364. .RS 4
  365. Position string
  366. .RE
  367. .PP
  368. .PP
  369. Reimplemented from \fBQwtPicker\fP\&.
  370. .SS "\fBQwtText\fP QwtPlotPicker::trackerTextF (const QPointF & pos) const\fC [protected]\fP, \fC [virtual]\fP"
  371. .PP
  372. Translate a position into a position string\&. In case of HLineRubberBand the label is the value of the y position, in case of VLineRubberBand the value of the x position\&. Otherwise the label contains x and y position separated by a ',' \&.
  373. .PP
  374. The format for the double to string conversion is '%\&.4f'\&.
  375. .PP
  376. \fBParameters\fP
  377. .RS 4
  378. \fIpos\fP Position
  379. .RE
  380. .PP
  381. \fBReturns\fP
  382. .RS 4
  383. Position string
  384. .RE
  385. .PP
  386. .SS "QPoint QwtPlotPicker::transform (const QPointF & pos) const\fC [protected]\fP"
  387. Translate a point from plot into pixel coordinates
  388. .PP
  389. \fBReturns\fP
  390. .RS 4
  391. Point in pixel coordinates
  392. .RE
  393. .PP
  394. \fBSee also\fP
  395. .RS 4
  396. \fBinvTransform()\fP
  397. .RE
  398. .PP
  399. .SS "QRect QwtPlotPicker::transform (const QRectF & rect) const\fC [protected]\fP"
  400. Translate a rectangle from plot into pixel coordinates
  401. .PP
  402. \fBReturns\fP
  403. .RS 4
  404. Rectangle in pixel coordinates
  405. .RE
  406. .PP
  407. \fBSee also\fP
  408. .RS 4
  409. \fBinvTransform()\fP
  410. .RE
  411. .PP
  412. .SH "Author"
  413. .PP
  414. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.