summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix a few qdoc command typosJeremy Katz2012-08-011-2/+2
| | | | | Change-Id: I5eb3a6d2bb7939f001f1fcb836660dd46a47c350 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-011-1/+1
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* replace \key and \gui qdoc commands with \uicontrolJeremy Katz2012-08-011-4/+4
| | | | | Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove deprecated tentative commit from QInputMethodEventPekka Vuorela2012-06-281-19/+0
| | | | | | Introduced and deprecated during Qt5 development. Change-Id: I5bceefcb5dfc13f8eae2ad22f04feeea5f87dcb3 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-0/+31
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clarify QTouchEvent docsLaszlo Agocs2012-06-121-0/+9
| | | | | | | | | Mention something about touch handling with QWindow and document the non-partialness of touch events which has been taken for granted since 4.6, but has not been documented at all. Change-Id: I9ec75f74153bbc28e146b000d70fb26384e497a3 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QUpdateEvent from the public headersLars Knoll2012-05-301-9/+0
| | | | | | | | | It's only used internally in qwidget, so it might as well live in qwidget_p.h. Task-number: QTBUG-25070, QTBUG-25373 Change-Id: I87770e0b49253b4bdebe90ce84dd42448d6175bd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Ask the platform drag for the correct default drag actionLars Knoll2012-05-291-1/+3
| | | | | | | | | | This fixes a remaining feature regression from Qt 4.x, where the dragmanager also determined the default action for a drag given the set of supported actions and the keyboard modifiers. Task-number: QTBUG-25373 Change-Id: I80b23b135ba218eb5b7ccc692f12140477bc7809 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add mouse event internal members needed by declarativeLaszlo Agocs2012-05-221-3/+3
| | | | | | | | | | | | In order to remove QQuickMouseEventEx we have to be able to store touch-related data, like capabilities and velocity, also in mouse events. However they should not be exposed through the public API in any way. (at least not in 5.0) Change-Id: I7774b9ea00074950208559463249fbdcaeeaefbf Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-33/+34
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Modularize QtGui documentation.Casper van Donderen2012-05-091-7/+7
| | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: I5f86f598fbe7c47d632c613b85d94ced89ba2c29 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-031-100/+19
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| * Stop using QEventPrivate::d in QWindowStateChangeEventThiago Macieira2012-04-201-11/+2
| | | | | | | | | | | | | | | | We can add a boolean and avoid using the d pointer (which QEvent now checks to be unused). Change-Id: I7367d5410d10ed06441fe9037cac0e3473d62498 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Remove private classes in QEvent-derived classes.Thiago Macieira2012-04-191-89/+17
| | | | | | | | | | | | | | | | | | | | | | QEventPrivate doesn't exist, so these classes were technically abusing the d pointer. Move the contents of the private classes into the main event classes. Change-Id: If2e894c1fa05f468221a0b43f3ebdf90769298eb Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Fix compilation of public headers with QT_NO_DEPRECATED definedOlivier Goffart2012-05-021-5/+2
| | | | | | | | | | | | | | | | | | | | Put the functions in QT_DEPRECATED_SINCE if possible QPluginLoader::staticInstances is not documented as deprecated, and do not reference any alternative use. So I unmarked it as deprecated. Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Remove internal QClipboardEventLaszlo Agocs2012-04-191-25/+0
|/ | | | | | | | | | | | This class is not in use with QPA. Also remove useless sending of QEvent::Clipboard from the QGuiApplication dtor. That event is not (cannot be) handled by the platform plugins and is not used at all. Perhaps it should be removed altogether from the public API. Change-Id: I478b31ff9875a8dfff99bddafd335ab02a5fe477 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Get rid of QKeyEventExThiago Macieira2012-04-051-57/+35
| | | | | | | | | | | | | | This class was added when we needed more information in QKeyEvent but couldn't extend it. And we couldn't use the d pointer because the copy constructor and copy assignment operators in QEvent were implicit. That is now fixed. But since this is Qt 5, we can change QKeyEvent to include the extra information. Task-number: QTBUG-25070 Change-Id: Iba4ac3378ca70583fcaa8caf96bca8ef75e30701 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Merge master into api_changesKent Hansen2012-03-231-0/+2
|\ | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * Deprecate QInputMethodEvent::setTentativeCommitString()Pekka Vuorela2012-03-231-0/+2
| | | | | | | | | | | | | | | | Free form tentative commit proved to require too much fiddling on rendered text vs. logical content. Needs simpler mechanism. Change-Id: Ia4e341abf342d25675fd1129efb11094dde410b2 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-161-7/+11
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * Add a note to QTouchEvent docs about empty touchpoint listsLaszlo Agocs2012-03-151-3/+4
| | | | | | | | | | Change-Id: I65e9e3ed2069d9194f5e70fb9731d605e0979e6d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Added missing \since 5.0 and tweaked some docs in QtGui.Samuel Rødal2012-03-151-4/+7
| | | | | | | | | | Change-Id: I91564f7a61962f97b9fb78c96d94d5695a3924db Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | {QTouchEvent,QWindowSystemInterface}::TouchPoint: replace QList<QPointF> ↵Marc Mutz2012-03-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | with QVector QPointF is in the category of types for which QList is needlessly inefficient (elements are copy-constructed onto the heap and held through pointers). Use a vector instead. This is consistent with the QPainter API. Change-Id: Ie3d6647e05b40a33a7bb0598cbbcde4676e00836 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesJoão Abecasis2012-03-081-1/+6
|\| | | | | | | Change-Id: I89dc2e193bd01624c1fb50484610d516e39b1538
| * Update QTouchEvent docs with regards to raw positionsLaszlo Agocs2012-03-051-1/+6
| | | | | | | | | | Change-Id: I2c955e42605c442793095d5ca27c34d7d87e08fb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | QTouchEvent::TouchPoint: make it a proper value classMarc Mutz2012-03-061-10/+9
|/ | | | | | | | | | | | | | This includes: - Marking it as Q_MOVABLE_TYPE - adding move ctor and move assignment operator - add member-swap - use the copy-swap idiom in the copy-assignment operator This required making the destructor safe for d == nullptr. Change-Id: I8a77ffcb8e4a395a7e103d1df610561b6ae4c001 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-22/+22
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't use deprecated QWheelEvent::delta()Morten Johan Sorvig2012-02-291-1/+3
| | | | | | | Replace with pixelDelta() and angleDelta(). Change-Id: Ie4b8b6fd39a5f8a28433554000940faef2f2542c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Refactor the QPA dnd interface.Friedemann Kleint2012-02-291-2/+3
| | | | | | | | | | | | | | | - Give QPlatformDrag a synchronous drag() function returning the Qt::DropAction - Move the base functionality for asynchronous event handling to the platformsupport library as QBasicDrag (extendable base class handling drag icon and providing new virtuals) and QSimpleDrag (sample implementation for drag within the Qt application). - Change the Windows implementation accordingly. - Change XCB to be based on QBasicDrag. - Clean up QDragManager. Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QWheelEvent high-resolution delta support.Morten Johan Sorvig2012-02-241-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support pixel-based deltas as well as sending dx and dy values in the same event. Keep source and behavior compatibility with Qt 4. New API: QPoint pixelDelta() const QPoint angleDelta() const Deprecate delta() and orientation(). Both pixel-based deltas and combined updates are necessary for smooth trackpad-based scrolling on OS X. Qt 4 compatible behavior is achieved by sending an extra wheel event in cases where the initial event has a combined dx and dy update. This extra event sends dx in delta() and orientation(), with pixelDelta() and angleDelta() set to null. Modify the Cocoa implementation to provide pixel deltas. It is expected that not all platforms can provide these. Angle deltas will always be available. Change-Id: I20c10f0df338ddcd6a3f7a4d40949ed5ae3b4795 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove use of Q_BROKEN_DEBUG_STREAM.Stephen Kelly2012-02-221-6/+0
| | | | | | | | No supported compiler defines it, and it was not used consistently so it didn't work anyway. Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add further theme hints to QPlatformTheme.Friedemann Kleint2012-02-221-1/+1
| | | | | | | | | | | | | | | | - Add hints for QDialog/QDialogButtonBox. - Add hint for available popup-menu area. - Add keyboard scheme hint replacing QGuiApplicationPrivate::currentKeyPlatform() Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Task-number: QTBUG-24204 Task-number: QTBUG-24315 Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add event type for TouchCancel.Laszlo Agocs2012-02-091-3/+9
| | | | | | Change-Id: Id8b68e5cb19a2a325139e3241647cc36581cf6f8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QInputContextPekka Vuorela2012-02-031-1/+1
| | | | | | | | | | This has only been around as compatibility interface for Qt4 but is now replaced by QPlatformInputContext. Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update wrong docs for TouchPoint::id().Laszlo Agocs2012-02-021-3/+2
| | | | | | | | What it states is simply not true, at least certainly not since QPA has been introduced. Change-Id: If8aa2120cf5fc9ca85f4f0e6832b2115a5b71fe1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make coordinates float based where it makes sense.Lars Knoll2012-01-251-4/+3
| | | | | | | | | Mouse and Hover events already use FP corrdinates. They also make sense for tablet and drop events. Task-number: QTBUG-20115 Change-Id: Iff35d1f468567bd5a37236853dbc7725a37d87f2 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove Symbian specific code from QtGui.Xizhi Zhu2012-01-241-3/+1
| | | | | Change-Id: I103abb545d1a5deed7d40c0b50fc3eff0c89d622 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-131-20/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current way we do it of having the platform or touch plugin send both mouse and touch events is not ideal. There's no good way to write an application that works sanely both on a touch-only device and on a desktop except by restricting yourself to only handling mouse events. If you try to handle touch events you don't get any events at all on desktop, and if you try to handle both, you end up getting duplicate events on touch devices. Instead, we should get rid of the code in the plugins that automatically sends mouse events translated from touch events. This change enables that by making the behaviour fully configurable in QtGui. Two new application attributes are added to explicitly say whether unhandled touch events should be sent as synthesized mouse events and vice versa, and no duplicates are automatically sent as the current situation. Synthesized mouse events are enabled by default. We also get rid of the QTouchEvent::TouchPoint::Primary flag, which was only used to signal that the windowing system automatically generated mouse events for that touch point. Now we only generate mouse events from the first touch point in the list. Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove non-const getters marked for elimination.Robin Burchell2011-12-271-31/+0
| | | | | | | These all have consted overloads, so there's no need for them. Change-Id: I3d4f63b8eb8f1b7df7fa772d6172e0a954184d24 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Store the primary status in the touch point flags.Laszlo Agocs2011-12-121-5/+2
| | | | | | | | | | | | | | | | | For some reason the primary bit has previously been encoded in the touch point state, even though it has nothing to do with the regular states like Pressed, Released, etc. The value is now stored in the recently introduced flags member of the touch points. This also reduces the need for error-prone internal masking of the state value. The structure used by QWindowSystemInterface::handleTouchEvent also becomes cleaner because the primary status can now be set in the flags member and the isPrimary bool can be dropped. Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QWidget dependency from QTouchEvent.Laszlo Agocs2011-12-091-10/+12
| | | | | | | QWidget *widget() is replaced with QObject *target(). Change-Id: Ib2c860480764410cf1527662e89f352ff688b32a Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Extend touch events.Laszlo Agocs2011-12-091-17/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability flags indicate which information is valid in the touch points. Previously there was no way to tell if e.g. the value returned by pressure() is actually the value provided by the driver/device or it is just something bogus due to pressure not being supported. The points' flags return information about the individual touch points. One use case is to differentiate between touches made by finger and pen. Velocity, if available, is now also exposed. Each touch point can now contain an additional list of "raw" positions. These points are not reported individually but are taken into account in some way by the underlying device and drivers to generate the final, "accurate" touch point. In case the underlying drivers expose these additional positions, they are made available in the lists returned by the touch points' rawScreenPosition(). The raw positions are only available in screen coordinates to prevent wasting time with mapping from global positions in applications that do not use this data. Instead, apps can query the QWindow to which the touch event was sent via QTouchEvent::window() and can call mapFromGlobal() manually if they need local raw positions. The capability and device type information is now held in a new QTouchDevice class. Each touch event will contain only a pointer to one of the global QTouchDevice instances. On top of type and capability, the new class also contains a name which can be used to differentiate between multiple touch input devices (i.e. to tell from which one a given QTouchEvent originates from). The introduction of QTouchDevice has three implications: The QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent need to be changed (to pass a QTouchDevice pointer instead of merely a device type value), and each platform or generic plug-in is now responsible for registering one or more devices using the new API QWindowSystemInterface::registerTouchDevice. Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Document QInputMethodQueryEvent classPekka Vuorela2011-11-101-8/+26
| | | | | Change-Id: I6e98f9e690b733a06ee165e5b01ab6a5a784791b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Support tentative commit string with input method.Pekka Vuorela2011-11-051-0/+19
| | | | | | | | | Tentative commit string allows input method to notify editor what is expected to be committed in the place of preedit. This commit adds such support in QLineEdit. Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-271-18/+18
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.Friedemann Kleint2011-10-131-45/+0
| | | | | | Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove stale documentation and fix qdoc errors.Casper van Donderen2011-10-111-150/+0
| | | | | | | Change-Id: I51bb0c52eb32d9d672d115f31b16d414f81708e2 Reviewed-on: http://codereview.qt-project.org/6433 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>