Warning, file /include/QtWidgets/qgraphicssceneevent.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QGRAPHICSSCENEEVENT_H
0005 #define QGRAPHICSSCENEEVENT_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtCore/qcoreevent.h>
0009 #include <QtCore/qpoint.h>
0010 #include <QtCore/qscopedpointer.h>
0011 #include <QtCore/qrect.h>
0012 #include <QtGui/qpolygon.h>
0013 #include <QtCore/qset.h>
0014
0015 QT_REQUIRE_CONFIG(graphicsview);
0016
0017 QT_BEGIN_NAMESPACE
0018
0019 class QMimeData;
0020 class QPointF;
0021 class QSizeF;
0022 class QWidget;
0023
0024 class QGraphicsSceneEventPrivate;
0025 class Q_WIDGETS_EXPORT QGraphicsSceneEvent : public QEvent
0026 {
0027 public:
0028 explicit QGraphicsSceneEvent(Type type);
0029 ~QGraphicsSceneEvent();
0030
0031 QWidget *widget() const;
0032 void setWidget(QWidget *widget);
0033
0034 quint64 timestamp() const;
0035 void setTimestamp(quint64 ts);
0036
0037 protected:
0038 QGraphicsSceneEvent(QGraphicsSceneEventPrivate &dd, Type type = None);
0039 QScopedPointer<QGraphicsSceneEventPrivate> d_ptr;
0040 Q_DECLARE_PRIVATE(QGraphicsSceneEvent)
0041 private:
0042 Q_DISABLE_COPY(QGraphicsSceneEvent)
0043 };
0044
0045 class QGraphicsSceneMouseEventPrivate;
0046 class Q_WIDGETS_EXPORT QGraphicsSceneMouseEvent : public QGraphicsSceneEvent
0047 {
0048 public:
0049 explicit QGraphicsSceneMouseEvent(Type type = None);
0050 ~QGraphicsSceneMouseEvent();
0051
0052 QPointF pos() const;
0053 void setPos(const QPointF &pos);
0054
0055 QPointF scenePos() const;
0056 void setScenePos(const QPointF &pos);
0057
0058 QPoint screenPos() const;
0059 void setScreenPos(const QPoint &pos);
0060
0061 QPointF buttonDownPos(Qt::MouseButton button) const;
0062 void setButtonDownPos(Qt::MouseButton button, const QPointF &pos);
0063
0064 QPointF buttonDownScenePos(Qt::MouseButton button) const;
0065 void setButtonDownScenePos(Qt::MouseButton button, const QPointF &pos);
0066
0067 QPoint buttonDownScreenPos(Qt::MouseButton button) const;
0068 void setButtonDownScreenPos(Qt::MouseButton button, const QPoint &pos);
0069
0070 QPointF lastPos() const;
0071 void setLastPos(const QPointF &pos);
0072
0073 QPointF lastScenePos() const;
0074 void setLastScenePos(const QPointF &pos);
0075
0076 QPoint lastScreenPos() const;
0077 void setLastScreenPos(const QPoint &pos);
0078
0079 Qt::MouseButtons buttons() const;
0080 void setButtons(Qt::MouseButtons buttons);
0081
0082 Qt::MouseButton button() const;
0083 void setButton(Qt::MouseButton button);
0084
0085 Qt::KeyboardModifiers modifiers() const;
0086 void setModifiers(Qt::KeyboardModifiers modifiers);
0087
0088 Qt::MouseEventSource source() const;
0089 void setSource(Qt::MouseEventSource source);
0090
0091 Qt::MouseEventFlags flags() const;
0092 void setFlags(Qt::MouseEventFlags);
0093
0094 private:
0095 Q_DECLARE_PRIVATE(QGraphicsSceneMouseEvent)
0096 Q_DISABLE_COPY(QGraphicsSceneMouseEvent)
0097 };
0098
0099 class QGraphicsSceneWheelEventPrivate;
0100 class Q_WIDGETS_EXPORT QGraphicsSceneWheelEvent : public QGraphicsSceneEvent
0101 {
0102 public:
0103 explicit QGraphicsSceneWheelEvent(Type type = None);
0104 ~QGraphicsSceneWheelEvent();
0105
0106 QPointF pos() const;
0107 void setPos(const QPointF &pos);
0108
0109 QPointF scenePos() const;
0110 void setScenePos(const QPointF &pos);
0111
0112 QPoint screenPos() const;
0113 void setScreenPos(const QPoint &pos);
0114
0115 Qt::MouseButtons buttons() const;
0116 void setButtons(Qt::MouseButtons buttons);
0117
0118 Qt::KeyboardModifiers modifiers() const;
0119 void setModifiers(Qt::KeyboardModifiers modifiers);
0120
0121 int delta() const;
0122 void setDelta(int delta);
0123
0124 Qt::Orientation orientation() const;
0125 void setOrientation(Qt::Orientation orientation);
0126
0127 Qt::ScrollPhase phase() const;
0128 void setPhase(Qt::ScrollPhase scrollPhase);
0129
0130 QPoint pixelDelta() const;
0131 void setPixelDelta(QPoint delta);
0132
0133 bool isInverted() const;
0134 void setInverted(bool inverted);
0135
0136 private:
0137 Q_DECLARE_PRIVATE(QGraphicsSceneWheelEvent)
0138 Q_DISABLE_COPY(QGraphicsSceneWheelEvent)
0139 };
0140
0141 class QGraphicsSceneContextMenuEventPrivate;
0142 class Q_WIDGETS_EXPORT QGraphicsSceneContextMenuEvent : public QGraphicsSceneEvent
0143 {
0144 public:
0145 enum Reason { Mouse, Keyboard, Other };
0146
0147 explicit QGraphicsSceneContextMenuEvent(Type type = None);
0148 ~QGraphicsSceneContextMenuEvent();
0149
0150 QPointF pos() const;
0151 void setPos(const QPointF &pos);
0152
0153 QPointF scenePos() const;
0154 void setScenePos(const QPointF &pos);
0155
0156 QPoint screenPos() const;
0157 void setScreenPos(const QPoint &pos);
0158
0159 Qt::KeyboardModifiers modifiers() const;
0160 void setModifiers(Qt::KeyboardModifiers modifiers);
0161
0162 Reason reason() const;
0163 void setReason(Reason reason);
0164
0165 private:
0166 Q_DECLARE_PRIVATE(QGraphicsSceneContextMenuEvent)
0167 Q_DISABLE_COPY(QGraphicsSceneContextMenuEvent)
0168 };
0169
0170 class QGraphicsSceneHoverEventPrivate;
0171 class Q_WIDGETS_EXPORT QGraphicsSceneHoverEvent : public QGraphicsSceneEvent
0172 {
0173 public:
0174 explicit QGraphicsSceneHoverEvent(Type type = None);
0175 ~QGraphicsSceneHoverEvent();
0176
0177 QPointF pos() const;
0178 void setPos(const QPointF &pos);
0179
0180 QPointF scenePos() const;
0181 void setScenePos(const QPointF &pos);
0182
0183 QPoint screenPos() const;
0184 void setScreenPos(const QPoint &pos);
0185
0186 QPointF lastPos() const;
0187 void setLastPos(const QPointF &pos);
0188
0189 QPointF lastScenePos() const;
0190 void setLastScenePos(const QPointF &pos);
0191
0192 QPoint lastScreenPos() const;
0193 void setLastScreenPos(const QPoint &pos);
0194
0195 Qt::KeyboardModifiers modifiers() const;
0196 void setModifiers(Qt::KeyboardModifiers modifiers);
0197
0198 private:
0199 Q_DECLARE_PRIVATE(QGraphicsSceneHoverEvent)
0200 Q_DISABLE_COPY(QGraphicsSceneHoverEvent)
0201 };
0202
0203 class QGraphicsSceneHelpEventPrivate;
0204 class Q_WIDGETS_EXPORT QGraphicsSceneHelpEvent : public QGraphicsSceneEvent
0205 {
0206 public:
0207 explicit QGraphicsSceneHelpEvent(Type type = None);
0208 ~QGraphicsSceneHelpEvent();
0209
0210 QPointF scenePos() const;
0211 void setScenePos(const QPointF &pos);
0212
0213 QPoint screenPos() const;
0214 void setScreenPos(const QPoint &pos);
0215
0216 private:
0217 Q_DECLARE_PRIVATE(QGraphicsSceneHelpEvent)
0218 Q_DISABLE_COPY(QGraphicsSceneHelpEvent)
0219 };
0220
0221 class QGraphicsSceneDragDropEventPrivate;
0222 class Q_WIDGETS_EXPORT QGraphicsSceneDragDropEvent : public QGraphicsSceneEvent
0223 {
0224 public:
0225 explicit QGraphicsSceneDragDropEvent(Type type = None);
0226 ~QGraphicsSceneDragDropEvent();
0227
0228 QPointF pos() const;
0229 void setPos(const QPointF &pos);
0230
0231 QPointF scenePos() const;
0232 void setScenePos(const QPointF &pos);
0233
0234 QPoint screenPos() const;
0235 void setScreenPos(const QPoint &pos);
0236
0237 Qt::MouseButtons buttons() const;
0238 void setButtons(Qt::MouseButtons buttons);
0239
0240 Qt::KeyboardModifiers modifiers() const;
0241 void setModifiers(Qt::KeyboardModifiers modifiers);
0242
0243 Qt::DropActions possibleActions() const;
0244 void setPossibleActions(Qt::DropActions actions);
0245
0246 Qt::DropAction proposedAction() const;
0247 void setProposedAction(Qt::DropAction action);
0248 void acceptProposedAction();
0249
0250 Qt::DropAction dropAction() const;
0251 void setDropAction(Qt::DropAction action);
0252
0253 QWidget *source() const;
0254 void setSource(QWidget *source);
0255
0256 const QMimeData *mimeData() const;
0257 void setMimeData(const QMimeData *data);
0258
0259 private:
0260 Q_DECLARE_PRIVATE(QGraphicsSceneDragDropEvent)
0261 Q_DISABLE_COPY(QGraphicsSceneDragDropEvent)
0262 };
0263
0264 class QGraphicsSceneResizeEventPrivate;
0265 class Q_WIDGETS_EXPORT QGraphicsSceneResizeEvent : public QGraphicsSceneEvent
0266 {
0267 Q_DECLARE_PRIVATE(QGraphicsSceneResizeEvent)
0268 Q_DISABLE_COPY(QGraphicsSceneResizeEvent)
0269 public:
0270 QGraphicsSceneResizeEvent();
0271 ~QGraphicsSceneResizeEvent();
0272
0273 QSizeF oldSize() const;
0274 void setOldSize(const QSizeF &size);
0275
0276 QSizeF newSize() const;
0277 void setNewSize(const QSizeF &size);
0278 };
0279
0280 class QGraphicsSceneMoveEventPrivate;
0281 class Q_WIDGETS_EXPORT QGraphicsSceneMoveEvent : public QGraphicsSceneEvent
0282 {
0283 Q_DECLARE_PRIVATE(QGraphicsSceneMoveEvent)
0284 Q_DISABLE_COPY(QGraphicsSceneMoveEvent)
0285 public:
0286 QGraphicsSceneMoveEvent();
0287 ~QGraphicsSceneMoveEvent();
0288
0289 QPointF oldPos() const;
0290 void setOldPos(const QPointF &pos);
0291
0292 QPointF newPos() const;
0293 void setNewPos(const QPointF &pos);
0294 };
0295
0296 #ifndef QT_NO_DEBUG_STREAM
0297 Q_WIDGETS_EXPORT QDebug operator<<(QDebug, const QGraphicsSceneEvent *);
0298 #endif
0299
0300 QT_END_NAMESPACE
0301
0302 #endif