| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qevent.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | QEnterEvent::QEnterEvent(const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos) | - | ||||||||||||
| 5 | : QEvent(QEvent::Enter) | - | ||||||||||||
| 6 | , l(localPos) | - | ||||||||||||
| 7 | , w(windowPos) | - | ||||||||||||
| 8 | , s(screenPos) | - | ||||||||||||
| 9 | { | - | ||||||||||||
| 10 | } | - | ||||||||||||
| 11 | - | |||||||||||||
| 12 | - | |||||||||||||
| 13 | - | |||||||||||||
| 14 | - | |||||||||||||
| 15 | QEnterEvent::~QEnterEvent() | - | ||||||||||||
| 16 | { | - | ||||||||||||
| 17 | } | - | ||||||||||||
| 18 | QInputEvent::QInputEvent(Type type, Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 19 | : QEvent(type), modState(modifiers), ts(0) | - | ||||||||||||
| 20 | {} | - | ||||||||||||
| 21 | - | |||||||||||||
| 22 | - | |||||||||||||
| 23 | - | |||||||||||||
| 24 | - | |||||||||||||
| 25 | QInputEvent::~QInputEvent() | - | ||||||||||||
| 26 | { | - | ||||||||||||
| 27 | } | - | ||||||||||||
| 28 | QMouseEvent::QMouseEvent(Type type, const QPointF &localPos, Qt::MouseButton button, | - | ||||||||||||
| 29 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 30 | : QInputEvent(type, modifiers), l(localPos), w(localPos), b(button), mouseState(buttons), caps(0) | - | ||||||||||||
| 31 | { | - | ||||||||||||
| 32 | - | |||||||||||||
| 33 | s = QCursor::pos(); | - | ||||||||||||
| 34 | - | |||||||||||||
| 35 | } | - | ||||||||||||
| 36 | QMouseEvent::QMouseEvent(Type type, const QPointF &localPos, const QPointF &screenPos, | - | ||||||||||||
| 37 | Qt::MouseButton button, Qt::MouseButtons buttons, | - | ||||||||||||
| 38 | Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 39 | : QInputEvent(type, modifiers), l(localPos), w(localPos), s(screenPos), b(button), mouseState(buttons), caps(0) | - | ||||||||||||
| 40 | {} | - | ||||||||||||
| 41 | QMouseEvent::QMouseEvent(Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, | - | ||||||||||||
| 42 | Qt::MouseButton button, Qt::MouseButtons buttons, | - | ||||||||||||
| 43 | Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 44 | : QInputEvent(type, modifiers), l(localPos), w(windowPos), s(screenPos), b(button), mouseState(buttons), caps(0) | - | ||||||||||||
| 45 | {} | - | ||||||||||||
| 46 | QMouseEvent::QMouseEvent(QEvent::Type type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, | - | ||||||||||||
| 47 | Qt::MouseButton button, Qt::MouseButtons buttons, | - | ||||||||||||
| 48 | Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source) | - | ||||||||||||
| 49 | : QInputEvent(type, modifiers), l(localPos), w(windowPos), s(screenPos), b(button), mouseState(buttons), caps(0) | - | ||||||||||||
| 50 | { | - | ||||||||||||
| 51 | QGuiApplicationPrivate::setMouseEventSource(this, source); | - | ||||||||||||
| 52 | } | - | ||||||||||||
| 53 | - | |||||||||||||
| 54 | - | |||||||||||||
| 55 | - | |||||||||||||
| 56 | - | |||||||||||||
| 57 | QMouseEvent::~QMouseEvent() | - | ||||||||||||
| 58 | { | - | ||||||||||||
| 59 | } | - | ||||||||||||
| 60 | Qt::MouseEventSource QMouseEvent::source() const | - | ||||||||||||
| 61 | { | - | ||||||||||||
| 62 | return QGuiApplicationPrivate::mouseEventSource(this); | - | ||||||||||||
| 63 | } | - | ||||||||||||
| 64 | Qt::MouseEventFlags QMouseEvent::flags() const | - | ||||||||||||
| 65 | { | - | ||||||||||||
| 66 | return QGuiApplicationPrivate::mouseEventFlags(this); | - | ||||||||||||
| 67 | } | - | ||||||||||||
| 68 | QHoverEvent::QHoverEvent(Type type, const QPointF &pos, const QPointF &oldPos, Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 69 | : QInputEvent(type, modifiers), p(pos), op(oldPos) | - | ||||||||||||
| 70 | { | - | ||||||||||||
| 71 | } | - | ||||||||||||
| 72 | - | |||||||||||||
| 73 | - | |||||||||||||
| 74 | - | |||||||||||||
| 75 | - | |||||||||||||
| 76 | QHoverEvent::~QHoverEvent() | - | ||||||||||||
| 77 | { | - | ||||||||||||
| 78 | } | - | ||||||||||||
| 79 | QWheelEvent::QWheelEvent(const QPointF &pos, int delta, | - | ||||||||||||
| 80 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, | - | ||||||||||||
| 81 | Qt::Orientation orient) | - | ||||||||||||
| 82 | : QInputEvent(Wheel, modifiers), p(pos), qt4D(delta), qt4O(orient), mouseState(buttons), | - | ||||||||||||
| 83 | ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false) | - | ||||||||||||
| 84 | { | - | ||||||||||||
| 85 | if (!QGuiApplicationPrivate::scrollNoPhaseAllowed) | - | ||||||||||||
| ph = Qt::ScrollUpdate;g = QCursor::pos(); | ||||||||||||||
| 86 | if (orient == Qt::Vertical
| 0 | ||||||||||||
| 87 | angleD = QPoint(0, delta); never executed: angleD = QPoint(0, delta); | 0 | ||||||||||||
| 88 | else | - | ||||||||||||
| 89 | angleD = QPoint(delta, 0); never executed: angleD = QPoint(delta, 0); | 0 | ||||||||||||
| 90 | } | - | ||||||||||||
| 91 | - | |||||||||||||
| 92 | - | |||||||||||||
| 93 | - | |||||||||||||
| 94 | - | |||||||||||||
| 95 | QWheelEvent::~QWheelEvent() | - | ||||||||||||
| 96 | { | - | ||||||||||||
| 97 | } | - | ||||||||||||
| 98 | QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, int delta, | - | ||||||||||||
| 99 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, | - | ||||||||||||
| 100 | Qt::Orientation orient) | - | ||||||||||||
| 101 | : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), qt4D(delta), qt4O(orient), mouseState(buttons), | - | ||||||||||||
| 102 | ph(Qt::NoScrollPhase), src(Qt::MouseEventNotSynthesized), invertedScrolling(false) | - | ||||||||||||
| 103 | { | - | ||||||||||||
| 104 | if (!QGuiApplicationPrivate::scrollNoPhaseAllowed) | 0 | ||||||||||||
ph = Qt::ScrollUpdate;if (orient == Qt::Vertical
| ||||||||||||||
| 105 | angleD = QPoint(0, delta); never executed: angleD = QPoint(0, delta); | 0 | ||||||||||||
| 106 | else | - | ||||||||||||
| 107 | angleD = QPoint(delta, 0); never executed: angleD = QPoint(delta, 0); | 0 | ||||||||||||
| 108 | } | - | ||||||||||||
| 109 | QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, | - | ||||||||||||
| 110 | QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, | - | ||||||||||||
| 111 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 112 | : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta), | - | ||||||||||||
| 113 | angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(Qt::NoScrollPhase), | - | ||||||||||||
| 114 | src(Qt::MouseEventNotSynthesized), invertedScrolling(false) | - | ||||||||||||
| { | ||||||||||||||
| if (!QGuiApplicationPrivate{} never executed: end of block | ||||||||||||||
| 116 | QWheelEvent::scrollNoPhaseAllowedQWheelEvent(const QPointF &pos, const QPointF& globalPos, | - | ||||||||||||
| 117 | QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, | - | ||||||||||||
| 118 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase) | - | ||||||||||||
| 119 | : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta), | - | ||||||||||||
| 120 | angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph=(phase), | - | ||||||||||||
| 121 | src(Qt::ScrollUpdate; | - | ||||||||||||
| }MouseEventNotSynthesized), invertedScrolling(false) | ||||||||||||||
| 122 | {} never executed: end of block | 0 | ||||||||||||
| 123 | QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, | - | ||||||||||||
| 124 | QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, | - | ||||||||||||
| 125 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source) | - | ||||||||||||
| 126 | : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta), | - | ||||||||||||
| 127 | angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(phase), src(Qt::MouseEventNotSynthesizedsource), | - | ||||||||||||
| 128 | invertedScrolling(false) | - | ||||||||||||
| 129 | {} never executed: end of block | 0 | ||||||||||||
| 130 | QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, | - | ||||||||||||
| 131 | QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, | - | ||||||||||||
| 132 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source, bool inverted) | - | ||||||||||||
| 133 | : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta), | - | ||||||||||||
| 134 | angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(phase), src(source), | - | ||||||||||||
| 135 | invertedScrolling(inverted) | - | ||||||||||||
| 136 | {} never executed: end of block | 0 | ||||||||||||
| 137 | QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text, | - | ||||||||||||
| 138 | bool autorep, ushort count) | - | ||||||||||||
| 139 | : QInputEvent(type, modifiers), txt(text), k(key), | - | ||||||||||||
| 140 | nScanCode(0), nVirtualKey(0), nModifiers(0), | - | ||||||||||||
| 141 | c(count), autor(autorep) | - | ||||||||||||
| 142 | { | - | ||||||||||||
| 143 | if (type == QEvent::ShortcutOverride) | - | ||||||||||||
| 144 | ignore(); | - | ||||||||||||
| 145 | } | - | ||||||||||||
| 146 | QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, | - | ||||||||||||
| 147 | quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, | - | ||||||||||||
| 148 | const QString &text, bool autorep, ushort count) | - | ||||||||||||
| 149 | : QInputEvent(type, modifiers), txt(text), k(key), | - | ||||||||||||
| 150 | nScanCode(nativeScanCode), nVirtualKey(nativeVirtualKey), nModifiers(nativeModifiers), | - | ||||||||||||
| 151 | c(count), autor(autorep) | - | ||||||||||||
| 152 | { | - | ||||||||||||
| 153 | if (type == QEvent::ShortcutOverride) | - | ||||||||||||
| 154 | ignore(); | - | ||||||||||||
| 155 | } | - | ||||||||||||
| 156 | - | |||||||||||||
| 157 | - | |||||||||||||
| 158 | - | |||||||||||||
| 159 | - | |||||||||||||
| 160 | - | |||||||||||||
| 161 | QKeyEvent::~QKeyEvent() | - | ||||||||||||
| 162 | { | - | ||||||||||||
| 163 | } | - | ||||||||||||
| 164 | Qt::KeyboardModifiers QKeyEvent::modifiers() const | - | ||||||||||||
| 165 | { | - | ||||||||||||
| 166 | if (key() == Qt::Key_Shift) | - | ||||||||||||
| 167 | return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::ShiftModifier); | - | ||||||||||||
| 168 | if (key() == Qt::Key_Control) | - | ||||||||||||
| 169 | return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::ControlModifier); | - | ||||||||||||
| 170 | if (key() == Qt::Key_Alt) | - | ||||||||||||
| 171 | return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::AltModifier); | - | ||||||||||||
| 172 | if (key() == Qt::Key_Meta) | - | ||||||||||||
| 173 | return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::MetaModifier); | - | ||||||||||||
| 174 | if (key() == Qt::Key_AltGr) | - | ||||||||||||
| 175 | return Qt::KeyboardModifiers(QInputEvent::modifiers()^Qt::GroupSwitchModifier); | - | ||||||||||||
| 176 | return QInputEvent::modifiers(); | - | ||||||||||||
| 177 | } | - | ||||||||||||
| 178 | bool QKeyEvent::matches(QKeySequence::StandardKey matchKey) const | - | ||||||||||||
| 179 | { | - | ||||||||||||
| 180 | - | |||||||||||||
| 181 | uint searchkey = (modifiers() | key()) & ~(Qt::KeypadModifier | Qt::GroupSwitchModifier); | - | ||||||||||||
| 182 | - | |||||||||||||
| 183 | const QList<QKeySequence> bindings = QKeySequence::keyBindings(matchKey); | - | ||||||||||||
| 184 | return bindings.contains(QKeySequence(searchkey)); | - | ||||||||||||
| 185 | } | - | ||||||||||||
| 186 | QFocusEvent::QFocusEvent(Type type, Qt::FocusReason reason) | - | ||||||||||||
| 187 | : QEvent(type), m_reason(reason) | - | ||||||||||||
| 188 | {} | - | ||||||||||||
| 189 | - | |||||||||||||
| 190 | - | |||||||||||||
| 191 | - | |||||||||||||
| 192 | - | |||||||||||||
| 193 | QFocusEvent::~QFocusEvent() | - | ||||||||||||
| 194 | { | - | ||||||||||||
| 195 | } | - | ||||||||||||
| 196 | - | |||||||||||||
| 197 | - | |||||||||||||
| 198 | - | |||||||||||||
| 199 | - | |||||||||||||
| 200 | Qt::FocusReason QFocusEvent::reason() const | - | ||||||||||||
| 201 | { | - | ||||||||||||
| 202 | return m_reason; | - | ||||||||||||
| 203 | } | - | ||||||||||||
| 204 | QPaintEvent::QPaintEvent(const QRegion& paintRegion) | - | ||||||||||||
| 205 | : QEvent(Paint), m_rect(paintRegion.boundingRect()), m_region(paintRegion), m_erased(false) | - | ||||||||||||
| 206 | {} | - | ||||||||||||
| 207 | - | |||||||||||||
| 208 | - | |||||||||||||
| 209 | - | |||||||||||||
| 210 | - | |||||||||||||
| 211 | - | |||||||||||||
| 212 | QPaintEvent::QPaintEvent(const QRect &paintRect) | - | ||||||||||||
| 213 | : QEvent(Paint), m_rect(paintRect),m_region(paintRect), m_erased(false) | - | ||||||||||||
| 214 | {} | - | ||||||||||||
| 215 | - | |||||||||||||
| 216 | - | |||||||||||||
| 217 | - | |||||||||||||
| 218 | - | |||||||||||||
| 219 | - | |||||||||||||
| 220 | QPaintEvent::~QPaintEvent() | - | ||||||||||||
| 221 | { | - | ||||||||||||
| 222 | } | - | ||||||||||||
| 223 | QMoveEvent::QMoveEvent(const QPoint &pos, const QPoint &oldPos) | - | ||||||||||||
| 224 | : QEvent(Move), p(pos), oldp(oldPos) | - | ||||||||||||
| 225 | {} | - | ||||||||||||
| 226 | - | |||||||||||||
| 227 | - | |||||||||||||
| 228 | - | |||||||||||||
| 229 | - | |||||||||||||
| 230 | QMoveEvent::~QMoveEvent() | - | ||||||||||||
| 231 | { | - | ||||||||||||
| 232 | } | - | ||||||||||||
| 233 | QExposeEvent::QExposeEvent(const QRegion &exposeRegion) | - | ||||||||||||
| 234 | : QEvent(Expose) | - | ||||||||||||
| 235 | , rgn(exposeRegion) | - | ||||||||||||
| 236 | { | - | ||||||||||||
| 237 | } | - | ||||||||||||
| 238 | - | |||||||||||||
| 239 | - | |||||||||||||
| 240 | - | |||||||||||||
| 241 | - | |||||||||||||
| 242 | QExposeEvent::~QExposeEvent() | - | ||||||||||||
| 243 | { | - | ||||||||||||
| 244 | } | - | ||||||||||||
| 245 | QPlatformSurfaceEvent::QPlatformSurfaceEvent(SurfaceEventType surfaceEventType) | - | ||||||||||||
| 246 | : QEvent(PlatformSurface) | - | ||||||||||||
| 247 | , m_surfaceEventType(surfaceEventType) | - | ||||||||||||
| 248 | { | - | ||||||||||||
| 249 | } | - | ||||||||||||
| 250 | - | |||||||||||||
| 251 | - | |||||||||||||
| 252 | - | |||||||||||||
| 253 | - | |||||||||||||
| 254 | QPlatformSurfaceEvent::~QPlatformSurfaceEvent() | - | ||||||||||||
| 255 | { | - | ||||||||||||
| 256 | } | - | ||||||||||||
| 257 | QResizeEvent::QResizeEvent(const QSize &size, const QSize &oldSize) | - | ||||||||||||
| 258 | : QEvent(Resize), s(size), olds(oldSize) | - | ||||||||||||
| 259 | {} | - | ||||||||||||
| 260 | - | |||||||||||||
| 261 | - | |||||||||||||
| 262 | - | |||||||||||||
| 263 | - | |||||||||||||
| 264 | QResizeEvent::~QResizeEvent() | - | ||||||||||||
| 265 | { | - | ||||||||||||
| 266 | } | - | ||||||||||||
| 267 | QCloseEvent::QCloseEvent() | - | ||||||||||||
| 268 | : QEvent(Close) | - | ||||||||||||
| 269 | {} | - | ||||||||||||
| 270 | - | |||||||||||||
| 271 | - | |||||||||||||
| 272 | - | |||||||||||||
| 273 | QCloseEvent::~QCloseEvent() | - | ||||||||||||
| 274 | { | - | ||||||||||||
| 275 | } | - | ||||||||||||
| 276 | QIconDragEvent::QIconDragEvent() | - | ||||||||||||
| 277 | : QEvent(IconDrag) | - | ||||||||||||
| 278 | { ignore(); } | - | ||||||||||||
| 279 | - | |||||||||||||
| 280 | - | |||||||||||||
| 281 | QIconDragEvent::~QIconDragEvent() | - | ||||||||||||
| 282 | { | - | ||||||||||||
| 283 | } | - | ||||||||||||
| 284 | QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos, const QPoint &globalPos) | - | ||||||||||||
| 285 | : QInputEvent(ContextMenu), p(pos), gp(globalPos), reas(reason) | - | ||||||||||||
| 286 | {} | - | ||||||||||||
| 287 | QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos, const QPoint &globalPos, | - | ||||||||||||
| 288 | Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 289 | : QInputEvent(ContextMenu, modifiers), p(pos), gp(globalPos), reas(reason) | - | ||||||||||||
| 290 | {} | - | ||||||||||||
| 291 | - | |||||||||||||
| 292 | - | |||||||||||||
| 293 | - | |||||||||||||
| 294 | QContextMenuEvent::~QContextMenuEvent() | - | ||||||||||||
| 295 | { | - | ||||||||||||
| 296 | } | - | ||||||||||||
| 297 | QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos) | - | ||||||||||||
| 298 | : QInputEvent(ContextMenu), p(pos), reas(reason) | - | ||||||||||||
| 299 | { | - | ||||||||||||
| 300 | - | |||||||||||||
| 301 | gp = QCursor::pos(); | - | ||||||||||||
| 302 | - | |||||||||||||
| 303 | } | - | ||||||||||||
| 304 | QInputMethodEvent::QInputMethodEvent() | - | ||||||||||||
| 305 | : QEvent(QEvent::InputMethod), replace_from(0), replace_length(0) | - | ||||||||||||
| 306 | { | - | ||||||||||||
| 307 | } | - | ||||||||||||
| 308 | QInputMethodEvent::QInputMethodEvent(const QString &preeditText, const QList<Attribute> &attributes) | - | ||||||||||||
| 309 | : QEvent(QEvent::InputMethod), preedit(preeditText), attrs(attributes), | - | ||||||||||||
| 310 | replace_from(0), replace_length(0) | - | ||||||||||||
| 311 | { | - | ||||||||||||
| 312 | } | - | ||||||||||||
| 313 | - | |||||||||||||
| 314 | - | |||||||||||||
| 315 | - | |||||||||||||
| 316 | - | |||||||||||||
| 317 | QInputMethodEvent::QInputMethodEvent(const QInputMethodEvent &other) | - | ||||||||||||
| 318 | : QEvent(QEvent::InputMethod), preedit(other.preedit), attrs(other.attrs), | - | ||||||||||||
| 319 | commit(other.commit), replace_from(other.replace_from), replace_length(other.replace_length) | - | ||||||||||||
| 320 | { | - | ||||||||||||
| 321 | } | - | ||||||||||||
| 322 | - | |||||||||||||
| 323 | QInputMethodEvent::~QInputMethodEvent() | - | ||||||||||||
| 324 | { | - | ||||||||||||
| 325 | - | |||||||||||||
| 326 | } | - | ||||||||||||
| 327 | void QInputMethodEvent::setCommitString(const QString &commitString, int replaceFrom, int replaceLength) | - | ||||||||||||
| 328 | { | - | ||||||||||||
| 329 | commit = commitString; | - | ||||||||||||
| 330 | replace_from = replaceFrom; | - | ||||||||||||
| 331 | replace_length = replaceLength; | - | ||||||||||||
| 332 | } | - | ||||||||||||
| 333 | QInputMethodQueryEvent::QInputMethodQueryEvent(Qt::InputMethodQueries queries) | - | ||||||||||||
| 334 | : QEvent(InputMethodQuery), | - | ||||||||||||
| 335 | m_queries(queries) | - | ||||||||||||
| 336 | { | - | ||||||||||||
| 337 | } | - | ||||||||||||
| 338 | - | |||||||||||||
| 339 | - | |||||||||||||
| 340 | - | |||||||||||||
| 341 | - | |||||||||||||
| 342 | QInputMethodQueryEvent::~QInputMethodQueryEvent() | - | ||||||||||||
| 343 | { | - | ||||||||||||
| 344 | } | - | ||||||||||||
| 345 | - | |||||||||||||
| 346 | - | |||||||||||||
| 347 | - | |||||||||||||
| 348 | - | |||||||||||||
| 349 | void QInputMethodQueryEvent::setValue(Qt::InputMethodQuery query, const QVariant &value) | - | ||||||||||||
| 350 | { | - | ||||||||||||
| 351 | for (int i = 0; i < m_values.size(); ++i) { | - | ||||||||||||
| 352 | if (m_values.at(i).query == query) { | - | ||||||||||||
| 353 | m_values[i].value = value; | - | ||||||||||||
| 354 | return; | - | ||||||||||||
| 355 | } | - | ||||||||||||
| 356 | } | - | ||||||||||||
| 357 | QueryPair pair = { query, value }; | - | ||||||||||||
| 358 | m_values.append(pair); | - | ||||||||||||
| 359 | } | - | ||||||||||||
| 360 | - | |||||||||||||
| 361 | - | |||||||||||||
| 362 | - | |||||||||||||
| 363 | - | |||||||||||||
| 364 | QVariant QInputMethodQueryEvent::value(Qt::InputMethodQuery query) const | - | ||||||||||||
| 365 | { | - | ||||||||||||
| 366 | for (int i = 0; i < m_values.size(); ++i) | - | ||||||||||||
| 367 | if (m_values.at(i).query == query) | - | ||||||||||||
| 368 | return m_values.at(i).value; | - | ||||||||||||
| 369 | return QVariant(); | - | ||||||||||||
| 370 | } | - | ||||||||||||
| 371 | QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalPos, | - | ||||||||||||
| 372 | int device, int pointerType, | - | ||||||||||||
| 373 | qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, | - | ||||||||||||
| 374 | qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID, | - | ||||||||||||
| 375 | Qt::MouseButton button, Qt::MouseButtons buttons) | - | ||||||||||||
| 376 | : QInputEvent(type, keyState), | - | ||||||||||||
| 377 | mPos(pos), | - | ||||||||||||
| 378 | mGPos(globalPos), | - | ||||||||||||
| 379 | mDev(device), | - | ||||||||||||
| 380 | mPointerType(pointerType), | - | ||||||||||||
| 381 | mXT(xTilt), | - | ||||||||||||
| 382 | mYT(yTilt), | - | ||||||||||||
| 383 | mZ(z), | - | ||||||||||||
| 384 | mPress(pressure), | - | ||||||||||||
| 385 | mTangential(tangentialPressure), | - | ||||||||||||
| 386 | mRot(rotation), | - | ||||||||||||
| 387 | mUnique(uniqueID), | - | ||||||||||||
| 388 | mExtra(new QTabletEventPrivate(button, buttons)) | - | ||||||||||||
| 389 | { | - | ||||||||||||
| 390 | } | - | ||||||||||||
| 391 | QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalPos, | - | ||||||||||||
| 392 | int device, int pointerType, | - | ||||||||||||
| 393 | qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, | - | ||||||||||||
| 394 | qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID) | - | ||||||||||||
| 395 | : QInputEvent(type, keyState), | - | ||||||||||||
| 396 | mPos(pos), | - | ||||||||||||
| 397 | mGPos(globalPos), | - | ||||||||||||
| 398 | mDev(device), | - | ||||||||||||
| 399 | mPointerType(pointerType), | - | ||||||||||||
| 400 | mXT(xTilt), | - | ||||||||||||
| 401 | mYT(yTilt), | - | ||||||||||||
| 402 | mZ(z), | - | ||||||||||||
| 403 | mPress(pressure), | - | ||||||||||||
| 404 | mTangential(tangentialPressure), | - | ||||||||||||
| 405 | mRot(rotation), | - | ||||||||||||
| 406 | mUnique(uniqueID), | - | ||||||||||||
| 407 | mExtra(new QTabletEventPrivate(Qt::NoButton, Qt::NoButton)) | - | ||||||||||||
| 408 | { | - | ||||||||||||
| 409 | } | - | ||||||||||||
| 410 | - | |||||||||||||
| 411 | - | |||||||||||||
| 412 | - | |||||||||||||
| 413 | - | |||||||||||||
| 414 | QTabletEvent::~QTabletEvent() | - | ||||||||||||
| 415 | { | - | ||||||||||||
| 416 | } | - | ||||||||||||
| 417 | Qt::MouseButton QTabletEvent::button() const | - | ||||||||||||
| 418 | { | - | ||||||||||||
| 419 | return static_cast<QTabletEventPrivate *>(mExtra)->b; | - | ||||||||||||
| 420 | } | - | ||||||||||||
| 421 | Qt::MouseButtons QTabletEvent::buttons() const | - | ||||||||||||
| 422 | { | - | ||||||||||||
| 423 | return static_cast<QTabletEventPrivate *>(mExtra)->buttonState; | - | ||||||||||||
| 424 | } | - | ||||||||||||
| 425 | QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QPointF &localPos, const QPointF &windowPos, | - | ||||||||||||
| 426 | const QPointF &screenPos, qreal realValue, ulong sequenceId, quint64 intValue) | - | ||||||||||||
| 427 | : QInputEvent(QEvent::NativeGesture), mGestureType(type), | - | ||||||||||||
| 428 | mLocalPos(localPos), mWindowPos(windowPos), mScreenPos(screenPos), mRealValue(realValue), | - | ||||||||||||
| 429 | mSequenceId(sequenceId), mIntValue(intValue) | - | ||||||||||||
| 430 | { } | - | ||||||||||||
| 431 | QDragMoveEvent::QDragMoveEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData *data, | - | ||||||||||||
| 432 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type) | - | ||||||||||||
| 433 | : QDropEvent(pos, actions, data, buttons, modifiers, type) | - | ||||||||||||
| 434 | , rect(pos, QSize(1, 1)) | - | ||||||||||||
| 435 | {} | - | ||||||||||||
| 436 | - | |||||||||||||
| 437 | - | |||||||||||||
| 438 | - | |||||||||||||
| 439 | - | |||||||||||||
| 440 | QDragMoveEvent::~QDragMoveEvent() | - | ||||||||||||
| 441 | { | - | ||||||||||||
| 442 | } | - | ||||||||||||
| 443 | QDropEvent::QDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeData *data, | - | ||||||||||||
| 444 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Type type) | - | ||||||||||||
| 445 | : QEvent(type), p(pos), mouseState(buttons), | - | ||||||||||||
| 446 | modState(modifiers), act(actions), | - | ||||||||||||
| 447 | mdata(data) | - | ||||||||||||
| 448 | { | - | ||||||||||||
| 449 | default_action = QGuiApplicationPrivate::platformIntegration()->drag()->defaultAction(act, modifiers); | - | ||||||||||||
| 450 | drop_action = default_action; | - | ||||||||||||
| 451 | ignore(); | - | ||||||||||||
| 452 | } | - | ||||||||||||
| 453 | - | |||||||||||||
| 454 | - | |||||||||||||
| 455 | QDropEvent::~QDropEvent() | - | ||||||||||||
| 456 | { | - | ||||||||||||
| 457 | } | - | ||||||||||||
| 458 | QObject* QDropEvent::source() const | - | ||||||||||||
| 459 | { | - | ||||||||||||
| 460 | if (const QDragManager *manager = QDragManager::self()) | - | ||||||||||||
| 461 | return manager->source(); | - | ||||||||||||
| 462 | return 0; | - | ||||||||||||
| 463 | } | - | ||||||||||||
| 464 | - | |||||||||||||
| 465 | - | |||||||||||||
| 466 | void QDropEvent::setDropAction(Qt::DropAction action) | - | ||||||||||||
| 467 | { | - | ||||||||||||
| 468 | if (!(action & act) && action != Qt::IgnoreAction) | - | ||||||||||||
| 469 | action = default_action; | - | ||||||||||||
| 470 | drop_action = action; | - | ||||||||||||
| 471 | } | - | ||||||||||||
| 472 | QDragEnterEvent::QDragEnterEvent(const QPoint& point, Qt::DropActions actions, const QMimeData *data, | - | ||||||||||||
| 473 | Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) | - | ||||||||||||
| 474 | : QDragMoveEvent(point, actions, data, buttons, modifiers, DragEnter) | - | ||||||||||||
| 475 | {} | - | ||||||||||||
| 476 | - | |||||||||||||
| 477 | - | |||||||||||||
| 478 | - | |||||||||||||
| 479 | QDragEnterEvent::~QDragEnterEvent() | - | ||||||||||||
| 480 | { | - | ||||||||||||
| 481 | } | - | ||||||||||||
| 482 | QDragLeaveEvent::QDragLeaveEvent() | - | ||||||||||||
| 483 | : QEvent(DragLeave) | - | ||||||||||||
| 484 | {} | - | ||||||||||||
| 485 | - | |||||||||||||
| 486 | - | |||||||||||||
| 487 | - | |||||||||||||
| 488 | QDragLeaveEvent::~QDragLeaveEvent() | - | ||||||||||||
| 489 | { | - | ||||||||||||
| 490 | } | - | ||||||||||||
| 491 | QHelpEvent::QHelpEvent(Type type, const QPoint &pos, const QPoint &globalPos) | - | ||||||||||||
| 492 | : QEvent(type), p(pos), gp(globalPos) | - | ||||||||||||
| 493 | {} | - | ||||||||||||
| 494 | QHelpEvent::~QHelpEvent() | - | ||||||||||||
| 495 | { | - | ||||||||||||
| 496 | } | - | ||||||||||||
| 497 | QStatusTipEvent::QStatusTipEvent(const QString &tip) | - | ||||||||||||
| 498 | : QEvent(StatusTip), s(tip) | - | ||||||||||||
| 499 | {} | - | ||||||||||||
| 500 | - | |||||||||||||
| 501 | - | |||||||||||||
| 502 | - | |||||||||||||
| 503 | QStatusTipEvent::~QStatusTipEvent() | - | ||||||||||||
| 504 | { | - | ||||||||||||
| 505 | } | - | ||||||||||||
| 506 | QWhatsThisClickedEvent::QWhatsThisClickedEvent(const QString &href) | - | ||||||||||||
| 507 | : QEvent(WhatsThisClicked), s(href) | - | ||||||||||||
| 508 | {} | - | ||||||||||||
| 509 | - | |||||||||||||
| 510 | - | |||||||||||||
| 511 | - | |||||||||||||
| 512 | QWhatsThisClickedEvent::~QWhatsThisClickedEvent() | - | ||||||||||||
| 513 | { | - | ||||||||||||
| 514 | } | - | ||||||||||||
| 515 | QActionEvent::QActionEvent(int type, QAction *action, QAction *before) | - | ||||||||||||
| 516 | : QEvent(static_cast<QEvent::Type>(type)), act(action), bef(before) | - | ||||||||||||
| 517 | {} | - | ||||||||||||
| 518 | - | |||||||||||||
| 519 | - | |||||||||||||
| 520 | - | |||||||||||||
| 521 | QActionEvent::~QActionEvent() | - | ||||||||||||
| 522 | { | - | ||||||||||||
| 523 | } | - | ||||||||||||
| 524 | QHideEvent::QHideEvent() | - | ||||||||||||
| 525 | : QEvent(Hide) | - | ||||||||||||
| 526 | {} | - | ||||||||||||
| 527 | - | |||||||||||||
| 528 | - | |||||||||||||
| 529 | - | |||||||||||||
| 530 | QHideEvent::~QHideEvent() | - | ||||||||||||
| 531 | { | - | ||||||||||||
| 532 | } | - | ||||||||||||
| 533 | QShowEvent::QShowEvent() | - | ||||||||||||
| 534 | : QEvent(Show) | - | ||||||||||||
| 535 | {} | - | ||||||||||||
| 536 | - | |||||||||||||
| 537 | - | |||||||||||||
| 538 | - | |||||||||||||
| 539 | QShowEvent::~QShowEvent() | - | ||||||||||||
| 540 | { | - | ||||||||||||
| 541 | } | - | ||||||||||||
| 542 | QFileOpenEvent::QFileOpenEvent(const QString &file) | - | ||||||||||||
| 543 | : QEvent(FileOpen), f(file), m_url(QUrl::fromLocalFile(file)) | - | ||||||||||||
| 544 | { | - | ||||||||||||
| 545 | } | - | ||||||||||||
| 546 | - | |||||||||||||
| 547 | - | |||||||||||||
| 548 | - | |||||||||||||
| 549 | - | |||||||||||||
| 550 | - | |||||||||||||
| 551 | - | |||||||||||||
| 552 | QFileOpenEvent::QFileOpenEvent(const QUrl &url) | - | ||||||||||||
| 553 | : QEvent(FileOpen), f(url.toLocalFile()), m_url(url) | - | ||||||||||||
| 554 | { | - | ||||||||||||
| 555 | } | - | ||||||||||||
| 556 | - | |||||||||||||
| 557 | - | |||||||||||||
| 558 | - | |||||||||||||
| 559 | - | |||||||||||||
| 560 | QFileOpenEvent::~QFileOpenEvent() | - | ||||||||||||
| 561 | { | - | ||||||||||||
| 562 | } | - | ||||||||||||
| 563 | bool QFileOpenEvent::openFile(QFile &file, QIODevice::OpenMode flags) const | - | ||||||||||||
| 564 | { | - | ||||||||||||
| 565 | file.setFileName(f); | - | ||||||||||||
| 566 | return file.open(flags); | - | ||||||||||||
| 567 | } | - | ||||||||||||
| 568 | QToolBarChangeEvent::QToolBarChangeEvent(bool t) | - | ||||||||||||
| 569 | : QEvent(ToolBarChange), tog(t) | - | ||||||||||||
| 570 | {} | - | ||||||||||||
| 571 | - | |||||||||||||
| 572 | - | |||||||||||||
| 573 | - | |||||||||||||
| 574 | QToolBarChangeEvent::~QToolBarChangeEvent() | - | ||||||||||||
| 575 | { | - | ||||||||||||
| 576 | } | - | ||||||||||||
| 577 | QShortcutEvent::QShortcutEvent(const QKeySequence &key, int id, bool ambiguous) | - | ||||||||||||
| 578 | : QEvent(Shortcut), sequence(key), ambig(ambiguous), sid(id) | - | ||||||||||||
| 579 | { | - | ||||||||||||
| 580 | } | - | ||||||||||||
| 581 | - | |||||||||||||
| 582 | - | |||||||||||||
| 583 | - | |||||||||||||
| 584 | - | |||||||||||||
| 585 | QShortcutEvent::~QShortcutEvent() | - | ||||||||||||
| 586 | { | - | ||||||||||||
| 587 | } | - | ||||||||||||
| 588 | - | |||||||||||||
| 589 | - | |||||||||||||
| 590 | - | |||||||||||||
| 591 | - | |||||||||||||
| 592 | - | |||||||||||||
| 593 | static inline void formatTouchEvent(QDebug d, const QTouchEvent &t) | - | ||||||||||||
| 594 | { | - | ||||||||||||
| 595 | d << "QTouchEvent("; | - | ||||||||||||
| 596 | QtDebugUtils::formatQEnum(d, t.type()); | - | ||||||||||||
| 597 | d << " device: " << t.device()->name(); | - | ||||||||||||
| 598 | d << " states: "; | - | ||||||||||||
| 599 | QtDebugUtils::formatQFlags(d, t.touchPointStates()); | - | ||||||||||||
| 600 | d << ", " << t.touchPoints().size() << " points: " << t.touchPoints() << ')'; | - | ||||||||||||
| 601 | } | - | ||||||||||||
| 602 | - | |||||||||||||
| 603 | static void formatUnicodeString(QDebug d, const QString &s) | - | ||||||||||||
| 604 | { | - | ||||||||||||
| 605 | d << '"' << hex; | - | ||||||||||||
| 606 | for (int i = 0; i < s.size(); ++i) { | - | ||||||||||||
| 607 | if (i) | - | ||||||||||||
| 608 | d << ','; | - | ||||||||||||
| 609 | d << "U+" << s.at(i).unicode(); | - | ||||||||||||
| 610 | } | - | ||||||||||||
| 611 | d << dec << '"'; | - | ||||||||||||
| 612 | } | - | ||||||||||||
| 613 | - | |||||||||||||
| 614 | static inline void formatInputMethodEvent(QDebug d, const QInputMethodEvent *e) | - | ||||||||||||
| 615 | { | - | ||||||||||||
| 616 | d << "QInputMethodEvent("; | - | ||||||||||||
| 617 | if (!e->preeditString().isEmpty()) { | - | ||||||||||||
| 618 | d << "preedit="; | - | ||||||||||||
| 619 | formatUnicodeString(d, e->preeditString()); | - | ||||||||||||
| 620 | } | - | ||||||||||||
| 621 | if (!e->commitString().isEmpty()) { | - | ||||||||||||
| 622 | d << ", commit="; | - | ||||||||||||
| 623 | formatUnicodeString(d, e->commitString()); | - | ||||||||||||
| 624 | } | - | ||||||||||||
| 625 | if (e->replacementLength()) { | - | ||||||||||||
| 626 | d << ", replacementStart=" << e->replacementStart() << ", replacementLength=" | - | ||||||||||||
| 627 | << e->replacementLength(); | - | ||||||||||||
| 628 | } | - | ||||||||||||
| 629 | if (const int attributeCount = e->attributes().size()) { | - | ||||||||||||
| 630 | d << ", attributes= {"; | - | ||||||||||||
| 631 | for (int a = 0; a < attributeCount; ++a) { | - | ||||||||||||
| 632 | const QInputMethodEvent::Attribute &at = e->attributes().at(a); | - | ||||||||||||
| 633 | if (a) | - | ||||||||||||
| 634 | d << ','; | - | ||||||||||||
| 635 | d << "[type= " << at.type << ", start=" << at.start << ", length=" << at.length | - | ||||||||||||
| 636 | << ", value=" << at.value << ']'; | - | ||||||||||||
| 637 | } | - | ||||||||||||
| 638 | d << '}'; | - | ||||||||||||
| 639 | } | - | ||||||||||||
| 640 | d << ')'; | - | ||||||||||||
| 641 | } | - | ||||||||||||
| 642 | - | |||||||||||||
| 643 | static inline void formatInputMethodQueryEvent(QDebug d, const QInputMethodQueryEvent *e) | - | ||||||||||||
| 644 | { | - | ||||||||||||
| 645 | const Qt::InputMethodQueries queries = e->queries(); | - | ||||||||||||
| 646 | d << "QInputMethodQueryEvent(queries=" << showbase << hex << int(queries) | - | ||||||||||||
| 647 | << noshowbase << dec << ", {"; | - | ||||||||||||
| 648 | for (unsigned mask = 1; mask <= Qt::ImTextAfterCursor; mask<<=1) { | - | ||||||||||||
| 649 | if (queries & mask) { | - | ||||||||||||
| 650 | const QVariant value = e->value(static_cast<Qt::InputMethodQuery>(mask)); | - | ||||||||||||
| 651 | if (value.isValid()) | - | ||||||||||||
| 652 | d << '[' << showbase << hex << mask << noshowbase << dec << '=' << value << "],"; | - | ||||||||||||
| 653 | } | - | ||||||||||||
| 654 | } | - | ||||||||||||
| 655 | d << "})"; | - | ||||||||||||
| 656 | } | - | ||||||||||||
| 657 | - | |||||||||||||
| 658 | static const char *eventClassName(QEvent::Type t) | - | ||||||||||||
| 659 | { | - | ||||||||||||
| 660 | switch (t) { | - | ||||||||||||
| 661 | case QEvent::ActionAdded: | - | ||||||||||||
| 662 | case QEvent::ActionRemoved: | - | ||||||||||||
| 663 | case QEvent::ActionChanged: | - | ||||||||||||
| 664 | return "QActionEvent"; | - | ||||||||||||
| 665 | case QEvent::MouseButtonPress: | - | ||||||||||||
| 666 | case QEvent::MouseButtonRelease: | - | ||||||||||||
| 667 | case QEvent::MouseButtonDblClick: | - | ||||||||||||
| 668 | case QEvent::MouseMove: | - | ||||||||||||
| 669 | case QEvent::NonClientAreaMouseMove: | - | ||||||||||||
| 670 | case QEvent::NonClientAreaMouseButtonPress: | - | ||||||||||||
| 671 | case QEvent::NonClientAreaMouseButtonRelease: | - | ||||||||||||
| 672 | case QEvent::NonClientAreaMouseButtonDblClick: | - | ||||||||||||
| 673 | return "QMouseEvent"; | - | ||||||||||||
| 674 | case QEvent::DragEnter: | - | ||||||||||||
| 675 | return "QDragEnterEvent"; | - | ||||||||||||
| 676 | case QEvent::DragMove: | - | ||||||||||||
| 677 | return "QDragMoveEvent"; | - | ||||||||||||
| 678 | case QEvent::Drop: | - | ||||||||||||
| 679 | return "QDropEvent"; | - | ||||||||||||
| 680 | case QEvent::KeyPress: | - | ||||||||||||
| 681 | case QEvent::KeyRelease: | - | ||||||||||||
| 682 | case QEvent::ShortcutOverride: | - | ||||||||||||
| 683 | return "QKeyEvent"; | - | ||||||||||||
| 684 | case QEvent::FocusIn: | - | ||||||||||||
| 685 | case QEvent::FocusOut: | - | ||||||||||||
| 686 | case QEvent::FocusAboutToChange: | - | ||||||||||||
| 687 | return "QFocusEvent"; | - | ||||||||||||
| 688 | case QEvent::ChildAdded: | - | ||||||||||||
| 689 | case QEvent::ChildPolished: | - | ||||||||||||
| 690 | case QEvent::ChildRemoved: | - | ||||||||||||
| 691 | return "QChildEvent"; | - | ||||||||||||
| 692 | case QEvent::Paint: | - | ||||||||||||
| 693 | return "QPaintEvent"; | - | ||||||||||||
| 694 | case QEvent::Move: | - | ||||||||||||
| 695 | return "QMoveEvent"; | - | ||||||||||||
| 696 | case QEvent::Resize: | - | ||||||||||||
| 697 | return "QResizeEvent"; | - | ||||||||||||
| 698 | case QEvent::Show: | - | ||||||||||||
| 699 | return "QShowEvent"; | - | ||||||||||||
| 700 | case QEvent::Hide: | - | ||||||||||||
| 701 | return "QHideEvent"; | - | ||||||||||||
| 702 | case QEvent::Enter: | - | ||||||||||||
| 703 | return "QEnterEvent"; | - | ||||||||||||
| 704 | case QEvent::Close: | - | ||||||||||||
| 705 | return "QCloseEvent"; | - | ||||||||||||
| 706 | case QEvent::FileOpen: | - | ||||||||||||
| 707 | return "QFileOpenEvent"; | - | ||||||||||||
| 708 | - | |||||||||||||
| 709 | case QEvent::NativeGesture: | - | ||||||||||||
| 710 | return "QNativeGestureEvent"; | - | ||||||||||||
| 711 | case QEvent::Gesture: | - | ||||||||||||
| 712 | case QEvent::GestureOverride: | - | ||||||||||||
| 713 | return "QGestureEvent"; | - | ||||||||||||
| 714 | - | |||||||||||||
| 715 | case QEvent::HoverEnter: | - | ||||||||||||
| 716 | case QEvent::HoverLeave: | - | ||||||||||||
| 717 | case QEvent::HoverMove: | - | ||||||||||||
| 718 | return "QHoverEvent"; | - | ||||||||||||
| 719 | case QEvent::TabletEnterProximity: | - | ||||||||||||
| 720 | case QEvent::TabletLeaveProximity: | - | ||||||||||||
| 721 | case QEvent::TabletPress: | - | ||||||||||||
| 722 | case QEvent::TabletMove: | - | ||||||||||||
| 723 | case QEvent::TabletRelease: | - | ||||||||||||
| 724 | return "QTabletEvent"; | - | ||||||||||||
| 725 | case QEvent::StatusTip: | - | ||||||||||||
| 726 | return "QStatusTipEvent"; | - | ||||||||||||
| 727 | case QEvent::ToolTip: | - | ||||||||||||
| 728 | return "QHelpEvent"; | - | ||||||||||||
| 729 | case QEvent::WindowStateChange: | - | ||||||||||||
| 730 | return "QWindowStateChangeEvent"; | - | ||||||||||||
| 731 | case QEvent::Wheel: | - | ||||||||||||
| 732 | return "QWheelEvent"; | - | ||||||||||||
| 733 | case QEvent::TouchBegin: | - | ||||||||||||
| 734 | case QEvent::TouchUpdate: | - | ||||||||||||
| 735 | case QEvent::TouchEnd: | - | ||||||||||||
| 736 | return "QTouchEvent"; | - | ||||||||||||
| 737 | case QEvent::Shortcut: | - | ||||||||||||
| 738 | return "QShortcutEvent"; | - | ||||||||||||
| 739 | case QEvent::InputMethod: | - | ||||||||||||
| 740 | return "QInputMethodEvent"; | - | ||||||||||||
| 741 | case QEvent::InputMethodQuery: | - | ||||||||||||
| 742 | return "QInputMethodQueryEvent"; | - | ||||||||||||
| 743 | case QEvent::OrientationChange: | - | ||||||||||||
| 744 | return "QScreenOrientationChangeEvent"; | - | ||||||||||||
| 745 | case QEvent::ScrollPrepare: | - | ||||||||||||
| 746 | return "QScrollPrepareEvent"; | - | ||||||||||||
| 747 | case QEvent::Scroll: | - | ||||||||||||
| 748 | return "QScrollEvent"; | - | ||||||||||||
| 749 | case QEvent::GraphicsSceneMouseMove: | - | ||||||||||||
| 750 | case QEvent::GraphicsSceneMousePress: | - | ||||||||||||
| 751 | case QEvent::GraphicsSceneMouseRelease: | - | ||||||||||||
| 752 | case QEvent::GraphicsSceneMouseDoubleClick: | - | ||||||||||||
| 753 | return "QGraphicsSceneMouseEvent"; | - | ||||||||||||
| 754 | case QEvent::GraphicsSceneContextMenu: | - | ||||||||||||
| 755 | case QEvent::GraphicsSceneHoverEnter: | - | ||||||||||||
| 756 | case QEvent::GraphicsSceneHoverMove: | - | ||||||||||||
| 757 | case QEvent::GraphicsSceneHoverLeave: | - | ||||||||||||
| 758 | case QEvent::GraphicsSceneHelp: | - | ||||||||||||
| 759 | case QEvent::GraphicsSceneDragEnter: | - | ||||||||||||
| 760 | case QEvent::GraphicsSceneDragMove: | - | ||||||||||||
| 761 | case QEvent::GraphicsSceneDragLeave: | - | ||||||||||||
| 762 | case QEvent::GraphicsSceneDrop: | - | ||||||||||||
| 763 | case QEvent::GraphicsSceneWheel: | - | ||||||||||||
| 764 | return "QGraphicsSceneEvent"; | - | ||||||||||||
| 765 | case QEvent::Timer: | - | ||||||||||||
| 766 | return "QTimerEvent"; | - | ||||||||||||
| 767 | case QEvent::PlatformSurface: | - | ||||||||||||
| 768 | return "QPlatformSurfaceEvent"; | - | ||||||||||||
| 769 | default: | - | ||||||||||||
| 770 | break; | - | ||||||||||||
| 771 | } | - | ||||||||||||
| 772 | return "QEvent"; | - | ||||||||||||
| 773 | } | - | ||||||||||||
| 774 | - | |||||||||||||
| 775 | - | |||||||||||||
| 776 | - | |||||||||||||
| 777 | static void formatDropEvent(QDebug d, const QDropEvent *e) | - | ||||||||||||
| 778 | { | - | ||||||||||||
| 779 | const QEvent::Type type = e->type(); | - | ||||||||||||
| 780 | d << eventClassName(type) << "(dropAction="; | - | ||||||||||||
| 781 | QtDebugUtils::formatQEnum(d, e->dropAction()); | - | ||||||||||||
| 782 | d << ", proposedAction="; | - | ||||||||||||
| 783 | QtDebugUtils::formatQEnum(d, e->proposedAction()); | - | ||||||||||||
| 784 | d << ", possibleActions="; | - | ||||||||||||
| 785 | QtDebugUtils::formatQFlags(d, e->possibleActions()); | - | ||||||||||||
| 786 | d << ", posF="; | - | ||||||||||||
| 787 | QtDebugUtils::formatQPoint(d, e->posF()); | - | ||||||||||||
| 788 | if (type == QEvent::DragMove || type == QEvent::DragEnter) | - | ||||||||||||
| 789 | d << ", answerRect=" << static_cast<const QDragMoveEvent *>(e)->answerRect(); | - | ||||||||||||
| 790 | d << ", formats=" << e->mimeData()->formats(); | - | ||||||||||||
| 791 | QtDebugUtils::formatNonNullQFlags(d, ", keyboardModifiers=", e->keyboardModifiers()); | - | ||||||||||||
| 792 | d << ", "; | - | ||||||||||||
| 793 | QtDebugUtils::formatQFlags(d, e->mouseButtons()); | - | ||||||||||||
| 794 | } | - | ||||||||||||
| 795 | - | |||||||||||||
| 796 | - | |||||||||||||
| 797 | - | |||||||||||||
| 798 | - | |||||||||||||
| 799 | - | |||||||||||||
| 800 | static void formatTabletEvent(QDebug d, const QTabletEvent *e) | - | ||||||||||||
| 801 | { | - | ||||||||||||
| 802 | const QEvent::Type type = e->type(); | - | ||||||||||||
| 803 | - | |||||||||||||
| 804 | d << eventClassName(type) << '('; | - | ||||||||||||
| 805 | QtDebugUtils::formatQEnum(d, type); | - | ||||||||||||
| 806 | d << ", device="; | - | ||||||||||||
| 807 | QtDebugUtils::formatQEnum(d, e->device()); | - | ||||||||||||
| 808 | d << ", pointerType="; | - | ||||||||||||
| 809 | QtDebugUtils::formatQEnum(d, e->pointerType()); | - | ||||||||||||
| 810 | d << ", uniqueId=" << e->uniqueId() | - | ||||||||||||
| 811 | << ", pos=" << e->posF() | - | ||||||||||||
| 812 | << ", z=" << e->z() | - | ||||||||||||
| 813 | << ", xTilt=" << e->xTilt() | - | ||||||||||||
| 814 | << ", yTilt=" << e->yTilt() | - | ||||||||||||
| 815 | << ", "; | - | ||||||||||||
| 816 | QtDebugUtils::formatQFlags(d, e->buttons()); | - | ||||||||||||
| 817 | if (type == QEvent::TabletPress || type == QEvent::TabletMove) | - | ||||||||||||
| 818 | d << ", pressure=" << e->pressure(); | - | ||||||||||||
| 819 | if (e->device() == QTabletEvent::RotationStylus || e->device() == QTabletEvent::FourDMouse) | - | ||||||||||||
| 820 | d << ", rotation=" << e->rotation(); | - | ||||||||||||
| 821 | if (e->device() == QTabletEvent::Airbrush) | - | ||||||||||||
| 822 | d << ", tangentialPressure=" << e->tangentialPressure(); | - | ||||||||||||
| 823 | } | - | ||||||||||||
| 824 | - | |||||||||||||
| 825 | - | |||||||||||||
| 826 | - | |||||||||||||
| 827 | QDebug operator<<(QDebug dbg, const QTouchEvent::TouchPoint &tp) | - | ||||||||||||
| 828 | { | - | ||||||||||||
| 829 | QDebugStateSaver saver(dbg); | - | ||||||||||||
| 830 | dbg.nospace(); | - | ||||||||||||
| 831 | dbg << "TouchPoint(" << tp.id() << " ("; | - | ||||||||||||
| 832 | QtDebugUtils::formatQRect(dbg, tp.rect()); | - | ||||||||||||
| 833 | dbg << ") "; | - | ||||||||||||
| 834 | QtDebugUtils::formatQEnum(dbg, tp.state()); | - | ||||||||||||
| 835 | dbg << " press " << tp.pressure() << " vel " << tp.velocity() | - | ||||||||||||
| 836 | << " start ("; | - | ||||||||||||
| 837 | QtDebugUtils::formatQPoint(dbg, tp.startPos()); | - | ||||||||||||
| 838 | dbg << ") last ("; | - | ||||||||||||
| 839 | QtDebugUtils::formatQPoint(dbg, tp.lastPos()); | - | ||||||||||||
| 840 | dbg << ") delta ("; | - | ||||||||||||
| 841 | QtDebugUtils::formatQPoint(dbg, tp.pos() - tp.lastPos()); | - | ||||||||||||
| 842 | dbg << ')'; | - | ||||||||||||
| 843 | return dbg; | - | ||||||||||||
| 844 | } | - | ||||||||||||
| 845 | - | |||||||||||||
| 846 | QDebug operator<<(QDebug dbg, const QEvent *e) | - | ||||||||||||
| 847 | { | - | ||||||||||||
| 848 | QDebugStateSaver saver(dbg); | - | ||||||||||||
| 849 | dbg.nospace(); | - | ||||||||||||
| 850 | if (!e
| 0 | ||||||||||||
| 851 | dbg << "QEvent(this = 0x0)"; | - | ||||||||||||
| 852 | return never executed: dbg;return dbg;never executed: return dbg; | 0 | ||||||||||||
| 853 | } | - | ||||||||||||
| 854 | - | |||||||||||||
| 855 | const QEvent::Type type = e->type(); | - | ||||||||||||
| 856 | switch (type) { | - | ||||||||||||
| 857 | case never executed: QEvent::Expose:case QEvent::Expose:never executed: case QEvent::Expose: | 0 | ||||||||||||
| 858 | dbg << "QExposeEvent(" << static_cast<const QExposeEvent *>(e)->region() << ')'; | - | ||||||||||||
| 859 | break; never executed: break; | 0 | ||||||||||||
| 860 | case never executed: QEvent::Paint:case QEvent::Paint:never executed: case QEvent::Paint: | 0 | ||||||||||||
| 861 | dbg << "QPaintEvent(" << static_cast<const QPaintEvent *>(e)->region() << ')'; | - | ||||||||||||
| 862 | break; never executed: break; | 0 | ||||||||||||
| 863 | case never executed: QEvent::MouseButtonPress:case QEvent::MouseButtonPress:never executed: case QEvent::MouseButtonPress: | 0 | ||||||||||||
| 864 | case never executed: QEvent::MouseMove:case QEvent::MouseMove:never executed: case QEvent::MouseMove: | 0 | ||||||||||||
| 865 | case never executed: QEvent::MouseButtonRelease:case QEvent::MouseButtonRelease:never executed: case QEvent::MouseButtonRelease: | 0 | ||||||||||||
| 866 | case never executed: QEvent::MouseButtonDblClick:case QEvent::MouseButtonDblClick:never executed: case QEvent::MouseButtonDblClick: | 0 | ||||||||||||
| 867 | case never executed: QEvent::NonClientAreaMouseButtonPress:case QEvent::NonClientAreaMouseButtonPress:never executed: case QEvent::NonClientAreaMouseButtonPress: | 0 | ||||||||||||
| 868 | case never executed: QEvent::NonClientAreaMouseMove:case QEvent::NonClientAreaMouseMove:never executed: case QEvent::NonClientAreaMouseMove: | 0 | ||||||||||||
| 869 | case never executed: QEvent::NonClientAreaMouseButtonRelease:case QEvent::NonClientAreaMouseButtonRelease:never executed: case QEvent::NonClientAreaMouseButtonRelease: | 0 | ||||||||||||
| 870 | case never executed: QEvent::NonClientAreaMouseButtonDblClick:case QEvent::NonClientAreaMouseButtonDblClick:never executed: case QEvent::NonClientAreaMouseButtonDblClick: | 0 | ||||||||||||
| 871 | { | - | ||||||||||||
| 872 | const QMouseEvent *me = static_cast<const QMouseEvent*>(e); | - | ||||||||||||
| 873 | const Qt::MouseButton button = me->button(); | - | ||||||||||||
| 874 | const Qt::MouseButtons buttons = me->buttons(); | - | ||||||||||||
| 875 | dbg << "QMouseEvent("; | - | ||||||||||||
| 876 | QtDebugUtils::formatQEnum(dbg, type); | - | ||||||||||||
| 877 | if (type != QEvent::MouseMove
| 0 | ||||||||||||
| 878 | dbg << ", "; | - | ||||||||||||
| 879 | QtDebugUtils::formatQEnum(dbg, button); | - | ||||||||||||
| 880 | } never executed: end of block | 0 | ||||||||||||
| 881 | if (buttons
| 0 | ||||||||||||
| 882 | dbg << ", buttons="; | - | ||||||||||||
| 883 | QtDebugUtils::formatQFlags(dbg, buttons); | - | ||||||||||||
| 884 | } never executed: end of block | 0 | ||||||||||||
| 885 | QtDebugUtils::formatNonNullQFlags(dbg, ", ", me->modifiers()); | - | ||||||||||||
| 886 | dbg << ", localPos="; | - | ||||||||||||
| 887 | QtDebugUtils::formatQPoint(dbg, me->localPos()); | - | ||||||||||||
| 888 | dbg << ", screenPos="; | - | ||||||||||||
| 889 | QtDebugUtils::formatQPoint(dbg, me->screenPos()); | - | ||||||||||||
| 890 | QtDebugUtils::formatNonNullQEnum(dbg, ", ", me->source()); | - | ||||||||||||
| 891 | QtDebugUtils::formatNonNullQFlags(dbg, ", flags=", me->flags()); | - | ||||||||||||
| 892 | dbg << ')'; | - | ||||||||||||
| 893 | } | - | ||||||||||||
| 894 | break; never executed: break; | 0 | ||||||||||||
| 895 | - | |||||||||||||
| 896 | case never executed: QEvent::Wheel:case QEvent::Wheel:never executed: {case QEvent::Wheel: | 0 | ||||||||||||
| 897 | const QWheelEvent *we = static_cast<const QWheelEvent *>(e); | - | ||||||||||||
| 898 | dbg << "QWheelEvent(" << "pixelDelta=" << we->pixelDelta() << ", angleDelta=" << we->angleDelta() << ')'; | - | ||||||||||||
| 899 | } | - | ||||||||||||
| 900 | break; never executed: break; | 0 | ||||||||||||
| 901 | - | |||||||||||||
| 902 | case never executed: QEvent::KeyPress:case QEvent::KeyPress:never executed: case QEvent::KeyPress: | 0 | ||||||||||||
| 903 | case never executed: QEvent::KeyRelease:case QEvent::KeyRelease:never executed: case QEvent::KeyRelease: | 0 | ||||||||||||
| 904 | case never executed: QEvent::ShortcutOverride:case QEvent::ShortcutOverride:never executed: case QEvent::ShortcutOverride: | 0 | ||||||||||||
| 905 | { | - | ||||||||||||
| 906 | const QKeyEvent *ke = static_cast<const QKeyEvent *>(e); | - | ||||||||||||
| 907 | dbg << "QKeyEvent("; | - | ||||||||||||
| 908 | QtDebugUtils::formatQEnum(dbg, type); | - | ||||||||||||
| 909 | dbg << ", "; | - | ||||||||||||
| 910 | QtDebugUtils::formatQEnum(dbg, static_cast<Qt::Key>(ke->key())); | - | ||||||||||||
| 911 | QtDebugUtils::formatNonNullQFlags(dbg, ", ", ke->modifiers()); | - | ||||||||||||
| 912 | if (!ke->text().isEmpty()
| 0 | ||||||||||||
| 913 | dbg << ", text=" << ke->text(); never executed: dbg << ", text=" << ke->text(); | 0 | ||||||||||||
| 914 | if (ke->isAutoRepeat()
| 0 | ||||||||||||
| 915 | dbg << ", autorepeat, count=" << ke->count(); never executed: dbg << ", autorepeat, count=" << ke->count(); | 0 | ||||||||||||
| 916 | dbg << ')'; | - | ||||||||||||
| 917 | } | - | ||||||||||||
| 918 | break; never executed: break; | 0 | ||||||||||||
| 919 | case never executed: QEvent::Shortcut:case QEvent::Shortcut:never executed: {case QEvent::Shortcut: | 0 | ||||||||||||
| 920 | const QShortcutEvent *se = static_cast<const QShortcutEvent *>(e); | - | ||||||||||||
| 921 | dbg << "QShortcutEvent(" << se->key().toString() << ", id=" << se->shortcutId(); | - | ||||||||||||
| 922 | if (se->isAmbiguous()
| 0 | ||||||||||||
| 923 | dbg << ", ambiguous"; never executed: dbg << ", ambiguous"; | 0 | ||||||||||||
| 924 | dbg << ')'; | - | ||||||||||||
| 925 | } | - | ||||||||||||
| 926 | break; never executed: break; | 0 | ||||||||||||
| 927 | case never executed: QEvent::FocusAboutToChange:case QEvent::FocusAboutToChange:never executed: case QEvent::FocusAboutToChange: | 0 | ||||||||||||
| 928 | case never executed: QEvent::FocusIn:case QEvent::FocusIn:never executed: case QEvent::FocusIn: | 0 | ||||||||||||
| 929 | case never executed: QEvent::FocusOut:case QEvent::FocusOut:never executed: case QEvent::FocusOut: | 0 | ||||||||||||
| 930 | dbg << "QFocusEvent("; | - | ||||||||||||
| 931 | QtDebugUtils::formatQEnum(dbg, type); | - | ||||||||||||
| 932 | dbg << ", "; | - | ||||||||||||
| 933 | QtDebugUtils::formatQEnum(dbg, static_cast<const QFocusEvent *>(e)->reason()); | - | ||||||||||||
| 934 | dbg << ')'; | - | ||||||||||||
| 935 | break; never executed: break; | 0 | ||||||||||||
| 936 | case never executed: QEvent::Move:case QEvent::Move:never executed: {case QEvent::Move: | 0 | ||||||||||||
| 937 | const QMoveEvent *me = static_cast<const QMoveEvent *>(e); | - | ||||||||||||
| 938 | dbg << "QMoveEvent("; | - | ||||||||||||
| 939 | QtDebugUtils::formatQPoint(dbg, me->pos()); | - | ||||||||||||
| 940 | if (!me->spontaneous()
| 0 | ||||||||||||
| 941 | dbg << ", non-spontaneous"; never executed: dbg << ", non-spontaneous"; | 0 | ||||||||||||
| 942 | dbg << ')'; | - | ||||||||||||
| 943 | } | - | ||||||||||||
| 944 | break; never executed: break; | 0 | ||||||||||||
| 945 | case never executed: QEvent::Resize:case QEvent::Resize:never executed: {case QEvent::Resize: | 0 | ||||||||||||
| 946 | const QResizeEvent *re = static_cast<const QResizeEvent *>(e); | - | ||||||||||||
| 947 | dbg << "QResizeEvent("; | - | ||||||||||||
| 948 | QtDebugUtils::formatQSize(dbg, re->size()); | - | ||||||||||||
| 949 | if (!re->spontaneous()
| 0 | ||||||||||||
| 950 | dbg << ", non-spontaneous"; never executed: dbg << ", non-spontaneous"; | 0 | ||||||||||||
| 951 | dbg << ')'; | - | ||||||||||||
| 952 | } | - | ||||||||||||
| 953 | break; never executed: break; | 0 | ||||||||||||
| 954 | - | |||||||||||||
| 955 | case never executed: QEvent::DragEnter:case QEvent::DragEnter:never executed: case QEvent::DragEnter: | 0 | ||||||||||||
| 956 | case never executed: QEvent::DragMove:case QEvent::DragMove:never executed: case QEvent::DragMove: | 0 | ||||||||||||
| 957 | case never executed: QEvent::Drop:case QEvent::Drop:never executed: case QEvent::Drop: | 0 | ||||||||||||
| 958 | formatDropEvent(dbg, static_cast<const QDropEvent *>(e)); | - | ||||||||||||
| 959 | break; never executed: break; | 0 | ||||||||||||
| 960 | - | |||||||||||||
| 961 | case never executed: QEvent::InputMethod:case QEvent::InputMethod:never executed: case QEvent::InputMethod: | 0 | ||||||||||||
| 962 | formatInputMethodEvent(dbg, static_cast<const QInputMethodEvent *>(e)); | - | ||||||||||||
| 963 | break; never executed: break; | 0 | ||||||||||||
| 964 | case never executed: QEvent::InputMethodQuery:case QEvent::InputMethodQuery:never executed: case QEvent::InputMethodQuery: | 0 | ||||||||||||
| 965 | formatInputMethodQueryEvent(dbg, static_cast<const QInputMethodQueryEvent *>(e)); | - | ||||||||||||
| 966 | break; never executed: break; | 0 | ||||||||||||
| 967 | case never executed: QEvent::TouchBegin:case QEvent::TouchBegin:never executed: case QEvent::TouchBegin: | 0 | ||||||||||||
| 968 | case never executed: QEvent::TouchUpdate:case QEvent::TouchUpdate:never executed: case QEvent::TouchUpdate: | 0 | ||||||||||||
| 969 | case never executed: QEvent::TouchEnd:case QEvent::TouchEnd:never executed: case QEvent::TouchEnd: | 0 | ||||||||||||
| 970 | formatTouchEvent(dbg, *static_cast<const QTouchEvent*>(e)); | - | ||||||||||||
| 971 | break; never executed: break; | 0 | ||||||||||||
| 972 | case never executed: QEvent::ChildAdded:case QEvent::ChildAdded:never executed: case QEvent::ChildAdded: | 0 | ||||||||||||
| 973 | case never executed: QEvent::ChildPolished:case QEvent::ChildPolished:never executed: case QEvent::ChildPolished: | 0 | ||||||||||||
| 974 | case never executed: QEvent::ChildRemoved:case QEvent::ChildRemoved:never executed: case QEvent::ChildRemoved: | 0 | ||||||||||||
| 975 | dbg << "QChildEvent("; | - | ||||||||||||
| 976 | QtDebugUtils::formatQEnum(dbg, type); | - | ||||||||||||
| 977 | dbg << ", " << (static_cast<const QChildEvent*>(e))->child() << ')'; | - | ||||||||||||
| 978 | break; never executed: break; | 0 | ||||||||||||
| 979 | - | |||||||||||||
| 980 | case never executed: QEvent::NativeGesture:case QEvent::NativeGesture:never executed: {case QEvent::NativeGesture: | 0 | ||||||||||||
| 981 | const QNativeGestureEvent *ne = static_cast<const QNativeGestureEvent *>(e); | - | ||||||||||||
| 982 | dbg << "QNativeGestureEvent("; | - | ||||||||||||
| 983 | QtDebugUtils::formatQEnum(dbg, ne->gestureType()); | - | ||||||||||||
| 984 | dbg << "localPos="; | - | ||||||||||||
| 985 | QtDebugUtils::formatQPoint(dbg, ne->localPos()); | - | ||||||||||||
| 986 | dbg << ", value=" << ne->value() << ')'; | - | ||||||||||||
| 987 | } | - | ||||||||||||
| 988 | break; never executed: break; | 0 | ||||||||||||
| 989 | - | |||||||||||||
| 990 | case never executed: QEvent::ApplicationStateChange:case QEvent::ApplicationStateChange:never executed: case QEvent::ApplicationStateChange: | 0 | ||||||||||||
| 991 | dbg << "QApplicationStateChangeEvent("; | - | ||||||||||||
| 992 | QtDebugUtils::formatQEnum(dbg, static_cast<const QApplicationStateChangeEvent *>(e)->applicationState()); | - | ||||||||||||
| 993 | dbg << ')'; | - | ||||||||||||
| 994 | break; never executed: break; | 0 | ||||||||||||
| 995 | - | |||||||||||||
| 996 | case never executed: QEvent::ContextMenu:case QEvent::ContextMenu:never executed: case QEvent::ContextMenu: | 0 | ||||||||||||
| 997 | dbg << "QContextMenuEvent(" << static_cast<const QContextMenuEvent *>(e)->pos() << ')'; | - | ||||||||||||
| 998 | break; never executed: break; | 0 | ||||||||||||
| 999 | - | |||||||||||||
| 1000 | - | |||||||||||||
| 1001 | case never executed: QEvent::TabletEnterProximity:case QEvent::TabletEnterProximity:never executed: case QEvent::TabletEnterProximity: | 0 | ||||||||||||
| 1002 | case never executed: QEvent::TabletLeaveProximity:case QEvent::TabletLeaveProximity:never executed: case QEvent::TabletLeaveProximity: | 0 | ||||||||||||
| 1003 | case never executed: QEvent::TabletPress:case QEvent::TabletPress:never executed: case QEvent::TabletPress: | 0 | ||||||||||||
| 1004 | case never executed: QEvent::TabletMove:case QEvent::TabletMove:never executed: case QEvent::TabletMove: | 0 | ||||||||||||
| 1005 | case never executed: QEvent::TabletRelease:case QEvent::TabletRelease:never executed: case QEvent::TabletRelease: | 0 | ||||||||||||
| 1006 | formatTabletEvent(dbg, static_cast<const QTabletEvent *>(e)); | - | ||||||||||||
| 1007 | break; never executed: break; | 0 | ||||||||||||
| 1008 | - | |||||||||||||
| 1009 | case never executed: QEvent::Enter:case QEvent::Enter:never executed: case QEvent::Enter: | 0 | ||||||||||||
| 1010 | dbg << "QEnterEvent(" << static_cast<const QEnterEvent *>(e)->pos() << ')'; | - | ||||||||||||
| 1011 | break; never executed: break; | 0 | ||||||||||||
| 1012 | case never executed: QEvent::Timer:case QEvent::Timer:never executed: case QEvent::Timer: | 0 | ||||||||||||
| 1013 | dbg << "QTimerEvent(id=" << static_cast<const QTimerEvent *>(e)->timerId() << ')'; | - | ||||||||||||
| 1014 | break; never executed: break; | 0 | ||||||||||||
| 1015 | case never executed: QEvent::PlatformSurface:case QEvent::PlatformSurface:never executed: case QEvent::PlatformSurface: | 0 | ||||||||||||
| 1016 | dbg << "QPlatformSurfaceEvent(surfaceEventType="; | - | ||||||||||||
| 1017 | switch (static_cast<const QPlatformSurfaceEvent *>(e)->surfaceEventType()) { | - | ||||||||||||
| 1018 | case never executed: QPlatformSurfaceEvent::SurfaceCreated:case QPlatformSurfaceEvent::SurfaceCreated:never executed: case QPlatformSurfaceEvent::SurfaceCreated: | 0 | ||||||||||||
| 1019 | dbg << "SurfaceCreated"; | - | ||||||||||||
| 1020 | break; never executed: break; | 0 | ||||||||||||
| 1021 | case never executed: QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed:case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed:never executed: case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed: | 0 | ||||||||||||
| 1022 | dbg << "SurfaceAboutToBeDestroyed"; | - | ||||||||||||
| 1023 | break; never executed: break; | 0 | ||||||||||||
| 1024 | } | - | ||||||||||||
| 1025 | dbg << ')'; | - | ||||||||||||
| 1026 | break; never executed: break; | 0 | ||||||||||||
| 1027 | default never executed: :default:never executed: default: | 0 | ||||||||||||
| 1028 | dbg << eventClassName(type) << '('; | - | ||||||||||||
| 1029 | QtDebugUtils::formatQEnum(dbg, type); | - | ||||||||||||
| 1030 | dbg << ", " << (const void *)e << ')'; | - | ||||||||||||
| 1031 | break; never executed: break; | 0 | ||||||||||||
| 1032 | } | - | ||||||||||||
| 1033 | return never executed: dbg;return dbg;never executed: return dbg; | 0 | ||||||||||||
| 1034 | } | - | ||||||||||||
| 1035 | QWindowStateChangeEvent::QWindowStateChangeEvent(Qt::WindowStates s, bool isOverride) | - | ||||||||||||
| 1036 | : QEvent(WindowStateChange), ostate(s), m_override(isOverride) | - | ||||||||||||
| 1037 | { | - | ||||||||||||
| 1038 | } | - | ||||||||||||
| 1039 | - | |||||||||||||
| 1040 | - | |||||||||||||
| 1041 | - | |||||||||||||
| 1042 | bool QWindowStateChangeEvent::isOverride() const | - | ||||||||||||
| 1043 | { | - | ||||||||||||
| 1044 | return m_override; | - | ||||||||||||
| 1045 | } | - | ||||||||||||
| 1046 | - | |||||||||||||
| 1047 | - | |||||||||||||
| 1048 | - | |||||||||||||
| 1049 | QWindowStateChangeEvent::~QWindowStateChangeEvent() | - | ||||||||||||
| 1050 | { | - | ||||||||||||
| 1051 | } | - | ||||||||||||
| 1052 | QTouchEvent::QTouchEvent(QEvent::Type eventType, | - | ||||||||||||
| 1053 | QTouchDevice *device, | - | ||||||||||||
| 1054 | Qt::KeyboardModifiers modifiers, | - | ||||||||||||
| 1055 | Qt::TouchPointStates touchPointStates, | - | ||||||||||||
| 1056 | const QList<QTouchEvent::TouchPoint> &touchPoints) | - | ||||||||||||
| 1057 | : QInputEvent(eventType, modifiers), | - | ||||||||||||
| 1058 | _window(0), | - | ||||||||||||
| 1059 | _target(0), | - | ||||||||||||
| 1060 | _device(device), | - | ||||||||||||
| 1061 | _touchPointStates(touchPointStates), | - | ||||||||||||
| 1062 | _touchPoints(touchPoints) | - | ||||||||||||
| 1063 | { } | - | ||||||||||||
| 1064 | - | |||||||||||||
| 1065 | - | |||||||||||||
| 1066 | - | |||||||||||||
| 1067 | - | |||||||||||||
| 1068 | QTouchEvent::~QTouchEvent() | - | ||||||||||||
| 1069 | { } | - | ||||||||||||
| 1070 | QTouchEvent::TouchPoint::TouchPoint(int id) | - | ||||||||||||
| 1071 | : d(new QTouchEventTouchPointPrivate(id)) | - | ||||||||||||
| 1072 | { } | - | ||||||||||||
| 1073 | - | |||||||||||||
| 1074 | - | |||||||||||||
| 1075 | - | |||||||||||||
| 1076 | - | |||||||||||||
| 1077 | - | |||||||||||||
| 1078 | - | |||||||||||||
| 1079 | - | |||||||||||||
| 1080 | QTouchEvent::TouchPoint::TouchPoint(const QTouchEvent::TouchPoint &other) | - | ||||||||||||
| 1081 | : d(other.d) | - | ||||||||||||
| 1082 | { | - | ||||||||||||
| 1083 | d->ref.ref(); | - | ||||||||||||
| 1084 | } | - | ||||||||||||
| 1085 | - | |||||||||||||
| 1086 | - | |||||||||||||
| 1087 | - | |||||||||||||
| 1088 | - | |||||||||||||
| 1089 | - | |||||||||||||
| 1090 | - | |||||||||||||
| 1091 | QTouchEvent::TouchPoint::~TouchPoint() | - | ||||||||||||
| 1092 | { | - | ||||||||||||
| 1093 | if (d && !d->ref.deref()) | - | ||||||||||||
| 1094 | delete d; | - | ||||||||||||
| 1095 | } | - | ||||||||||||
| 1096 | - | |||||||||||||
| 1097 | - | |||||||||||||
| 1098 | - | |||||||||||||
| 1099 | - | |||||||||||||
| 1100 | - | |||||||||||||
| 1101 | - | |||||||||||||
| 1102 | - | |||||||||||||
| 1103 | int QTouchEvent::TouchPoint::id() const | - | ||||||||||||
| 1104 | { | - | ||||||||||||
| 1105 | return d->id; | - | ||||||||||||
| 1106 | } | - | ||||||||||||
| 1107 | - | |||||||||||||
| 1108 | - | |||||||||||||
| 1109 | - | |||||||||||||
| 1110 | - | |||||||||||||
| 1111 | Qt::TouchPointState QTouchEvent::TouchPoint::state() const | - | ||||||||||||
| 1112 | { | - | ||||||||||||
| 1113 | return Qt::TouchPointState(int(d->state)); | - | ||||||||||||
| 1114 | } | - | ||||||||||||
| 1115 | - | |||||||||||||
| 1116 | - | |||||||||||||
| 1117 | - | |||||||||||||
| 1118 | - | |||||||||||||
| 1119 | - | |||||||||||||
| 1120 | - | |||||||||||||
| 1121 | - | |||||||||||||
| 1122 | QPointF QTouchEvent::TouchPoint::pos() const | - | ||||||||||||
| 1123 | { | - | ||||||||||||
| 1124 | return d->rect.center(); | - | ||||||||||||
| 1125 | } | - | ||||||||||||
| 1126 | QPointF QTouchEvent::TouchPoint::scenePos() const | - | ||||||||||||
| 1127 | { | - | ||||||||||||
| 1128 | return d->sceneRect.center(); | - | ||||||||||||
| 1129 | } | - | ||||||||||||
| 1130 | - | |||||||||||||
| 1131 | - | |||||||||||||
| 1132 | - | |||||||||||||
| 1133 | - | |||||||||||||
| 1134 | - | |||||||||||||
| 1135 | - | |||||||||||||
| 1136 | QPointF QTouchEvent::TouchPoint::screenPos() const | - | ||||||||||||
| 1137 | { | - | ||||||||||||
| 1138 | return d->screenRect.center(); | - | ||||||||||||
| 1139 | } | - | ||||||||||||
| 1140 | QPointF QTouchEvent::TouchPoint::normalizedPos() const | - | ||||||||||||
| 1141 | { | - | ||||||||||||
| 1142 | return d->normalizedPos; | - | ||||||||||||
| 1143 | } | - | ||||||||||||
| 1144 | - | |||||||||||||
| 1145 | - | |||||||||||||
| 1146 | - | |||||||||||||
| 1147 | - | |||||||||||||
| 1148 | - | |||||||||||||
| 1149 | - | |||||||||||||
| 1150 | - | |||||||||||||
| 1151 | QPointF QTouchEvent::TouchPoint::startPos() const | - | ||||||||||||
| 1152 | { | - | ||||||||||||
| 1153 | return d->startPos; | - | ||||||||||||
| 1154 | } | - | ||||||||||||
| 1155 | QPointF QTouchEvent::TouchPoint::startScenePos() const | - | ||||||||||||
| 1156 | { | - | ||||||||||||
| 1157 | return d->startScenePos; | - | ||||||||||||
| 1158 | } | - | ||||||||||||
| 1159 | - | |||||||||||||
| 1160 | - | |||||||||||||
| 1161 | - | |||||||||||||
| 1162 | - | |||||||||||||
| 1163 | - | |||||||||||||
| 1164 | - | |||||||||||||
| 1165 | QPointF QTouchEvent::TouchPoint::startScreenPos() const | - | ||||||||||||
| 1166 | { | - | ||||||||||||
| 1167 | return d->startScreenPos; | - | ||||||||||||
| 1168 | } | - | ||||||||||||
| 1169 | QPointF QTouchEvent::TouchPoint::startNormalizedPos() const | - | ||||||||||||
| 1170 | { | - | ||||||||||||
| 1171 | return d->startNormalizedPos; | - | ||||||||||||
| 1172 | } | - | ||||||||||||
| 1173 | - | |||||||||||||
| 1174 | - | |||||||||||||
| 1175 | - | |||||||||||||
| 1176 | - | |||||||||||||
| 1177 | - | |||||||||||||
| 1178 | - | |||||||||||||
| 1179 | - | |||||||||||||
| 1180 | QPointF QTouchEvent::TouchPoint::lastPos() const | - | ||||||||||||
| 1181 | { | - | ||||||||||||
| 1182 | return d->lastPos; | - | ||||||||||||
| 1183 | } | - | ||||||||||||
| 1184 | QPointF QTouchEvent::TouchPoint::lastScenePos() const | - | ||||||||||||
| 1185 | { | - | ||||||||||||
| 1186 | return d->lastScenePos; | - | ||||||||||||
| 1187 | } | - | ||||||||||||
| 1188 | - | |||||||||||||
| 1189 | - | |||||||||||||
| 1190 | - | |||||||||||||
| 1191 | - | |||||||||||||
| 1192 | - | |||||||||||||
| 1193 | - | |||||||||||||
| 1194 | - | |||||||||||||
| 1195 | QPointF QTouchEvent::TouchPoint::lastScreenPos() const | - | ||||||||||||
| 1196 | { | - | ||||||||||||
| 1197 | return d->lastScreenPos; | - | ||||||||||||
| 1198 | } | - | ||||||||||||
| 1199 | QPointF QTouchEvent::TouchPoint::lastNormalizedPos() const | - | ||||||||||||
| 1200 | { | - | ||||||||||||
| 1201 | return d->lastNormalizedPos; | - | ||||||||||||
| 1202 | } | - | ||||||||||||
| 1203 | QRectF QTouchEvent::TouchPoint::rect() const | - | ||||||||||||
| 1204 | { | - | ||||||||||||
| 1205 | return d->rect; | - | ||||||||||||
| 1206 | } | - | ||||||||||||
| 1207 | QRectF QTouchEvent::TouchPoint::sceneRect() const | - | ||||||||||||
| 1208 | { | - | ||||||||||||
| 1209 | return d->sceneRect; | - | ||||||||||||
| 1210 | } | - | ||||||||||||
| 1211 | QRectF QTouchEvent::TouchPoint::screenRect() const | - | ||||||||||||
| 1212 | { | - | ||||||||||||
| 1213 | return d->screenRect; | - | ||||||||||||
| 1214 | } | - | ||||||||||||
| 1215 | - | |||||||||||||
| 1216 | - | |||||||||||||
| 1217 | - | |||||||||||||
| 1218 | - | |||||||||||||
| 1219 | - | |||||||||||||
| 1220 | qreal QTouchEvent::TouchPoint::pressure() const | - | ||||||||||||
| 1221 | { | - | ||||||||||||
| 1222 | return d->pressure; | - | ||||||||||||
| 1223 | } | - | ||||||||||||
| 1224 | QVector2D QTouchEvent::TouchPoint::velocity() const | - | ||||||||||||
| 1225 | { | - | ||||||||||||
| 1226 | return d->velocity; | - | ||||||||||||
| 1227 | } | - | ||||||||||||
| 1228 | - | |||||||||||||
| 1229 | - | |||||||||||||
| 1230 | - | |||||||||||||
| 1231 | - | |||||||||||||
| 1232 | - | |||||||||||||
| 1233 | - | |||||||||||||
| 1234 | QTouchEvent::TouchPoint::InfoFlags QTouchEvent::TouchPoint::flags() const | - | ||||||||||||
| 1235 | { | - | ||||||||||||
| 1236 | return d->flags; | - | ||||||||||||
| 1237 | } | - | ||||||||||||
| 1238 | QVector<QPointF> QTouchEvent::TouchPoint::rawScreenPositions() const | - | ||||||||||||
| 1239 | { | - | ||||||||||||
| 1240 | return d->rawScreenPositions; | - | ||||||||||||
| 1241 | } | - | ||||||||||||
| 1242 | - | |||||||||||||
| 1243 | - | |||||||||||||
| 1244 | void QTouchEvent::TouchPoint::setId(int id) | - | ||||||||||||
| 1245 | { | - | ||||||||||||
| 1246 | if (d->ref.load() != 1) | - | ||||||||||||
| 1247 | d = d->detach(); | - | ||||||||||||
| 1248 | d->id = id; | - | ||||||||||||
| 1249 | } | - | ||||||||||||
| 1250 | - | |||||||||||||
| 1251 | - | |||||||||||||
| 1252 | void QTouchEvent::TouchPoint::setState(Qt::TouchPointStates state) | - | ||||||||||||
| 1253 | { | - | ||||||||||||
| 1254 | if (d->ref.load() != 1) | - | ||||||||||||
| 1255 | d = d->detach(); | - | ||||||||||||
| 1256 | d->state = state; | - | ||||||||||||
| 1257 | } | - | ||||||||||||
| 1258 | - | |||||||||||||
| 1259 | - | |||||||||||||
| 1260 | void QTouchEvent::TouchPoint::setPos(const QPointF &pos) | - | ||||||||||||
| 1261 | { | - | ||||||||||||
| 1262 | if (d->ref.load() != 1) | - | ||||||||||||
| 1263 | d = d->detach(); | - | ||||||||||||
| 1264 | d->rect.moveCenter(pos); | - | ||||||||||||
| 1265 | } | - | ||||||||||||
| 1266 | - | |||||||||||||
| 1267 | - | |||||||||||||
| 1268 | void QTouchEvent::TouchPoint::setScenePos(const QPointF &scenePos) | - | ||||||||||||
| 1269 | { | - | ||||||||||||
| 1270 | if (d->ref.load() != 1) | - | ||||||||||||
| 1271 | d = d->detach(); | - | ||||||||||||
| 1272 | d->sceneRect.moveCenter(scenePos); | - | ||||||||||||
| 1273 | } | - | ||||||||||||
| 1274 | - | |||||||||||||
| 1275 | - | |||||||||||||
| 1276 | void QTouchEvent::TouchPoint::setScreenPos(const QPointF &screenPos) | - | ||||||||||||
| 1277 | { | - | ||||||||||||
| 1278 | if (d->ref.load() != 1) | - | ||||||||||||
| 1279 | d = d->detach(); | - | ||||||||||||
| 1280 | d->screenRect.moveCenter(screenPos); | - | ||||||||||||
| 1281 | } | - | ||||||||||||
| 1282 | - | |||||||||||||
| 1283 | - | |||||||||||||
| 1284 | void QTouchEvent::TouchPoint::setNormalizedPos(const QPointF &normalizedPos) | - | ||||||||||||
| 1285 | { | - | ||||||||||||
| 1286 | if (d->ref.load() != 1) | - | ||||||||||||
| 1287 | d = d->detach(); | - | ||||||||||||
| 1288 | d->normalizedPos = normalizedPos; | - | ||||||||||||
| 1289 | } | - | ||||||||||||
| 1290 | - | |||||||||||||
| 1291 | - | |||||||||||||
| 1292 | void QTouchEvent::TouchPoint::setStartPos(const QPointF &startPos) | - | ||||||||||||
| 1293 | { | - | ||||||||||||
| 1294 | if (d->ref.load() != 1) | - | ||||||||||||
| 1295 | d = d->detach(); | - | ||||||||||||
| 1296 | d->startPos = startPos; | - | ||||||||||||
| 1297 | } | - | ||||||||||||
| 1298 | - | |||||||||||||
| 1299 | - | |||||||||||||
| 1300 | void QTouchEvent::TouchPoint::setStartScenePos(const QPointF &startScenePos) | - | ||||||||||||
| 1301 | { | - | ||||||||||||
| 1302 | if (d->ref.load() != 1) | - | ||||||||||||
| 1303 | d = d->detach(); | - | ||||||||||||
| 1304 | d->startScenePos = startScenePos; | - | ||||||||||||
| 1305 | } | - | ||||||||||||
| 1306 | - | |||||||||||||
| 1307 | - | |||||||||||||
| 1308 | void QTouchEvent::TouchPoint::setStartScreenPos(const QPointF &startScreenPos) | - | ||||||||||||
| 1309 | { | - | ||||||||||||
| 1310 | if (d->ref.load() != 1) | - | ||||||||||||
| 1311 | d = d->detach(); | - | ||||||||||||
| 1312 | d->startScreenPos = startScreenPos; | - | ||||||||||||
| 1313 | } | - | ||||||||||||
| 1314 | - | |||||||||||||
| 1315 | - | |||||||||||||
| 1316 | void QTouchEvent::TouchPoint::setStartNormalizedPos(const QPointF &startNormalizedPos) | - | ||||||||||||
| 1317 | { | - | ||||||||||||
| 1318 | if (d->ref.load() != 1) | - | ||||||||||||
| 1319 | d = d->detach(); | - | ||||||||||||
| 1320 | d->startNormalizedPos = startNormalizedPos; | - | ||||||||||||
| 1321 | } | - | ||||||||||||
| 1322 | - | |||||||||||||
| 1323 | - | |||||||||||||
| 1324 | void QTouchEvent::TouchPoint::setLastPos(const QPointF &lastPos) | - | ||||||||||||
| 1325 | { | - | ||||||||||||
| 1326 | if (d->ref.load() != 1) | - | ||||||||||||
| 1327 | d = d->detach(); | - | ||||||||||||
| 1328 | d->lastPos = lastPos; | - | ||||||||||||
| 1329 | } | - | ||||||||||||
| 1330 | - | |||||||||||||
| 1331 | - | |||||||||||||
| 1332 | void QTouchEvent::TouchPoint::setLastScenePos(const QPointF &lastScenePos) | - | ||||||||||||
| 1333 | { | - | ||||||||||||
| 1334 | if (d->ref.load() != 1) | - | ||||||||||||
| 1335 | d = d->detach(); | - | ||||||||||||
| 1336 | d->lastScenePos = lastScenePos; | - | ||||||||||||
| 1337 | } | - | ||||||||||||
| 1338 | - | |||||||||||||
| 1339 | - | |||||||||||||
| 1340 | void QTouchEvent::TouchPoint::setLastScreenPos(const QPointF &lastScreenPos) | - | ||||||||||||
| 1341 | { | - | ||||||||||||
| 1342 | if (d->ref.load() != 1) | - | ||||||||||||
| 1343 | d = d->detach(); | - | ||||||||||||
| 1344 | d->lastScreenPos = lastScreenPos; | - | ||||||||||||
| 1345 | } | - | ||||||||||||
| 1346 | - | |||||||||||||
| 1347 | - | |||||||||||||
| 1348 | void QTouchEvent::TouchPoint::setLastNormalizedPos(const QPointF &lastNormalizedPos) | - | ||||||||||||
| 1349 | { | - | ||||||||||||
| 1350 | if (d->ref.load() != 1) | - | ||||||||||||
| 1351 | d = d->detach(); | - | ||||||||||||
| 1352 | d->lastNormalizedPos = lastNormalizedPos; | - | ||||||||||||
| 1353 | } | - | ||||||||||||
| 1354 | - | |||||||||||||
| 1355 | - | |||||||||||||
| 1356 | void QTouchEvent::TouchPoint::setRect(const QRectF &rect) | - | ||||||||||||
| 1357 | { | - | ||||||||||||
| 1358 | if (d->ref.load() != 1) | - | ||||||||||||
| 1359 | d = d->detach(); | - | ||||||||||||
| 1360 | d->rect = rect; | - | ||||||||||||
| 1361 | } | - | ||||||||||||
| 1362 | - | |||||||||||||
| 1363 | - | |||||||||||||
| 1364 | void QTouchEvent::TouchPoint::setSceneRect(const QRectF &sceneRect) | - | ||||||||||||
| 1365 | { | - | ||||||||||||
| 1366 | if (d->ref.load() != 1) | - | ||||||||||||
| 1367 | d = d->detach(); | - | ||||||||||||
| 1368 | d->sceneRect = sceneRect; | - | ||||||||||||
| 1369 | } | - | ||||||||||||
| 1370 | - | |||||||||||||
| 1371 | - | |||||||||||||
| 1372 | void QTouchEvent::TouchPoint::setScreenRect(const QRectF &screenRect) | - | ||||||||||||
| 1373 | { | - | ||||||||||||
| 1374 | if (d->ref.load() != 1) | - | ||||||||||||
| 1375 | d = d->detach(); | - | ||||||||||||
| 1376 | d->screenRect = screenRect; | - | ||||||||||||
| 1377 | } | - | ||||||||||||
| 1378 | - | |||||||||||||
| 1379 | - | |||||||||||||
| 1380 | void QTouchEvent::TouchPoint::setPressure(qreal pressure) | - | ||||||||||||
| 1381 | { | - | ||||||||||||
| 1382 | if (d->ref.load() != 1) | - | ||||||||||||
| 1383 | d = d->detach(); | - | ||||||||||||
| 1384 | d->pressure = pressure; | - | ||||||||||||
| 1385 | } | - | ||||||||||||
| 1386 | - | |||||||||||||
| 1387 | - | |||||||||||||
| 1388 | void QTouchEvent::TouchPoint::setVelocity(const QVector2D &v) | - | ||||||||||||
| 1389 | { | - | ||||||||||||
| 1390 | if (d->ref.load() != 1) | - | ||||||||||||
| 1391 | d = d->detach(); | - | ||||||||||||
| 1392 | d->velocity = v; | - | ||||||||||||
| 1393 | } | - | ||||||||||||
| 1394 | - | |||||||||||||
| 1395 | - | |||||||||||||
| 1396 | void QTouchEvent::TouchPoint::setRawScreenPositions(const QVector<QPointF> &positions) | - | ||||||||||||
| 1397 | { | - | ||||||||||||
| 1398 | if (d->ref.load() != 1) | - | ||||||||||||
| 1399 | d = d->detach(); | - | ||||||||||||
| 1400 | d->rawScreenPositions = positions; | - | ||||||||||||
| 1401 | } | - | ||||||||||||
| 1402 | - | |||||||||||||
| 1403 | - | |||||||||||||
| 1404 | - | |||||||||||||
| 1405 | - | |||||||||||||
| 1406 | void QTouchEvent::TouchPoint::setFlags(InfoFlags flags) | - | ||||||||||||
| 1407 | { | - | ||||||||||||
| 1408 | if (d->ref.load() != 1) | - | ||||||||||||
| 1409 | d = d->detach(); | - | ||||||||||||
| 1410 | d->flags = flags; | - | ||||||||||||
| 1411 | } | - | ||||||||||||
| 1412 | QScrollPrepareEvent::QScrollPrepareEvent(const QPointF &startPos) | - | ||||||||||||
| 1413 | : QEvent(QEvent::ScrollPrepare), m_target(0), m_startPos(startPos) | - | ||||||||||||
| 1414 | { | - | ||||||||||||
| 1415 | (void)m_target;; | - | ||||||||||||
| 1416 | } | - | ||||||||||||
| 1417 | - | |||||||||||||
| 1418 | - | |||||||||||||
| 1419 | - | |||||||||||||
| 1420 | - | |||||||||||||
| 1421 | QScrollPrepareEvent::~QScrollPrepareEvent() | - | ||||||||||||
| 1422 | { | - | ||||||||||||
| 1423 | } | - | ||||||||||||
| 1424 | - | |||||||||||||
| 1425 | - | |||||||||||||
| 1426 | - | |||||||||||||
| 1427 | - | |||||||||||||
| 1428 | QPointF QScrollPrepareEvent::startPos() const | - | ||||||||||||
| 1429 | { | - | ||||||||||||
| 1430 | return m_startPos; | - | ||||||||||||
| 1431 | } | - | ||||||||||||
| 1432 | - | |||||||||||||
| 1433 | - | |||||||||||||
| 1434 | - | |||||||||||||
| 1435 | - | |||||||||||||
| 1436 | - | |||||||||||||
| 1437 | - | |||||||||||||
| 1438 | QSizeF QScrollPrepareEvent::viewportSize() const | - | ||||||||||||
| 1439 | { | - | ||||||||||||
| 1440 | return m_viewportSize; | - | ||||||||||||
| 1441 | } | - | ||||||||||||
| 1442 | - | |||||||||||||
| 1443 | - | |||||||||||||
| 1444 | - | |||||||||||||
| 1445 | - | |||||||||||||
| 1446 | QRectF QScrollPrepareEvent::contentPosRange() const | - | ||||||||||||
| 1447 | { | - | ||||||||||||
| 1448 | return m_contentPosRange; | - | ||||||||||||
| 1449 | } | - | ||||||||||||
| 1450 | - | |||||||||||||
| 1451 | - | |||||||||||||
| 1452 | - | |||||||||||||
| 1453 | - | |||||||||||||
| 1454 | QPointF QScrollPrepareEvent::contentPos() const | - | ||||||||||||
| 1455 | { | - | ||||||||||||
| 1456 | return m_contentPos; | - | ||||||||||||
| 1457 | } | - | ||||||||||||
| 1458 | - | |||||||||||||
| 1459 | - | |||||||||||||
| 1460 | - | |||||||||||||
| 1461 | - | |||||||||||||
| 1462 | - | |||||||||||||
| 1463 | - | |||||||||||||
| 1464 | - | |||||||||||||
| 1465 | void QScrollPrepareEvent::setViewportSize(const QSizeF &size) | - | ||||||||||||
| 1466 | { | - | ||||||||||||
| 1467 | m_viewportSize = size; | - | ||||||||||||
| 1468 | } | - | ||||||||||||
| 1469 | - | |||||||||||||
| 1470 | - | |||||||||||||
| 1471 | - | |||||||||||||
| 1472 | - | |||||||||||||
| 1473 | - | |||||||||||||
| 1474 | - | |||||||||||||
| 1475 | void QScrollPrepareEvent::setContentPosRange(const QRectF &rect) | - | ||||||||||||
| 1476 | { | - | ||||||||||||
| 1477 | m_contentPosRange = rect; | - | ||||||||||||
| 1478 | } | - | ||||||||||||
| 1479 | - | |||||||||||||
| 1480 | - | |||||||||||||
| 1481 | - | |||||||||||||
| 1482 | - | |||||||||||||
| 1483 | - | |||||||||||||
| 1484 | - | |||||||||||||
| 1485 | void QScrollPrepareEvent::setContentPos(const QPointF &pos) | - | ||||||||||||
| 1486 | { | - | ||||||||||||
| 1487 | m_contentPos = pos; | - | ||||||||||||
| 1488 | } | - | ||||||||||||
| 1489 | QScrollEvent::QScrollEvent(const QPointF &contentPos, const QPointF &overshootDistance, ScrollState scrollState) | - | ||||||||||||
| 1490 | : QEvent(QEvent::Scroll), m_contentPos(contentPos), m_overshoot(overshootDistance), m_state(scrollState) | - | ||||||||||||
| 1491 | { | - | ||||||||||||
| 1492 | } | - | ||||||||||||
| 1493 | - | |||||||||||||
| 1494 | - | |||||||||||||
| 1495 | - | |||||||||||||
| 1496 | - | |||||||||||||
| 1497 | QScrollEvent::~QScrollEvent() | - | ||||||||||||
| 1498 | { | - | ||||||||||||
| 1499 | } | - | ||||||||||||
| 1500 | - | |||||||||||||
| 1501 | - | |||||||||||||
| 1502 | - | |||||||||||||
| 1503 | - | |||||||||||||
| 1504 | QPointF QScrollEvent::contentPos() const | - | ||||||||||||
| 1505 | { | - | ||||||||||||
| 1506 | return m_contentPos; | - | ||||||||||||
| 1507 | } | - | ||||||||||||
| 1508 | - | |||||||||||||
| 1509 | - | |||||||||||||
| 1510 | - | |||||||||||||
| 1511 | - | |||||||||||||
| 1512 | - | |||||||||||||
| 1513 | - | |||||||||||||
| 1514 | - | |||||||||||||
| 1515 | QPointF QScrollEvent::overshootDistance() const | - | ||||||||||||
| 1516 | { | - | ||||||||||||
| 1517 | return m_overshoot; | - | ||||||||||||
| 1518 | } | - | ||||||||||||
| 1519 | QScrollEvent::ScrollState QScrollEvent::scrollState() const | - | ||||||||||||
| 1520 | { | - | ||||||||||||
| 1521 | return m_state; | - | ||||||||||||
| 1522 | } | - | ||||||||||||
| 1523 | - | |||||||||||||
| 1524 | - | |||||||||||||
| 1525 | - | |||||||||||||
| 1526 | - | |||||||||||||
| 1527 | - | |||||||||||||
| 1528 | QScreenOrientationChangeEvent::QScreenOrientationChangeEvent(QScreen *screen, Qt::ScreenOrientation screenOrientation) | - | ||||||||||||
| 1529 | : QEvent(QEvent::OrientationChange), m_screen(screen), m_orientation(screenOrientation) | - | ||||||||||||
| 1530 | { | - | ||||||||||||
| 1531 | } | - | ||||||||||||
| 1532 | - | |||||||||||||
| 1533 | - | |||||||||||||
| 1534 | - | |||||||||||||
| 1535 | - | |||||||||||||
| 1536 | QScreenOrientationChangeEvent::~QScreenOrientationChangeEvent() | - | ||||||||||||
| 1537 | { | - | ||||||||||||
| 1538 | } | - | ||||||||||||
| 1539 | - | |||||||||||||
| 1540 | - | |||||||||||||
| 1541 | - | |||||||||||||
| 1542 | - | |||||||||||||
| 1543 | QScreen *QScreenOrientationChangeEvent::screen() const | - | ||||||||||||
| 1544 | { | - | ||||||||||||
| 1545 | return m_screen; | - | ||||||||||||
| 1546 | } | - | ||||||||||||
| 1547 | - | |||||||||||||
| 1548 | - | |||||||||||||
| 1549 | - | |||||||||||||
| 1550 | - | |||||||||||||
| 1551 | Qt::ScreenOrientation QScreenOrientationChangeEvent::orientation() const | - | ||||||||||||
| 1552 | { | - | ||||||||||||
| 1553 | return m_orientation; | - | ||||||||||||
| 1554 | } | - | ||||||||||||
| 1555 | - | |||||||||||||
| 1556 | - | |||||||||||||
| 1557 | - | |||||||||||||
| 1558 | - | |||||||||||||
| 1559 | - | |||||||||||||
| 1560 | QApplicationStateChangeEvent::QApplicationStateChangeEvent(Qt::ApplicationState applicationState) | - | ||||||||||||
| 1561 | : QEvent(QEvent::ApplicationStateChange), m_applicationState(applicationState) | - | ||||||||||||
| 1562 | { | - | ||||||||||||
| 1563 | } | - | ||||||||||||
| 1564 | - | |||||||||||||
| 1565 | - | |||||||||||||
| 1566 | - | |||||||||||||
| 1567 | - | |||||||||||||
| 1568 | Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const | - | ||||||||||||
| 1569 | { | - | ||||||||||||
| 1570 | return m_applicationState; | - | ||||||||||||
| 1571 | } | - | ||||||||||||
| 1572 | - | |||||||||||||
| 1573 | - | |||||||||||||
| Switch to Source code | Preprocessed file |