1// qgraphicssceneevent.sip generated by MetaSIP 2// 3// This file is part of the QtWidgets Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 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 22 23class QGraphicsSceneEvent : QEvent /NoDefaultCtors/ 24{ 25%TypeHeaderCode 26#include <qgraphicssceneevent.h> 27%End 28 29%ConvertToSubClassCode 30 switch (sipCpp->type()) 31 { 32 case QEvent::GraphicsSceneContextMenu: 33 sipType = sipType_QGraphicsSceneContextMenuEvent; 34 break; 35 36 case QEvent::GraphicsSceneDragEnter: 37 case QEvent::GraphicsSceneDragLeave: 38 case QEvent::GraphicsSceneDragMove: 39 case QEvent::GraphicsSceneDrop: 40 sipType = sipType_QGraphicsSceneDragDropEvent; 41 break; 42 43 case QEvent::GraphicsSceneHelp: 44 sipType = sipType_QGraphicsSceneHelpEvent; 45 break; 46 47 case QEvent::GraphicsSceneHoverEnter: 48 case QEvent::GraphicsSceneHoverLeave: 49 case QEvent::GraphicsSceneHoverMove: 50 sipType = sipType_QGraphicsSceneHoverEvent; 51 break; 52 53 case QEvent::GraphicsSceneMouseDoubleClick: 54 case QEvent::GraphicsSceneMouseMove: 55 case QEvent::GraphicsSceneMousePress: 56 case QEvent::GraphicsSceneMouseRelease: 57 sipType = sipType_QGraphicsSceneMouseEvent; 58 break; 59 60 case QEvent::GraphicsSceneWheel: 61 sipType = sipType_QGraphicsSceneWheelEvent; 62 break; 63 64 case QEvent::GraphicsSceneMove: 65 sipType = sipType_QGraphicsSceneMoveEvent; 66 break; 67 68 case QEvent::GraphicsSceneResize: 69 sipType = sipType_QGraphicsSceneResizeEvent; 70 break; 71 72 default: 73 sipType = 0; 74 } 75%End 76 77public: 78 virtual ~QGraphicsSceneEvent(); 79 QWidget *widget() const; 80 81private: 82 QGraphicsSceneEvent(const QGraphicsSceneEvent &); 83}; 84 85class QGraphicsSceneMouseEvent : QGraphicsSceneEvent /NoDefaultCtors/ 86{ 87%TypeHeaderCode 88#include <qgraphicssceneevent.h> 89%End 90 91public: 92 virtual ~QGraphicsSceneMouseEvent(); 93 QPointF pos() const; 94 QPointF scenePos() const; 95 QPoint screenPos() const; 96 QPointF buttonDownPos(Qt::MouseButton button) const; 97 QPointF buttonDownScenePos(Qt::MouseButton button) const; 98 QPoint buttonDownScreenPos(Qt::MouseButton button) const; 99 QPointF lastPos() const; 100 QPointF lastScenePos() const; 101 QPoint lastScreenPos() const; 102 Qt::MouseButtons buttons() const; 103 Qt::MouseButton button() const; 104 Qt::KeyboardModifiers modifiers() const; 105%If (Qt_5_4_0 -) 106 Qt::MouseEventSource source() const; 107%End 108%If (Qt_5_4_0 -) 109 Qt::MouseEventFlags flags() const; 110%End 111 112private: 113 QGraphicsSceneMouseEvent(const QGraphicsSceneMouseEvent &); 114}; 115 116class QGraphicsSceneWheelEvent : QGraphicsSceneEvent /NoDefaultCtors/ 117{ 118%TypeHeaderCode 119#include <qgraphicssceneevent.h> 120%End 121 122public: 123 virtual ~QGraphicsSceneWheelEvent(); 124 QPointF pos() const; 125 QPointF scenePos() const; 126 QPoint screenPos() const; 127 Qt::MouseButtons buttons() const; 128 Qt::KeyboardModifiers modifiers() const; 129 int delta() const; 130 Qt::Orientation orientation() const; 131 132private: 133 QGraphicsSceneWheelEvent(const QGraphicsSceneWheelEvent &); 134}; 135 136class QGraphicsSceneContextMenuEvent : QGraphicsSceneEvent /NoDefaultCtors/ 137{ 138%TypeHeaderCode 139#include <qgraphicssceneevent.h> 140%End 141 142public: 143 enum Reason 144 { 145 Mouse, 146 Keyboard, 147 Other, 148 }; 149 150 virtual ~QGraphicsSceneContextMenuEvent(); 151 QPointF pos() const; 152 QPointF scenePos() const; 153 QPoint screenPos() const; 154 Qt::KeyboardModifiers modifiers() const; 155 QGraphicsSceneContextMenuEvent::Reason reason() const; 156 157private: 158 QGraphicsSceneContextMenuEvent(const QGraphicsSceneContextMenuEvent &); 159}; 160 161class QGraphicsSceneHoverEvent : QGraphicsSceneEvent /NoDefaultCtors/ 162{ 163%TypeHeaderCode 164#include <qgraphicssceneevent.h> 165%End 166 167public: 168 virtual ~QGraphicsSceneHoverEvent(); 169 QPointF pos() const; 170 QPointF scenePos() const; 171 QPoint screenPos() const; 172 QPointF lastPos() const; 173 QPointF lastScenePos() const; 174 QPoint lastScreenPos() const; 175 Qt::KeyboardModifiers modifiers() const; 176 177private: 178 QGraphicsSceneHoverEvent(const QGraphicsSceneHoverEvent &); 179}; 180 181class QGraphicsSceneHelpEvent : QGraphicsSceneEvent /NoDefaultCtors/ 182{ 183%TypeHeaderCode 184#include <qgraphicssceneevent.h> 185%End 186 187public: 188 virtual ~QGraphicsSceneHelpEvent(); 189 QPointF scenePos() const; 190 QPoint screenPos() const; 191 192private: 193 QGraphicsSceneHelpEvent(const QGraphicsSceneHelpEvent &); 194}; 195 196class QGraphicsSceneDragDropEvent : QGraphicsSceneEvent /NoDefaultCtors/ 197{ 198%TypeHeaderCode 199#include <qgraphicssceneevent.h> 200%End 201 202public: 203 virtual ~QGraphicsSceneDragDropEvent(); 204 QPointF pos() const; 205 QPointF scenePos() const; 206 QPoint screenPos() const; 207 Qt::MouseButtons buttons() const; 208 Qt::KeyboardModifiers modifiers() const; 209 Qt::DropActions possibleActions() const; 210 Qt::DropAction proposedAction() const; 211 void acceptProposedAction(); 212 Qt::DropAction dropAction() const; 213 void setDropAction(Qt::DropAction action); 214 QWidget *source() const; 215 const QMimeData *mimeData() const; 216 217private: 218 QGraphicsSceneDragDropEvent(const QGraphicsSceneDragDropEvent &); 219}; 220 221class QGraphicsSceneResizeEvent : QGraphicsSceneEvent 222{ 223%TypeHeaderCode 224#include <qgraphicssceneevent.h> 225%End 226 227public: 228 QGraphicsSceneResizeEvent(); 229 virtual ~QGraphicsSceneResizeEvent(); 230 QSizeF oldSize() const; 231 QSizeF newSize() const; 232 233private: 234 QGraphicsSceneResizeEvent(const QGraphicsSceneResizeEvent &); 235}; 236 237class QGraphicsSceneMoveEvent : QGraphicsSceneEvent 238{ 239%TypeHeaderCode 240#include <qgraphicssceneevent.h> 241%End 242 243public: 244 QGraphicsSceneMoveEvent(); 245 virtual ~QGraphicsSceneMoveEvent(); 246 QPointF oldPos() const; 247 QPointF newPos() const; 248 249private: 250 QGraphicsSceneMoveEvent(const QGraphicsSceneMoveEvent &); 251}; 252