QwtEventPattern.3 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. .TH "QwtEventPattern" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtEventPattern \- A collection of event patterns\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_event_pattern\&.h>\fP
  11. .PP
  12. Inherited by \fBQwtPicker\fP\&.
  13. .SS "Classes"
  14. .in +1c
  15. .ti -1c
  16. .RI "class \fBKeyPattern\fP"
  17. .br
  18. .RI "A pattern for key events\&. "
  19. .ti -1c
  20. .RI "class \fBMousePattern\fP"
  21. .br
  22. .RI "A pattern for mouse events\&. "
  23. .in -1c
  24. .SS "Public Types"
  25. .in +1c
  26. .ti -1c
  27. .RI "enum \fBMousePatternCode\fP { \fBMouseSelect1\fP, \fBMouseSelect2\fP, \fBMouseSelect3\fP, \fBMouseSelect4\fP, \fBMouseSelect5\fP, \fBMouseSelect6\fP, \fBMousePatternCount\fP }"
  28. .br
  29. .RI "Symbolic mouse input codes\&. "
  30. .ti -1c
  31. .RI "enum \fBKeyPatternCode\fP { \fBKeySelect1\fP, \fBKeySelect2\fP, \fBKeyAbort\fP, \fBKeyLeft\fP, \fBKeyRight\fP, \fBKeyUp\fP, \fBKeyDown\fP, \fBKeyRedo\fP, \fBKeyUndo\fP, \fBKeyHome\fP, \fBKeyPatternCount\fP }"
  32. .br
  33. .RI "Symbolic keyboard input codes\&. "
  34. .in -1c
  35. .SS "Public Member Functions"
  36. .in +1c
  37. .ti -1c
  38. .RI "\fBQwtEventPattern\fP ()"
  39. .br
  40. .ti -1c
  41. .RI "virtual \fB~QwtEventPattern\fP ()"
  42. .br
  43. .RI "Destructor\&. "
  44. .ti -1c
  45. .RI "void \fBinitMousePattern\fP (int numButtons)"
  46. .br
  47. .ti -1c
  48. .RI "void \fBinitKeyPattern\fP ()"
  49. .br
  50. .ti -1c
  51. .RI "void \fBsetMousePattern\fP (\fBMousePatternCode\fP, Qt::MouseButton button, Qt::KeyboardModifiers=Qt::NoModifier)"
  52. .br
  53. .ti -1c
  54. .RI "void \fBsetKeyPattern\fP (\fBKeyPatternCode\fP, int key, Qt::KeyboardModifiers modifiers=Qt::NoModifier)"
  55. .br
  56. .ti -1c
  57. .RI "void \fBsetMousePattern\fP (const QVector< \fBMousePattern\fP > &)"
  58. .br
  59. .RI "Change the mouse event patterns\&. "
  60. .ti -1c
  61. .RI "void \fBsetKeyPattern\fP (const QVector< \fBKeyPattern\fP > &)"
  62. .br
  63. .RI "Change the key event patterns\&. "
  64. .ti -1c
  65. .RI "const QVector< \fBMousePattern\fP > & \fBmousePattern\fP () const"
  66. .br
  67. .ti -1c
  68. .RI "const QVector< \fBKeyPattern\fP > & \fBkeyPattern\fP () const"
  69. .br
  70. .ti -1c
  71. .RI "QVector< \fBMousePattern\fP > & \fBmousePattern\fP ()"
  72. .br
  73. .ti -1c
  74. .RI "QVector< \fBKeyPattern\fP > & \fBkeyPattern\fP ()"
  75. .br
  76. .ti -1c
  77. .RI "bool \fBmouseMatch\fP (\fBMousePatternCode\fP, const QMouseEvent *) const"
  78. .br
  79. .RI "Compare a mouse event with an event pattern\&. "
  80. .ti -1c
  81. .RI "bool \fBkeyMatch\fP (\fBKeyPatternCode\fP, const QKeyEvent *) const"
  82. .br
  83. .RI "Compare a key event with an event pattern\&. "
  84. .in -1c
  85. .SS "Protected Member Functions"
  86. .in +1c
  87. .ti -1c
  88. .RI "virtual bool \fBmouseMatch\fP (const \fBMousePattern\fP &, const QMouseEvent *) const"
  89. .br
  90. .RI "Compare a mouse event with an event pattern\&. "
  91. .ti -1c
  92. .RI "virtual bool \fBkeyMatch\fP (const \fBKeyPattern\fP &, const QKeyEvent *) const"
  93. .br
  94. .RI "Compare a key event with an event pattern\&. "
  95. .in -1c
  96. .SH "Detailed Description"
  97. .PP
  98. A collection of event patterns\&.
  99. \fBQwtEventPattern\fP introduces an level of indirection for mouse and keyboard inputs\&. Those are represented by symbolic names, so the application code can be configured by individual mappings\&.
  100. .PP
  101. \fBSee also\fP
  102. .RS 4
  103. \fBQwtPicker\fP, \fBQwtPickerMachine\fP, \fBQwtPlotZoomer\fP
  104. .RE
  105. .PP
  106. .SH "Member Enumeration Documentation"
  107. .PP
  108. .SS "enum \fBQwtEventPattern::KeyPatternCode\fP"
  109. .PP
  110. Symbolic keyboard input codes\&. Individual settings can be configured using \fBsetKeyPattern()\fP
  111. .PP
  112. \fBSee also\fP
  113. .RS 4
  114. \fBsetKeyPattern()\fP, \fBsetMousePattern()\fP
  115. .RE
  116. .PP
  117. .PP
  118. \fBEnumerator\fP
  119. .in +1c
  120. .TP
  121. \fB\fIKeySelect1 \fP\fP
  122. Qt::Key_Return\&.
  123. .TP
  124. \fB\fIKeySelect2 \fP\fP
  125. Qt::Key_Space\&.
  126. .TP
  127. \fB\fIKeyAbort \fP\fP
  128. Qt::Key_Escape\&.
  129. .TP
  130. \fB\fIKeyLeft \fP\fP
  131. Qt::Key_Left\&.
  132. .TP
  133. \fB\fIKeyRight \fP\fP
  134. Qt::Key_Right\&.
  135. .TP
  136. \fB\fIKeyUp \fP\fP
  137. Qt::Key_Up\&.
  138. .TP
  139. \fB\fIKeyDown \fP\fP
  140. Qt::Key_Down\&.
  141. .TP
  142. \fB\fIKeyRedo \fP\fP
  143. Qt::Key_Plus\&.
  144. .TP
  145. \fB\fIKeyUndo \fP\fP
  146. Qt::Key_Minus\&.
  147. .TP
  148. \fB\fIKeyHome \fP\fP
  149. Qt::Key_Escape\&.
  150. .TP
  151. \fB\fIKeyPatternCount \fP\fP
  152. Number of key patterns\&.
  153. .SS "enum \fBQwtEventPattern::MousePatternCode\fP"
  154. .PP
  155. Symbolic mouse input codes\&. \fBQwtEventPattern\fP implements 3 different settings for mice with 1, 2, or 3 buttons that can be activated using \fBinitMousePattern()\fP\&. The default setting is for 3 button mice\&.
  156. .PP
  157. Individual settings can be configured using \fBsetMousePattern()\fP\&.
  158. .PP
  159. \fBSee also\fP
  160. .RS 4
  161. \fBinitMousePattern()\fP, \fBsetMousePattern()\fP, \fBsetKeyPattern()\fP
  162. .RE
  163. .PP
  164. .PP
  165. \fBEnumerator\fP
  166. .in +1c
  167. .TP
  168. \fB\fIMouseSelect1 \fP\fP
  169. The default setting for 1, 2 and 3 button mice is:
  170. .PP
  171. .IP "\(bu" 2
  172. Qt::LeftButton
  173. .IP "\(bu" 2
  174. Qt::LeftButton
  175. .IP "\(bu" 2
  176. Qt::LeftButton
  177. .PP
  178. .TP
  179. \fB\fIMouseSelect2 \fP\fP
  180. The default setting for 1, 2 and 3 button mice is:
  181. .PP
  182. .IP "\(bu" 2
  183. Qt::LeftButton + Qt::ControlModifier
  184. .IP "\(bu" 2
  185. Qt::RightButton
  186. .IP "\(bu" 2
  187. Qt::RightButton
  188. .PP
  189. .TP
  190. \fB\fIMouseSelect3 \fP\fP
  191. The default setting for 1, 2 and 3 button mice is:
  192. .PP
  193. .IP "\(bu" 2
  194. Qt::LeftButton + Qt::AltModifier
  195. .IP "\(bu" 2
  196. Qt::LeftButton + Qt::AltModifier
  197. .IP "\(bu" 2
  198. Qt::MidButton
  199. .PP
  200. .TP
  201. \fB\fIMouseSelect4 \fP\fP
  202. The default setting for 1, 2 and 3 button mice is:
  203. .PP
  204. .IP "\(bu" 2
  205. Qt::LeftButton + Qt::ShiftModifier
  206. .IP "\(bu" 2
  207. Qt::LeftButton + Qt::ShiftModifier
  208. .IP "\(bu" 2
  209. Qt::LeftButton + Qt::ShiftModifier
  210. .PP
  211. .TP
  212. \fB\fIMouseSelect5 \fP\fP
  213. The default setting for 1, 2 and 3 button mice is:
  214. .PP
  215. .IP "\(bu" 2
  216. Qt::LeftButton + Qt::ControlButton | Qt::ShiftModifier
  217. .IP "\(bu" 2
  218. Qt::RightButton + Qt::ShiftModifier
  219. .IP "\(bu" 2
  220. Qt::RightButton + Qt::ShiftModifier
  221. .PP
  222. .TP
  223. \fB\fIMouseSelect6 \fP\fP
  224. The default setting for 1, 2 and 3 button mice is:
  225. .PP
  226. .IP "\(bu" 2
  227. Qt::LeftButton + Qt::AltModifier + Qt::ShiftModifier
  228. .IP "\(bu" 2
  229. Qt::LeftButton + Qt::AltModifier | Qt::ShiftModifier
  230. .IP "\(bu" 2
  231. Qt::MidButton + Qt::ShiftModifier
  232. .PP
  233. .TP
  234. \fB\fIMousePatternCount \fP\fP
  235. Number of mouse patterns\&.
  236. .SH "Constructor & Destructor Documentation"
  237. .PP
  238. .SS "QwtEventPattern::QwtEventPattern ()"
  239. Constructor
  240. .PP
  241. \fBSee also\fP
  242. .RS 4
  243. \fBMousePatternCode\fP, \fBKeyPatternCode\fP
  244. .RE
  245. .PP
  246. .SH "Member Function Documentation"
  247. .PP
  248. .SS "void QwtEventPattern::initKeyPattern ()"
  249. Set default mouse patterns\&.
  250. .PP
  251. \fBSee also\fP
  252. .RS 4
  253. \fBKeyPatternCode\fP
  254. .RE
  255. .PP
  256. .SS "void QwtEventPattern::initMousePattern (int numButtons)"
  257. Set default mouse patterns, depending on the number of mouse buttons
  258. .PP
  259. \fBParameters\fP
  260. .RS 4
  261. \fInumButtons\fP Number of mouse buttons ( <= 3 )
  262. .RE
  263. .PP
  264. \fBSee also\fP
  265. .RS 4
  266. \fBMousePatternCode\fP
  267. .RE
  268. .PP
  269. .SS "bool QwtEventPattern::keyMatch (const \fBKeyPattern\fP & pattern, const QKeyEvent * event) const\fC [protected]\fP, \fC [virtual]\fP"
  270. .PP
  271. Compare a key event with an event pattern\&. A key event matches the pattern when both have the same key value and in the state value the same key flags (Qt::KeyButtonMask) are set\&.
  272. .PP
  273. \fBParameters\fP
  274. .RS 4
  275. \fIpattern\fP Key event pattern
  276. .br
  277. \fIevent\fP Key event
  278. .RE
  279. .PP
  280. \fBReturns\fP
  281. .RS 4
  282. true if matches
  283. .RE
  284. .PP
  285. \fBSee also\fP
  286. .RS 4
  287. \fBmouseMatch()\fP
  288. .RE
  289. .PP
  290. .SS "bool QwtEventPattern::keyMatch (\fBKeyPatternCode\fP code, const QKeyEvent * event) const"
  291. .PP
  292. Compare a key event with an event pattern\&. A key event matches the pattern when both have the same key value and in the state value the same key flags (Qt::KeyButtonMask) are set\&.
  293. .PP
  294. \fBParameters\fP
  295. .RS 4
  296. \fIcode\fP Index of the event pattern
  297. .br
  298. \fIevent\fP Key event
  299. .RE
  300. .PP
  301. \fBReturns\fP
  302. .RS 4
  303. true if matches
  304. .RE
  305. .PP
  306. \fBSee also\fP
  307. .RS 4
  308. \fBmouseMatch()\fP
  309. .RE
  310. .PP
  311. .SS "QVector< \fBQwtEventPattern::KeyPattern\fP > & QwtEventPattern::keyPattern ()"
  312. .PP
  313. \fBReturns\fP
  314. .RS 4
  315. Key pattern
  316. .RE
  317. .PP
  318. .SS "const QVector< \fBQwtEventPattern::KeyPattern\fP > & QwtEventPattern::keyPattern () const"
  319. .PP
  320. \fBReturns\fP
  321. .RS 4
  322. Key pattern
  323. .RE
  324. .PP
  325. .SS "bool QwtEventPattern::mouseMatch (const \fBMousePattern\fP & pattern, const QMouseEvent * event) const\fC [protected]\fP, \fC [virtual]\fP"
  326. .PP
  327. Compare a mouse event with an event pattern\&. A mouse event matches the pattern when both have the same button value and in the state value the same key flags(Qt::KeyButtonMask) are set\&.
  328. .PP
  329. \fBParameters\fP
  330. .RS 4
  331. \fIpattern\fP Mouse event pattern
  332. .br
  333. \fIevent\fP Mouse event
  334. .RE
  335. .PP
  336. \fBReturns\fP
  337. .RS 4
  338. true if matches
  339. .RE
  340. .PP
  341. \fBSee also\fP
  342. .RS 4
  343. \fBkeyMatch()\fP
  344. .RE
  345. .PP
  346. .SS "bool QwtEventPattern::mouseMatch (\fBMousePatternCode\fP code, const QMouseEvent * event) const"
  347. .PP
  348. Compare a mouse event with an event pattern\&. A mouse event matches the pattern when both have the same button value and in the state value the same key flags(Qt::KeyButtonMask) are set\&.
  349. .PP
  350. \fBParameters\fP
  351. .RS 4
  352. \fIcode\fP Index of the event pattern
  353. .br
  354. \fIevent\fP Mouse event
  355. .RE
  356. .PP
  357. \fBReturns\fP
  358. .RS 4
  359. true if matches
  360. .RE
  361. .PP
  362. \fBSee also\fP
  363. .RS 4
  364. \fBkeyMatch()\fP
  365. .RE
  366. .PP
  367. .SS "QVector< \fBQwtEventPattern::MousePattern\fP > & QwtEventPattern::mousePattern ()"
  368. .PP
  369. \fBReturns\fP
  370. .RS 4
  371. Mouse pattern
  372. .RE
  373. .PP
  374. .SS "const QVector< \fBQwtEventPattern::MousePattern\fP > & QwtEventPattern::mousePattern () const"
  375. .PP
  376. \fBReturns\fP
  377. .RS 4
  378. Mouse pattern
  379. .RE
  380. .PP
  381. .SS "void QwtEventPattern::setKeyPattern (\fBKeyPatternCode\fP pattern, int key, Qt::KeyboardModifiers modifiers = \fCQt::NoModifier\fP)"
  382. Change one key pattern
  383. .PP
  384. \fBParameters\fP
  385. .RS 4
  386. \fIpattern\fP Index of the pattern
  387. .br
  388. \fIkey\fP Key
  389. .br
  390. \fImodifiers\fP Keyboard modifiers
  391. .RE
  392. .PP
  393. \fBSee also\fP
  394. .RS 4
  395. QKeyEvent
  396. .RE
  397. .PP
  398. .SS "void QwtEventPattern::setMousePattern (\fBMousePatternCode\fP pattern, Qt::MouseButton button, Qt::KeyboardModifiers modifiers = \fCQt::NoModifier\fP)"
  399. Change one mouse pattern
  400. .PP
  401. \fBParameters\fP
  402. .RS 4
  403. \fIpattern\fP Index of the pattern
  404. .br
  405. \fIbutton\fP Button
  406. .br
  407. \fImodifiers\fP Keyboard modifiers
  408. .RE
  409. .PP
  410. \fBSee also\fP
  411. .RS 4
  412. QMouseEvent
  413. .RE
  414. .PP
  415. .SH "Author"
  416. .PP
  417. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.