qgraphicssceneevent.sip 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. // qgraphicssceneevent.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QGraphicsSceneEvent : public QEvent /NoDefaultCtors/
  22. {
  23. %TypeHeaderCode
  24. #include <qgraphicssceneevent.h>
  25. %End
  26. %ConvertToSubClassCode
  27. switch (sipCpp->type())
  28. {
  29. case QEvent::GraphicsSceneContextMenu:
  30. sipType = sipType_QGraphicsSceneContextMenuEvent;
  31. break;
  32. case QEvent::GraphicsSceneDragEnter:
  33. case QEvent::GraphicsSceneDragLeave:
  34. case QEvent::GraphicsSceneDragMove:
  35. case QEvent::GraphicsSceneDrop:
  36. sipType = sipType_QGraphicsSceneDragDropEvent;
  37. break;
  38. case QEvent::GraphicsSceneHelp:
  39. sipType = sipType_QGraphicsSceneHelpEvent;
  40. break;
  41. case QEvent::GraphicsSceneHoverEnter:
  42. case QEvent::GraphicsSceneHoverLeave:
  43. case QEvent::GraphicsSceneHoverMove:
  44. sipType = sipType_QGraphicsSceneHoverEvent;
  45. break;
  46. case QEvent::GraphicsSceneMouseDoubleClick:
  47. case QEvent::GraphicsSceneMouseMove:
  48. case QEvent::GraphicsSceneMousePress:
  49. case QEvent::GraphicsSceneMouseRelease:
  50. sipType = sipType_QGraphicsSceneMouseEvent;
  51. break;
  52. case QEvent::GraphicsSceneWheel:
  53. sipType = sipType_QGraphicsSceneWheelEvent;
  54. break;
  55. case QEvent::GraphicsSceneMove:
  56. sipType = sipType_QGraphicsSceneMoveEvent;
  57. break;
  58. case QEvent::GraphicsSceneResize:
  59. sipType = sipType_QGraphicsSceneResizeEvent;
  60. break;
  61. default:
  62. sipType = 0;
  63. }
  64. %End
  65. public:
  66. virtual ~QGraphicsSceneEvent();
  67. QWidget *widget() const;
  68. %If (Qt_6_2_0 -)
  69. quint64 timestamp() const;
  70. %End
  71. private:
  72. QGraphicsSceneEvent(const QGraphicsSceneEvent &);
  73. };
  74. class QGraphicsSceneMouseEvent : public QGraphicsSceneEvent /NoDefaultCtors/
  75. {
  76. %TypeHeaderCode
  77. #include <qgraphicssceneevent.h>
  78. %End
  79. public:
  80. virtual ~QGraphicsSceneMouseEvent();
  81. QPointF pos() const;
  82. QPointF scenePos() const;
  83. QPoint screenPos() const;
  84. QPointF buttonDownPos(Qt::MouseButton button) const;
  85. QPointF buttonDownScenePos(Qt::MouseButton button) const;
  86. QPoint buttonDownScreenPos(Qt::MouseButton button) const;
  87. QPointF lastPos() const;
  88. QPointF lastScenePos() const;
  89. QPoint lastScreenPos() const;
  90. Qt::MouseButtons buttons() const;
  91. Qt::MouseButton button() const;
  92. Qt::KeyboardModifiers modifiers() const;
  93. Qt::MouseEventSource source() const;
  94. Qt::MouseEventFlags flags() const;
  95. };
  96. class QGraphicsSceneWheelEvent : public QGraphicsSceneEvent /NoDefaultCtors/
  97. {
  98. %TypeHeaderCode
  99. #include <qgraphicssceneevent.h>
  100. %End
  101. public:
  102. virtual ~QGraphicsSceneWheelEvent();
  103. QPointF pos() const;
  104. QPointF scenePos() const;
  105. QPoint screenPos() const;
  106. Qt::MouseButtons buttons() const;
  107. Qt::KeyboardModifiers modifiers() const;
  108. int delta() const;
  109. Qt::Orientation orientation() const;
  110. %If (Qt_6_2_0 -)
  111. Qt::ScrollPhase phase() const;
  112. %End
  113. %If (Qt_6_2_0 -)
  114. QPoint pixelDelta() const;
  115. %End
  116. %If (Qt_6_2_0 -)
  117. bool isInverted() const;
  118. %End
  119. };
  120. class QGraphicsSceneContextMenuEvent : public QGraphicsSceneEvent /NoDefaultCtors/
  121. {
  122. %TypeHeaderCode
  123. #include <qgraphicssceneevent.h>
  124. %End
  125. public:
  126. enum Reason
  127. {
  128. Mouse,
  129. Keyboard,
  130. Other,
  131. };
  132. virtual ~QGraphicsSceneContextMenuEvent();
  133. QPointF pos() const;
  134. QPointF scenePos() const;
  135. QPoint screenPos() const;
  136. Qt::KeyboardModifiers modifiers() const;
  137. QGraphicsSceneContextMenuEvent::Reason reason() const;
  138. };
  139. class QGraphicsSceneHoverEvent : public QGraphicsSceneEvent /NoDefaultCtors/
  140. {
  141. %TypeHeaderCode
  142. #include <qgraphicssceneevent.h>
  143. %End
  144. public:
  145. virtual ~QGraphicsSceneHoverEvent();
  146. QPointF pos() const;
  147. QPointF scenePos() const;
  148. QPoint screenPos() const;
  149. QPointF lastPos() const;
  150. QPointF lastScenePos() const;
  151. QPoint lastScreenPos() const;
  152. Qt::KeyboardModifiers modifiers() const;
  153. };
  154. class QGraphicsSceneHelpEvent : public QGraphicsSceneEvent /NoDefaultCtors/
  155. {
  156. %TypeHeaderCode
  157. #include <qgraphicssceneevent.h>
  158. %End
  159. public:
  160. virtual ~QGraphicsSceneHelpEvent();
  161. QPointF scenePos() const;
  162. QPoint screenPos() const;
  163. };
  164. class QGraphicsSceneDragDropEvent : public QGraphicsSceneEvent /NoDefaultCtors/
  165. {
  166. %TypeHeaderCode
  167. #include <qgraphicssceneevent.h>
  168. %End
  169. public:
  170. virtual ~QGraphicsSceneDragDropEvent();
  171. QPointF pos() const;
  172. QPointF scenePos() const;
  173. QPoint screenPos() const;
  174. Qt::MouseButtons buttons() const;
  175. Qt::KeyboardModifiers modifiers() const;
  176. Qt::DropActions possibleActions() const;
  177. Qt::DropAction proposedAction() const;
  178. void acceptProposedAction();
  179. Qt::DropAction dropAction() const;
  180. void setDropAction(Qt::DropAction action);
  181. QWidget *source() const;
  182. const QMimeData *mimeData() const;
  183. };
  184. class QGraphicsSceneResizeEvent : public QGraphicsSceneEvent
  185. {
  186. %TypeHeaderCode
  187. #include <qgraphicssceneevent.h>
  188. %End
  189. public:
  190. QGraphicsSceneResizeEvent();
  191. virtual ~QGraphicsSceneResizeEvent();
  192. QSizeF oldSize() const;
  193. QSizeF newSize() const;
  194. };
  195. class QGraphicsSceneMoveEvent : public QGraphicsSceneEvent
  196. {
  197. %TypeHeaderCode
  198. #include <qgraphicssceneevent.h>
  199. %End
  200. public:
  201. QGraphicsSceneMoveEvent();
  202. virtual ~QGraphicsSceneMoveEvent();
  203. QPointF oldPos() const;
  204. QPointF newPos() const;
  205. };