QwtInterval.3 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. .TH "QwtInterval" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtInterval \- A class representing an interval\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_interval\&.h>\fP
  11. .SS "Public Types"
  12. .in +1c
  13. .ti -1c
  14. .RI "enum \fBBorderFlag\fP { \fBIncludeBorders\fP = 0x00, \fBExcludeMinimum\fP = 0x01, \fBExcludeMaximum\fP = 0x02, \fBExcludeBorders\fP = ExcludeMinimum | ExcludeMaximum }"
  15. .br
  16. .ti -1c
  17. .RI "typedef QFlags< \fBBorderFlag\fP > \fBBorderFlags\fP"
  18. .br
  19. .RI "Border flags\&. "
  20. .in -1c
  21. .SS "Public Member Functions"
  22. .in +1c
  23. .ti -1c
  24. .RI "\fBQwtInterval\fP ()"
  25. .br
  26. .RI "Default Constructor\&. "
  27. .ti -1c
  28. .RI "\fBQwtInterval\fP (double \fBminValue\fP, double \fBmaxValue\fP, \fBBorderFlags\fP=\fBIncludeBorders\fP)"
  29. .br
  30. .ti -1c
  31. .RI "void \fBsetInterval\fP (double \fBminValue\fP, double \fBmaxValue\fP, \fBBorderFlags\fP=\fBIncludeBorders\fP)"
  32. .br
  33. .ti -1c
  34. .RI "\fBQwtInterval\fP \fBnormalized\fP () const"
  35. .br
  36. .RI "Normalize the limits of the interval\&. "
  37. .ti -1c
  38. .RI "\fBQwtInterval\fP \fBinverted\fP () const"
  39. .br
  40. .ti -1c
  41. .RI "\fBQwtInterval\fP \fBlimited\fP (double lowerBound, double upperBound) const"
  42. .br
  43. .ti -1c
  44. .RI "bool \fBoperator==\fP (const \fBQwtInterval\fP &) const"
  45. .br
  46. .RI "Compare two intervals\&. "
  47. .ti -1c
  48. .RI "bool \fBoperator!=\fP (const \fBQwtInterval\fP &) const"
  49. .br
  50. .RI "Compare two intervals\&. "
  51. .ti -1c
  52. .RI "void \fBsetBorderFlags\fP (\fBBorderFlags\fP)"
  53. .br
  54. .ti -1c
  55. .RI "\fBBorderFlags\fP \fBborderFlags\fP () const"
  56. .br
  57. .ti -1c
  58. .RI "double \fBminValue\fP () const"
  59. .br
  60. .ti -1c
  61. .RI "double \fBmaxValue\fP () const"
  62. .br
  63. .ti -1c
  64. .RI "double \fBwidth\fP () const"
  65. .br
  66. .RI "Return the width of an interval\&. "
  67. .ti -1c
  68. .RI "void \fBsetMinValue\fP (double)"
  69. .br
  70. .ti -1c
  71. .RI "void \fBsetMaxValue\fP (double)"
  72. .br
  73. .ti -1c
  74. .RI "bool \fBcontains\fP (double value) const"
  75. .br
  76. .ti -1c
  77. .RI "bool \fBintersects\fP (const \fBQwtInterval\fP &) const"
  78. .br
  79. .RI "Test if two intervals overlap\&. "
  80. .ti -1c
  81. .RI "\fBQwtInterval\fP \fBintersect\fP (const \fBQwtInterval\fP &) const"
  82. .br
  83. .RI "Intersect 2 intervals\&. "
  84. .ti -1c
  85. .RI "\fBQwtInterval\fP \fBunite\fP (const \fBQwtInterval\fP &) const"
  86. .br
  87. .RI "Unite 2 intervals\&. "
  88. .ti -1c
  89. .RI "\fBQwtInterval\fP \fBoperator|\fP (const \fBQwtInterval\fP &) const"
  90. .br
  91. .ti -1c
  92. .RI "\fBQwtInterval\fP \fBoperator&\fP (const \fBQwtInterval\fP &) const"
  93. .br
  94. .RI "Intersection of two intervals\&. "
  95. .ti -1c
  96. .RI "\fBQwtInterval\fP & \fBoperator|=\fP (const \fBQwtInterval\fP &)"
  97. .br
  98. .RI "Unite this interval with the given interval\&. "
  99. .ti -1c
  100. .RI "\fBQwtInterval\fP & \fBoperator&=\fP (const \fBQwtInterval\fP &)"
  101. .br
  102. .RI "Intersect this interval with the given interval\&. "
  103. .ti -1c
  104. .RI "\fBQwtInterval\fP \fBextend\fP (double value) const"
  105. .br
  106. .RI "Extend the interval\&. "
  107. .ti -1c
  108. .RI "\fBQwtInterval\fP \fBoperator|\fP (double) const"
  109. .br
  110. .ti -1c
  111. .RI "\fBQwtInterval\fP & \fBoperator|=\fP (double)"
  112. .br
  113. .ti -1c
  114. .RI "bool \fBisValid\fP () const"
  115. .br
  116. .ti -1c
  117. .RI "bool \fBisNull\fP () const"
  118. .br
  119. .ti -1c
  120. .RI "void \fBinvalidate\fP ()"
  121. .br
  122. .ti -1c
  123. .RI "\fBQwtInterval\fP \fBsymmetrize\fP (double value) const"
  124. .br
  125. .in -1c
  126. .SH "Detailed Description"
  127. .PP
  128. A class representing an interval\&.
  129. The interval is represented by 2 doubles, the lower and the upper limit\&.
  130. .SH "Member Enumeration Documentation"
  131. .PP
  132. .SS "enum \fBQwtInterval::BorderFlag\fP"
  133. Flag indicating if a border is included or excluded
  134. .PP
  135. \fBSee also\fP
  136. .RS 4
  137. \fBsetBorderFlags()\fP, \fBborderFlags()\fP
  138. .RE
  139. .PP
  140. .PP
  141. \fBEnumerator\fP
  142. .in +1c
  143. .TP
  144. \fB\fIIncludeBorders \fP\fP
  145. Min/Max values are inside the interval\&.
  146. .TP
  147. \fB\fIExcludeMinimum \fP\fP
  148. Min value is not included in the interval\&.
  149. .TP
  150. \fB\fIExcludeMaximum \fP\fP
  151. Max value is not included in the interval\&.
  152. .TP
  153. \fB\fIExcludeBorders \fP\fP
  154. Min/Max values are not included in the interval\&.
  155. .SH "Constructor & Destructor Documentation"
  156. .PP
  157. .SS "QwtInterval::QwtInterval ()\fC [inline]\fP"
  158. .PP
  159. Default Constructor\&. Creates an invalid interval [0\&.0, -1\&.0]
  160. .PP
  161. \fBSee also\fP
  162. .RS 4
  163. \fBsetInterval()\fP, \fBisValid()\fP
  164. .RE
  165. .PP
  166. .SS "QwtInterval::QwtInterval (double minValue, double maxValue, \fBBorderFlags\fP borderFlags = \fC\fBIncludeBorders\fP\fP)\fC [inline]\fP"
  167. Constructor
  168. .PP
  169. Build an interval with from min/max values
  170. .PP
  171. \fBParameters\fP
  172. .RS 4
  173. \fIminValue\fP Minimum value
  174. .br
  175. \fImaxValue\fP Maximum value
  176. .br
  177. \fIborderFlags\fP Include/Exclude borders
  178. .RE
  179. .PP
  180. .SH "Member Function Documentation"
  181. .PP
  182. .SS "\fBQwtInterval::BorderFlags\fP QwtInterval::borderFlags () const\fC [inline]\fP"
  183. .PP
  184. \fBReturns\fP
  185. .RS 4
  186. Border flags
  187. .RE
  188. .PP
  189. \fBSee also\fP
  190. .RS 4
  191. \fBsetBorderFlags()\fP
  192. .RE
  193. .PP
  194. .SS "bool QwtInterval::contains (double value) const"
  195. Test if a value is inside an interval
  196. .PP
  197. \fBParameters\fP
  198. .RS 4
  199. \fIvalue\fP Value
  200. .RE
  201. .PP
  202. \fBReturns\fP
  203. .RS 4
  204. true, if value >= \fBminValue()\fP && value <= \fBmaxValue()\fP
  205. .RE
  206. .PP
  207. .SS "\fBQwtInterval\fP QwtInterval::extend (double value) const"
  208. .PP
  209. Extend the interval\&. If value is below \fBminValue()\fP, value becomes the lower limit\&. If value is above \fBmaxValue()\fP, value becomes the upper limit\&.
  210. .PP
  211. \fBextend()\fP has no effect for invalid intervals
  212. .PP
  213. \fBParameters\fP
  214. .RS 4
  215. \fIvalue\fP Value
  216. .RE
  217. .PP
  218. \fBReturns\fP
  219. .RS 4
  220. extended interval
  221. .RE
  222. .PP
  223. \fBSee also\fP
  224. .RS 4
  225. \fBisValid()\fP
  226. .RE
  227. .PP
  228. .SS "\fBQwtInterval\fP QwtInterval::intersect (const \fBQwtInterval\fP & other) const"
  229. .PP
  230. Intersect 2 intervals\&.
  231. .PP
  232. \fBParameters\fP
  233. .RS 4
  234. \fIother\fP Interval to be intersect with
  235. .RE
  236. .PP
  237. \fBReturns\fP
  238. .RS 4
  239. Intersection
  240. .RE
  241. .PP
  242. .SS "bool QwtInterval::intersects (const \fBQwtInterval\fP & other) const"
  243. .PP
  244. Test if two intervals overlap\&.
  245. .PP
  246. \fBParameters\fP
  247. .RS 4
  248. \fIother\fP Interval
  249. .RE
  250. .PP
  251. \fBReturns\fP
  252. .RS 4
  253. True, when the intervals are intersecting
  254. .RE
  255. .PP
  256. .SS "void QwtInterval::invalidate ()\fC [inline]\fP"
  257. Invalidate the interval
  258. .PP
  259. The limits are set to interval [0\&.0, -1\&.0]
  260. .PP
  261. \fBSee also\fP
  262. .RS 4
  263. \fBisValid()\fP
  264. .RE
  265. .PP
  266. .SS "\fBQwtInterval\fP QwtInterval::inverted () const"
  267. Invert the limits of the interval
  268. .PP
  269. \fBReturns\fP
  270. .RS 4
  271. Inverted interval
  272. .RE
  273. .PP
  274. \fBSee also\fP
  275. .RS 4
  276. \fBnormalized()\fP
  277. .RE
  278. .PP
  279. .SS "bool QwtInterval::isNull () const\fC [inline]\fP"
  280. .PP
  281. \fBReturns\fP
  282. .RS 4
  283. true, if \fBisValid()\fP && (\fBminValue()\fP >= \fBmaxValue()\fP)
  284. .RE
  285. .PP
  286. .SS "bool QwtInterval::isValid () const\fC [inline]\fP"
  287. A interval is valid when \fBminValue()\fP <= \fBmaxValue()\fP\&. In case of \fBQwtInterval::ExcludeBorders\fP it is true when \fBminValue()\fP < \fBmaxValue()\fP
  288. .PP
  289. \fBReturns\fP
  290. .RS 4
  291. True, when the interval is valid
  292. .RE
  293. .PP
  294. .SS "\fBQwtInterval\fP QwtInterval::limited (double lowerBound, double upperBound) const"
  295. Limit the interval, keeping the border modes
  296. .PP
  297. \fBParameters\fP
  298. .RS 4
  299. \fIlowerBound\fP Lower limit
  300. .br
  301. \fIupperBound\fP Upper limit
  302. .RE
  303. .PP
  304. \fBReturns\fP
  305. .RS 4
  306. Limited interval
  307. .RE
  308. .PP
  309. .SS "double QwtInterval::maxValue () const\fC [inline]\fP"
  310. .PP
  311. \fBReturns\fP
  312. .RS 4
  313. Upper limit of the interval
  314. .RE
  315. .PP
  316. .SS "double QwtInterval::minValue () const\fC [inline]\fP"
  317. .PP
  318. \fBReturns\fP
  319. .RS 4
  320. Lower limit of the interval
  321. .RE
  322. .PP
  323. .SS "\fBQwtInterval\fP QwtInterval::normalized () const"
  324. .PP
  325. Normalize the limits of the interval\&. If \fBmaxValue()\fP < \fBminValue()\fP the limits will be inverted\&.
  326. .PP
  327. \fBReturns\fP
  328. .RS 4
  329. Normalized interval
  330. .RE
  331. .PP
  332. \fBSee also\fP
  333. .RS 4
  334. \fBisValid()\fP, \fBinverted()\fP
  335. .RE
  336. .PP
  337. .SS "bool QwtInterval::operator!= (const \fBQwtInterval\fP & other) const\fC [inline]\fP"
  338. .PP
  339. Compare two intervals\&.
  340. .PP
  341. \fBParameters\fP
  342. .RS 4
  343. \fIother\fP Interval to compare with
  344. .RE
  345. .PP
  346. \fBReturns\fP
  347. .RS 4
  348. True, when this and other are not equal
  349. .RE
  350. .PP
  351. .SS "\fBQwtInterval\fP QwtInterval::operator& (const \fBQwtInterval\fP & other) const\fC [inline]\fP"
  352. .PP
  353. Intersection of two intervals\&.
  354. .PP
  355. \fBParameters\fP
  356. .RS 4
  357. \fIother\fP Interval to intersect with
  358. .RE
  359. .PP
  360. \fBReturns\fP
  361. .RS 4
  362. Intersection of this and other
  363. .RE
  364. .PP
  365. \fBSee also\fP
  366. .RS 4
  367. \fBintersect()\fP
  368. .RE
  369. .PP
  370. .SS "\fBQwtInterval\fP & QwtInterval::operator&= (const \fBQwtInterval\fP & other)"
  371. .PP
  372. Intersect this interval with the given interval\&.
  373. .PP
  374. \fBParameters\fP
  375. .RS 4
  376. \fIother\fP Interval to be intersected with
  377. .RE
  378. .PP
  379. \fBReturns\fP
  380. .RS 4
  381. This interval
  382. .RE
  383. .PP
  384. .SS "bool QwtInterval::operator== (const \fBQwtInterval\fP & other) const\fC [inline]\fP"
  385. .PP
  386. Compare two intervals\&.
  387. .PP
  388. \fBParameters\fP
  389. .RS 4
  390. \fIother\fP Interval to compare with
  391. .RE
  392. .PP
  393. \fBReturns\fP
  394. .RS 4
  395. True, when this and other are equal
  396. .RE
  397. .PP
  398. .SS "\fBQwtInterval\fP QwtInterval::operator| (const \fBQwtInterval\fP & other) const\fC [inline]\fP"
  399. Union of two intervals
  400. .PP
  401. \fBParameters\fP
  402. .RS 4
  403. \fIother\fP Interval to unite with
  404. .RE
  405. .PP
  406. \fBReturns\fP
  407. .RS 4
  408. Union of this and other
  409. .RE
  410. .PP
  411. \fBSee also\fP
  412. .RS 4
  413. \fBunite()\fP
  414. .RE
  415. .PP
  416. .SS "\fBQwtInterval\fP QwtInterval::operator| (double value) const\fC [inline]\fP"
  417. Extend an interval
  418. .PP
  419. \fBParameters\fP
  420. .RS 4
  421. \fIvalue\fP Value
  422. .RE
  423. .PP
  424. \fBReturns\fP
  425. .RS 4
  426. Extended interval
  427. .RE
  428. .PP
  429. \fBSee also\fP
  430. .RS 4
  431. \fBextend()\fP
  432. .RE
  433. .PP
  434. .SS "\fBQwtInterval\fP & QwtInterval::operator|= (const \fBQwtInterval\fP & other)"
  435. .PP
  436. Unite this interval with the given interval\&.
  437. .PP
  438. \fBParameters\fP
  439. .RS 4
  440. \fIother\fP Interval to be united with
  441. .RE
  442. .PP
  443. \fBReturns\fP
  444. .RS 4
  445. This interval
  446. .RE
  447. .PP
  448. .SS "\fBQwtInterval\fP & QwtInterval::operator|= (double value)"
  449. Extend an interval
  450. .PP
  451. \fBParameters\fP
  452. .RS 4
  453. \fIvalue\fP Value
  454. .RE
  455. .PP
  456. \fBReturns\fP
  457. .RS 4
  458. Reference of the extended interval
  459. .RE
  460. .PP
  461. \fBSee also\fP
  462. .RS 4
  463. \fBextend()\fP
  464. .RE
  465. .PP
  466. .SS "void QwtInterval::setBorderFlags (\fBBorderFlags\fP borderFlags)\fC [inline]\fP"
  467. Change the border flags
  468. .PP
  469. \fBParameters\fP
  470. .RS 4
  471. \fIborderFlags\fP Or'd BorderMode flags
  472. .RE
  473. .PP
  474. \fBSee also\fP
  475. .RS 4
  476. \fBborderFlags()\fP
  477. .RE
  478. .PP
  479. .SS "void QwtInterval::setInterval (double minValue, double maxValue, \fBBorderFlags\fP borderFlags = \fC\fBIncludeBorders\fP\fP)\fC [inline]\fP"
  480. Assign the limits of the interval
  481. .PP
  482. \fBParameters\fP
  483. .RS 4
  484. \fIminValue\fP Minimum value
  485. .br
  486. \fImaxValue\fP Maximum value
  487. .br
  488. \fIborderFlags\fP Include/Exclude borders
  489. .RE
  490. .PP
  491. .SS "void QwtInterval::setMaxValue (double maxValue)\fC [inline]\fP"
  492. Assign the upper limit of the interval
  493. .PP
  494. \fBParameters\fP
  495. .RS 4
  496. \fImaxValue\fP Maximum value
  497. .RE
  498. .PP
  499. .SS "void QwtInterval::setMinValue (double minValue)\fC [inline]\fP"
  500. Assign the lower limit of the interval
  501. .PP
  502. \fBParameters\fP
  503. .RS 4
  504. \fIminValue\fP Minimum value
  505. .RE
  506. .PP
  507. .SS "\fBQwtInterval\fP QwtInterval::symmetrize (double value) const"
  508. Adjust the limit that is closer to value, so that value becomes the center of the interval\&.
  509. .PP
  510. \fBParameters\fP
  511. .RS 4
  512. \fIvalue\fP Center
  513. .RE
  514. .PP
  515. \fBReturns\fP
  516. .RS 4
  517. Interval with value as center
  518. .RE
  519. .PP
  520. .SS "double QwtInterval::width () const\fC [inline]\fP"
  521. .PP
  522. Return the width of an interval\&. The width of invalid intervals is 0\&.0, otherwise the result is \fBmaxValue()\fP - \fBminValue()\fP\&.
  523. .PP
  524. \fBReturns\fP
  525. .RS 4
  526. Interval width
  527. .RE
  528. .PP
  529. \fBSee also\fP
  530. .RS 4
  531. \fBisValid()\fP
  532. .RE
  533. .PP
  534. .SH "Author"
  535. .PP
  536. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.