summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
Commit message (Collapse)AuthorAgeFilesLines
* Silence warning from syncqtUlf Hermann2016-09-151-1/+1
| | | | | | | | | Apparently syncqt considers anything like "<blah.h>" to be an include statement, even if it's in a comment. Yet, in fact, the comment was not entirely correct here. Change-Id: I7a661007ee86bb20242d54eb128c6b646cac15e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-261-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | * Work around ICC bug about shadowing declarations that aren't shadowingThiago Macieira2016-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known ICC bug, still present in version 17 beta. qdatetime.h(126): error #3280: declaration hides member "QDate::jd" (declared at line 136) Obviously a parameter to static function or to a function in a nested class can't shadow an NSDM. Intel issue IDs: 0000698329 / DPD200245740 Change-Id: I149e0540c00745fe8119fffd1463c679a3a9c8c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add helper function to reset QMouseEvent localPosFrederik Gladhorn2016-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick there are many places which copy mouse events repeatedly, with the only goal of adjusting the local position. Instead it's much more sensible to re-use the same event. Change-Id: I2c6f2b73ee3a7a6df489f813cf2f60b48a6e48df Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QPointerUniqueId::numeric() is constShawn Rutledge2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Obviously it returns a copy of the number, and anyone who has a const QPointerUniqueId variable will need this accessor to be const. Change-Id: Ib224a4dfca5d0f71f2fa4f6f6197b2fb2cdb9410 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QTouchEvent: add uniqueId and rotation; TUIO: support fiducial tokensShawn Rutledge2016-04-071-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TUIO supports tracking tagged physical objects on touchscreens by various means (QR codes, RFIDs etc.) It can detect both position and rotation. Likewise, it may be possible for some touchscreens or drivers to detect orientation of the fingers. So, just as QTabletEvent has rotation, each touchpoint needs to include the rotation value. When using tokens, each object has a permanent unique ID, whereas QTouchEvent::TouchPoint::id() is a transient ID which usually auto- increments each time a finger is pressed to the device. So we need to make that available too, to identify each token. Different platforms may use different kinds of IDs (int, UUID, QR code etc.); however for TUIO 1.x, the unique IDs are just 32-bit integers. QPointerUniqueId is added, storing only a qint64 for now (like QTabletEvent::uniqueId()) but able to be expanded as necessary later on. Task-number: QTBUG-51844 Change-Id: I04182042f47fa2954728079139a4664a31184b54 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-221-1/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/wince/qplatformdefs.h src/plugins/platforms/directfb/qdirectfbbackingstore.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
| * | Add QWheelEvent::inverted()Morten Johan Sørvig2016-03-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some consumers of wheel events need to know if the scrolling direction is inverted in order to provide consistent behavior. For example, the scrolling direction of a horizontal slider should not change when the user toggles the "natural scrolling" setting on OS X. In this case the inverted bit will change state and the slider can compensate. This change adds a bit to QWheelEvent and sets it on OS X. Task-number: QTBUG-35972 Change-Id: I221435dea45d436d570b113bd0e24ee6f6832211 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * | QtGui: mark some more types as movable/primitiveMarc Mutz2016-03-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are already held in QVectors. Public API types need to wait until Qt 6, for BC reasons. Even though Q_RELOCATABLE_TYPE deals with most of them, we lack a way to mark a type as primitive, but still isStatic - for QList. Change-Id: I91392b01ae6f94cc847007636e12d4e64c43b2bc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-011-0/+2
|\| | | | | | | | | | | Change-Id: Ic7aaa06f4a14b1aed61faa1a6e7f527ee0eeb96b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-291-0/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qprocess/tst_qprocess.cpp Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
| | * Track target widget when wheel events are receivedGabriel de Dietrich2016-02-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue is reproducible on OS X when using a Magic Mouse or a combination of Magic Trackpad and regular mouse. In these cases it's possible to start a scrolling gesture on one widget and move the mouse cursor over another widget. Although we send the wheel event phase information, we never made any use of it. This means that a widget would start scrolling even though it never received a ScrollBegin event. In this patch, we make sure the scrolling cycle is respected and that once a widget starts scrolling, it'll be recieving all the wheel events until a ScrollEnd event reaches the application. For those input devices not supporting a proper phase cycle, we introduce a new (undocumented) phase value, NoScrollPhase. If the wheel event phase is NoScrollPhase, then we ignore the current scroll widget and proceed as usual. This value is the default for wheel events. It's up to the platform plugin to set the proper phase value according to the data received from the OS. Finally, we fix a few of QWheelEvent constructors to properly initialize the phase and source properties. Task-number: QTBUG-50199 Change-Id: I3773729a9c757e2d2fcc5100dcd79f0ed26cb808 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-02-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module.prf src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm Change-Id: I7912c23b02b186831f0e465dbe5d1f9936205439
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| | * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or similar. This amends previous commits that converted the majority of cases. Task-number: QTBUG-45291 Change-Id: I219cdeddca7063a56efeb4fee0e5bb2cbdc7732b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QInputMethodEvent::Attribute: add ctor that doesn't take a QVariantMarc Mutz2016-02-201-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | Many callers passed QVariant() as the last ctor argument. Micro-optimize by providing an overload that default- constructs the variant in-place. Change-Id: I9aab40c6e5a025c9a502c706e4cc7b10879ac418 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QGraphicsScene: prevent lots of detaching d/t editing of copiesMarc Mutz2015-12-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTouchEvent::touchPoints() returns a const-&, but the old code took a copy, over which it then iterated, modifying the touch points, causing (necessary) detaches of both the list and the touch points. Befriend QTouchEvent and modify the list in-place, avoiding all detaches in the likely case that QTouchPoint contains the only copy of the touch point list. This is all the more important as the function is called once for every item-under-mouse in sendTouchBeginEvent(). Port to C++11 range-for as a drive-by. Change-Id: I2f74d19845711d97e3566886123b5d18d55db74c Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | qevent.h: Add fixme comments to remove include directives for Qt 6.Friedemann Kleint2015-10-021-5/+4
|/ | | | | | | | Mark include directives in qevent.h for removal and preemptively add missing headers in code base. Change-Id: I81011d7bfad4a09d80deeda6d1bed67b5c0e63c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtGui: Pass types with copy-ctor or dtor by const-refSérgio Martins2015-07-191-1/+1
| | | | | | | | | ... except if the function is a ctor, callers pass rvalues, and the type has a fast move ctor. In that case, keep passing by-value and qMove() into place. Change-Id: I2c0be7d4436327834ddee0531c51c5af352ac74c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix nullptr literal 0s which would look odd as nullptrMarc Mutz2015-07-191-1/+1
| | | | | | | | | | | | | These all invoke the QFlags<>(Zero *) ctor, which is designed to accept a 0, but no other int. But in doing so, it requires passing a nullptr literal, and 0 is not a nullptr literal accepted under -Wzero-as-null-pointer-constant or similar warnings. Fix by using the QFlags::QFlags() ctor instead. Task-number: QTBUG-45291 Change-Id: I73f9c9f4de11eeb1ba04ace6c7121d17510ea29f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtGui: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-191-2/+2
| | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I72ab40b21a9499b53a639564fa45884de17b6c98 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devSimon Hausmann2015-06-041-3/+6
|\
| * Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-3/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| | * Add noexcept to move constructors and assignment operatorsAllan Sandfeld Jensen2015-05-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the noexcept attribute to all move constructors and assignment operators in QtGui that didn't already have it. Change-Id: Idcdf79ae8349b8793e7394b5ae7c08e6111fbc9a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | De-duplicate vtables, part II: exported public classesMarc Mutz2015-06-031-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. In this second and last batch, we de-inline destructors of exported public classes. Since they are already exported, users of these classes are unaffected by the change, but since it's public API, and the dtors may have been de-virtualized and inlined into application code, we need to avoid adding code to the out-of-line destructor until Qt 6. Change-Id: Ieda9553cb4b0dae7217c37cc7cde321dd7302122 Reported-by: Volker Krause <volker.krause@kdab.com> Task-number: QTBUG-45582 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* / QMouseEvent: add constructor which takes the source as a parameterAlexander Volkov2015-05-121-0/+3
|/ | | | | | | | | Simplify the code by passing the source of a mouse event directly to the constructor instead of setting it by QGuiApplicationPrivate::setMouseEventSource(). Change-Id: I1774cf39a211d36d3adf0ff30f3bd2fb7c5fb429 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QtGui: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-081-2/+2
| | | | | Change-Id: I92ac2ea218e9134aa36ecb179b8ae790a2dba56a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add QWheelEvent::sourceShawn Rutledge2015-01-131-2/+7
| | | | | | | | | | | | This is analogous to 0a92295ca829a62125c9f122fd3daec991993855 which added QMouseEvent::source. For now, we say that a wheel event is synthetic when it comes from a trackpad or other device that provides scrolling by some means other than an actual wheel. Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Send events when platform surfaces are created/about to be destroyedSean Harmer2014-11-171-0/+17
| | | | | | | | | | | | | These synchronously delivered events allow applications to correctly and conveniently handle native platform surfaces being destroyed. This is particularly useful when doing rendering on a non-gui thread as it allows to shutdown rendering before the native surface gets destroyed from under us. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: I63f41bbdb32f281d0f3b8ec2537eb2b0361f3bb3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-19/+11
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | QWheelEvent: make magic number 120 a symbolic constantMarc Mutz2014-09-121-0/+2
|/ | | | | | | | | The documentation states that 120 is the value users of the event should use to determine one full step of the wheel. Provide that number as a symbolic constant. Change-Id: I0da0cdd8328a476538080b7276d02863906ea53f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add debug operator for QTouchEvent::TouchPointShawn Rutledge2014-08-061-0/+4
| | | | | | | | | | dfde72e4361d82a782cb4da08ddcd0d8e8c40b07 added debug support for QWindowSystemInterface::TouchPoint, which is useful only near the QPA interface; but in qtdeclarative it's useful to be able to log individual touch points too. Change-Id: I237d354d7018e6326e586ae3355c8aa6f781eff8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Improve qDebug output for QTabletEventShawn Rutledge2014-08-051-0/+7
| | | | | Change-Id: Ic2819eaa5ed0e3666062f00994b72dee0b2cba66 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* add buttons to QTabletEventShawn Rutledge2014-07-281-4/+10
| | | | | | | | | | | | | Until now, it has been necessary for tablet-oriented applications which care about multi-button styli to reject each tablet event and wait for the mouse event in order to know which buttons are pressed. This patch adds the new API and also the X11/xcb implementation. [ChangeLog][QtCore][Tablet support] Added buttons to QTabletEvent Task-number: QTBUG-39458 Change-Id: If2c9ec1ceacc1700a82686c5fc6f568f9111055a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove unnecessary friend declarations from qevent.h.Friedemann Kleint2014-05-151-5/+0
| | | | | Change-Id: Iec35b94f3898004850a076d4760d675248246ea7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* If DblClick, do not deliver 'duplicated' MouseButtonPressRick Stockton2014-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | QWidgetWIndow: In Qt4, when Qt created a MouseButtonDblClick event, Qt would consume the causing MouseButtonPress. It would send only the derived dblclick event to widget windows and their children. This change makes Qt5.3 and higher emulate Qt4 delivery of double click-related events to widget windows and their children. QML objects (e.g. mousearea) continue to receive the second MouseButtonPress. [ChangeLog][QtGui][QWidget] MouseButtonDblClick: Do not send the 2nd MouseButtonPress event to Widgets. Restore Qt4 behavior in sequence of mouse events delivered to widget windows and their children. Task-number: QTBUG-25831 Change-Id: Iff0f9c592bceacb2ca844d30f8180081e136a889 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-241-0/+28
|\ | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * Implement native gestures on OS X.Morten Johan Sørvig2013-10-171-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QWindowSystemInterface::GestureEvent and QNativeGestureEvent to QtGui. These events are copies of Qt4's QNativeGestureEvent, where it was an implementation detail of QGestureManager. Add gesture message handlers to QNSView and bring back the Mac gesture recognizers for QGestureManager. Task-number: QTBUG-28126 Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Relay mouse event synthesization informationLaszlo Agocs2013-10-041-0/+2
|/ | | | | | | | | | | | | | | | | Make platform plugins, like the windows one, able to indicate if a mouse event is synthesized from a touch event by the OS. This will be valuable information for the Quick2 event handlers. No new member variables are added to QMouseEvent. Instead, the enum value is encoded in the caps member, there are plenty of bits available in it. This introduces Qt::MouseEventSource and QMouseEvent::source() as public APIs. Change-Id: If087a0bafb33a6cd7891bd07b84871358f6aba69 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Replace QWheelEvent::Phase with revised Qt::ScrollPhaseJ-P Nurmi2013-08-151-4/+2
| | | | | Change-Id: I4d8e7d48497d0d96a297191976c0d99feb67b538 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Introduce QWheelEvent::Phase (Begin, Changed, Ended)J-P Nurmi2013-08-081-1/+10
| | | | | | | | | | | | | | Some platforms (read: OS X) send wheel events without delta to indicate that scrolling is about to start or has ended. Currently, Qt simply ignores wheel events that have no delta. This change introduces a new QWheelEvent attribute that specifies the phase, and makes it possible to receive the special wheel events in started/ended phases. These events are required for implementing correctly behaving transient scrollbars. Change-Id: Ib8ce0d9ce9be63b2ad60aa7b0aaa1f12ef6cad09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix warning caused by warning fixThiago Macieira2013-07-011-7/+0
| | | | | | | | | | qevent.h:865:36: error: unknown warning group '-Wunused-private-field', ignored [-Werror,-Wunknown-pragmas] Instead, just use Q_UNUSED() like I've done for the other unused members. Change-Id: I3adeb06937cee8b8ac24a1d5081be03931ac98b7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add note to remove unused private field.Stephen Kelly2013-06-191-1/+8
| | | | | Change-Id: I33c831de1eb6b687a9c033f83bc266bd33a3540e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* ApplicationState: Add new event class: ApplicationStateChangeEventRichard Moe Gustavsen2013-04-031-0/+10
| | | | | | | | | | | This patch will follow up on e27ca37 (add more state to QT::ApplicationState), and add a new event class QApplicationStateChangeEvent with type Qt::ApplicationStateChange. Change-Id: Idee724f181f1fbb2321ddad7e0df00c88b3488b1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>