summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* QGuiApplication::focusObject() to replace QInputPanel::inputItem()Pekka Vuorela2012-01-271-0/+27
| | | | | | | | | | | * Deprecated QInputPanel::inputWindow() which is already just returning QGuiApplication::activeWindow() * Deprecated QInputPanel::inputItem() and introduced QGuiApplication::focusObject(). Input methods can check input method support by Qt::ImEnabled query. Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-241-3/+18
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix synthesizing mouse events when touches change orderingLaszlo Agocs2012-01-231-5/+17
| | | | | | | | | | | | | | There is no guarantee the touches will be listed in the same order in an update: the platform/generic plug-in, the drivers, etc. are all free to shuffle the list of touch points in each report (even though the order is fairly stable with most systems). Therefore, to be safe, move and release events should be generated not from the first point in the list but from the one with the matching id. Change-Id: I6615224cbf2cfdc440143eb3191482a23d85c6a4 Reviewed-by: Samuel Rødal <samuel.rodal@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>
* Allow generic plugins to set defaults for window system propertiesSimon Hausmann2012-01-201-2/+2
| | | | | | | | | | | | | In order for generic plugins to set defaults on "startup" time - such as the meego integration plugin to set the correct screen orientation - it is necessary to construct the plugins when the application startup is done. Then the plugin can "inject" the values the usual way, using QWindowSystemInterface::handle*Change. Afterwards we need to process those events - take them from the window system event queue and let QGuiApplication process them. Change-Id: I84de022ad565a33ae3ef5dfc34f540d6bf488b03 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move keyboardInput data back to QApplicationPekka Vuorela2012-01-171-22/+0
| | | | | | | | | Deprecated interface, rest of Qt now adapted to QInputPanel. Change-Id: Iacbbcac90dd7c037a24b45df1ee868f04090b21b Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-131-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add setPalette to QGuiApplicationLars Knoll2012-01-121-0/+10
| | | | | | | | If we have a getter, we also need the setter to be symmetric. Change-Id: Ibcb20d66c711e4c1bebd448781fa9eddb9cd773f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Made it possible to report screen changes through QWindowSystemInterface.Samuel Rødal2012-01-121-0/+6
| | | | | | | | | | This makes it possible for platform plugin independent code (such as generic plugins) to report changes to screen properties. An example would be an accelerometer plugin that reports orientation changes without knowing anything about the windowing system. Change-Id: I984984b6d064327772c264bc942269422451da37 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Move keyboard locale and input direction to QInputPanelPekka Vuorela2012-01-071-9/+6
| | | | | | | | | | Deprecated QGuiApplication::keyboardInputLocale() and keyboardInputDirection(), introduced QInputPanel::locale() and inputDirection(). Change-Id: Ic48c77f10821a949751c73c73f22bd78e2192b9c Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* Send ApplicationActivate and ApplicationDeactivate from QtGui.Samuel Rødal2012-01-021-5/+10
| | | | | | | | | | Instead of only from QApplication in QtWidgets, as we need these events for example in QDeclarativeApplication. Task-number: QTBUG-21573 Task-number: QTBUG-23331 Change-Id: I0c960bd1c7911d306d274a6e9a1838f158235ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
* Mac: Add temporary solution to fix app deployment.Morten Johan Sorvig2011-12-221-0/+10
| | | | | | | | | | Look for the the platform plugin in "../Plugins" first. When deployed inside an app bundle this path will point to the plugin directory inside the app bundle. Change-Id: I362981a9e0ca9a3e69396b033a571d0b4e2bf78a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove redundant touch processing in QtGui and widgets.Laszlo Agocs2011-12-141-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The duplicated hash tables in QGuiApplicationPrivate and QApplicationPrivate are now unified into one single hash table in QGuiApplicationPrivate. This also reduced the number of lookups. The extra processing needed to keep the touch points' first/lastPos values in sync is now done only once, in QGuiApplication. This eliminates the performance penalty (for widget-based apps) that was introduced during the QPA migration. As an added bonus the patch adds support for touch events arriving simultaenously from multiple devices. This was broken before: As there is no guarantee that two devices/drivers will not send touch points with the same ID, using structures with only the ID as key is wrong. The proper key is composed of the device ID (that is, a QTouchDevice pointer) and the touch point ID. The exported internal function qt_translateRawTouchEvent() has been removed. This function cannot work properly in the QPA world: It injected touches into the widget subsystem (QApplication) only which is wrong, and would result in half-filled touch events due to not routing the injected data through QGuiApplication. Autotests using this function are migrated to QWindowSystemInterface::handleTouchEvent(). Change-Id: I7632781d77f9e0ac4626fd7c9933511c94492156 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make QApplication::type() set by QGuiApplication.Frederik Gladhorn2011-12-121-0/+1
| | | | | | | | | | | | | | | QApplication::type used to be static and set by the QApplicationPrivate constructors. In QCoreApplication we have the new application_type that should take its place. QApplication::GuiServer is deprecated (since it doesn't have any functionallity any more with QWS being removed). This change prepares QStyle to be called from a QQuickCanvase based application that does not inherit the QWidget version of QApplication. Change-Id: Ifbe992e25f1e5821fa047b6eb915f75fa675ab97 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Store the primary status in the touch point flags.Laszlo Agocs2011-12-121-3/+1
| | | | | | | | | | | | | | | | | 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>
* Extend touch events.Laszlo Agocs2011-12-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.Jędrzej Nowacki2011-12-011-2/+2
| | | | | | | | | | | | | By adding anonymous namespace and static linkage we are reducing visibility of implementation of these macros. This patch also fixes warning about a declared but unused variable which was issued by gcc 4.6 for Q_CONSTRUCTOR_FUNCTION. Change-Id: I2cb70ad4c93f6f77e5518420abcce6fd4cadccfa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Added QPA window system interface handler for logical DPI changes.Samuel Rødal2011-12-011-3/+20
| | | | | | | | Logical DPI is independent from geometry and physical DPI. Change-Id: Ice487f61e1bda9e6791e2adf6998ebf61cdbaef2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Made more QScreen properties NOTIFY and added average DPI properties.Samuel Rødal2011-11-301-2/+26
| | | | | | | | | The physicalDotsPerInch() is the average of the horizontal and vertical physical dots per inch, and likewise logicalDotsPerInch() is the average of the horizontal and vertical logical dots per inch. Change-Id: I18aa610dc9a63efe062f78c823ba29f90b2712f4 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* emit width/height changes for the new rectGunnar Sletta2011-11-241-4/+4
| | | | | Change-Id: I789a45bc60aaa949d18e9fb72a186a259548ec1d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add some properties to QWindowAlan Alpert2011-11-221-0/+10
| | | | | | | | x,y,width,height,visible and orientation Includes slot setters and notify signals for maximal QML compatibility. Change-Id: I124399093c00f8ad1485d4fbae816dfbe3027eff Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Pass all key events through the shortcutmapLars Knoll2011-11-211-12/+16
| | | | | | | This has to happen in QGuiApp, not QApp. Change-Id: If8a6e81df3ae9b601733d077cce57d2d21572f74 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qtbase: Warnings fixes.Friedemann Kleint2011-11-181-1/+1
| | | | | Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Support 31 mouse buttons (with platform plugins xcb and xlib).Rick Stockton2011-11-141-4/+4
| | | | | | | | | | | | | This commit includes changes for mouse button support within the XCB and XLIB platform plugins. Support in other platform plugins will be added in the future. The namespace update is prerequisite to compile the the Plugins, and the update in qguiapplication.cpp is required for the enhancements to actually work. Task-number: QTBUG-22642 Change-Id: Ie18fca3b9c86d0b6abbf2103a4f8582e6ce83e7d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Factor out QPlatformTheme from QPlatformPlugin.Friedemann Kleint2011-11-111-0/+21
| | | | | | | | | | | | | | | | | | Implement QCocoaPlatformTheme. The menus and dialog API is moved from the platform to the theme plugin. (Both APIs contain references to QtWidget classes, which we are working towards removing.) The theme plugin is created after the platform plugin, first by asking the platform plugin, then by looking for a separate plugin if the platform does not specify a theme. Initial-patch-by: Morten Sorvig <msorvig@trolltech.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I2778cdd3a205c4ce35ead93e39fe6b4cd58a39f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Do not call setCursor on Desktop or if there is no platform window.Friedemann Kleint2011-10-271-4/+10
| | | | | | | Fix a crash on Windows. Change-Id: I2b88e113d7149444ebc8946c0ee0eba7a9b5bbc2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtGui: Remove Q_WS and qpa.Friedemann Kleint2011-10-251-2/+1
| | | | | | | | | Enable compilation without -qpa. Remove QT_NO_FREETYPE and QT_NO_FONTCONFIG when building. Change-Id: I0e017cc47ee06b885be65deaeb67a449a119b8be Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Destroy generic plugins on exit.Laszlo Agocs2011-10-191-0/+8
| | | | | Change-Id: I9037cabae74f9a7d8743630d0f530aaa1593266f Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fix TouchPoint::lastPos() after TouchPointStationary only events.Jocelyn Turcotte2011-10-171-1/+5
| | | | | | | | | | | | | | | | | lastPos is copied from the last point's position, and the position has to be resolved according the the receiving item's transformation. However, if a QTouchEvent contains only stationary points, it won't be delivered, it's pos()/rect() will still be uninitialized, and the touch point of the next event will be delivered with the uninitialized pos() as it's lastPos(). This patch makes sure that the lastPos() won't be filled with a previous incomplete stationary point state even if the platform is sending us stationary-point-only touch events. Change-Id: Ia7d10423c8fbe78348edbb0a89fbfa66d1b8b5d1 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.Friedemann Kleint2011-10-131-115/+0
| | | | | | Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added Orientation API to QScreen and QWindow.Samuel Rødal2011-10-071-8/+12
| | | | | | | | | | | | QScreen now has a primary and current orientation, and a QWindow can set its orientation as well. The current screen orientation is just a hint to the application. Change-Id: I4635982cfac2d16634d4edd5c6ab78e9d0ac55a4 Reviewed-on: http://codereview.qt-project.org/5988 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QMouse/Wheel/TouchEvent::modifiers with the XCB back-endSimon Hausmann2011-10-071-4/+4
| | | | | | | | | | | | The modifiers are provided by X and need to be propagated through the QWindowSystemInterface. Change-Id: I127d0b6e9918b558ca15d9302c4cc0cbd94eb757 Reviewed-on: http://codereview.qt-project.org/6244 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Sanity-Review: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Don't default to XCB if it is not enabled.Lincoln Ramsay2011-10-071-1/+5
| | | | | | | | | | | Default to wayland unless it's not enabled. Default to minimal otherwise. Change-Id: I0fa523eae395821a7cb0cabbb27ca073e594246f Reviewed-on: http://codereview.qt-project.org/5945 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtGui: Add command line arguments to the platform plugin.Friedemann Kleint2011-10-051-1/+27
| | | | | | | | | | | Set -platformargument foo[=bar] as a dynamic property on the native interface. Change-Id: Ica8b25478da0ce9508b90370f15812fd11ff5d13 Reviewed-on: http://codereview.qt-project.org/6031 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added QWindow::isActive() and focus in / out events.Samuel Rødal2011-10-051-5/+17
| | | | | | | | | | | Renamed QGuiApplication::activeWindow() to QGuiApplication::focusWindow(), implemented QWindow::isActive() as a style hint, and added focus in / out events. Change-Id: I71866e76c5a817def3e17bcc20a4fc32081a0e7a Reviewed-on: http://codereview.qt-project.org/5811 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Send key events to the active window when tlw in qpa event is nullLaszlo Agocs2011-09-291-0/+2
| | | | | | | Change-Id: Ie055918276d716b0f4f23b6a9d34c23c5459d960 Reviewed-on: http://codereview.qt-project.org/5777 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Implement support for QGuiApp::setOverrideCursor()Lars Knoll2011-09-281-5/+54
| | | | | | | | | | Properly support application override cursors and move the documentation into the proper place. Change-Id: I0198b38e0d2e7b10f0fcae342b468e7f8341bf02 Reviewed-on: http://codereview.qt-project.org/5562 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fixed geometry issues.Samuel Rødal2011-09-231-5/+4
| | | | | | | | | | | We need to compare against the window's currently known geometry to know when to send resize and move events. Also make sure at least one resize event is sent, instead of sending one before each expose. Change-Id: Id7ebe4c1c0e723af9198c668a0c736d64efdbf3e Reviewed-on: http://codereview.qt-project.org/5364 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-151-17/+17
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make QKeySequence work on Mac.Morten Sorvig2011-09-081-1/+1
| | | | | | | | | Replace WS_MAC with OS_MAC. Change-Id: I28a7f7cb65b61f00a3a12f3b257a553b511f85af Reviewed-on: http://codereview.qt-project.org/4353 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Refactor the input frameworkLars Knoll2011-09-071-1/+23
| | | | | | | | | | | | | | | | Results of the ongoing workshop in Oslo: QInputPanel will be the application facing interface for controlling the input context as well as querying things like the position of the virtual keyboard. QInputContext is significantly cleaned up and only there as a compatibility API for existing code. Change-Id: Ie8e2ee480930763f414bfaae63247b1fb6500c82 Reviewed-on: http://codereview.qt.nokia.com/4357 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Vesa Rantanen <vesa.rantanen@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* send resize event when window resizedMatthew Cattell2011-09-071-2/+8
| | | | | | | Change-Id: I4415f1dbdf9bcc96dda10d00c8982a9d4ee433c4 Reviewed-on: http://codereview.qt.nokia.com/4344 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add timestamp to QInputEvent.Laszlo Agocs2011-09-051-0/+5
| | | | | | | | | | | | | | | | The mouse, touch, key events have no timestamp field currently, meaning that the timestamp passed to QWindowSystemInterface's handleMouse, Touch, KeyEvent functions will not be stored in the generated events. The timestamp can be quite valuable in some cases (e.g. when performing filtering of touch events) so losing this information is not desirable. The patch adds a timestamp field to QInputEvent, which is the base for mouse, touch, key, and other events, and also makes QGuiApplication to store the timestamp in the generated events. Change-Id: Icb9de8b238cb341916eac33ce21603f4955baca7 Reviewed-on: http://codereview.qt.nokia.com/4196 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Refactor QMouseEvent to contain the position inside the windowLars Knoll2011-09-011-1/+1
| | | | | | | | | | | | | | Rename the default accessors for positions to localPos, windowPos and screenPos, to be explicit about their use. Introduce a QT_NO_INTEGER_EVENT_COORDINATES define so one can make sure to always use the float based coordinates. Fixup all Qt code to use the correct constructor that specifies all three coordinates. Change-Id: If4bb93b8d1e2eb2440260d99680c468706cfe68f Reviewed-on: http://codereview.qt.nokia.com/4058 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Initialize member variableLars Knoll2011-08-311-1/+2
| | | | | | Change-Id: I165c267b87dc201ed4970d50e39ff7421cbef35f Reviewed-on: http://codereview.qt.nokia.com/3981 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add a QStyleHints class to QtGuiLars Knoll2011-08-311-23/+26
| | | | | | | | | This class encapsulates platform specific style hints like doubleClickInterval or cursorFlashTime. Change-Id: I0d88c47a59d564d8d346642184e5b14e1864cf40 Reviewed-on: http://codereview.qt.nokia.com/3927 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Touch event support for QWindow.Laszlo Agocs2011-08-311-2/+140
| | | | | | Change-Id: I83ddc48a9093856d975b25f0426db96264afeeef Reviewed-on: http://codereview.qt.nokia.com/3920 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* pick up the target window for a mouse event when none is specifiedGunnar Sletta2011-08-301-3/+3
| | | | | | | Change-Id: Iae0402f63f39a2728b94abe68fa22592d97ea9f3 Reviewed-on: http://codereview.qt.nokia.com/3885 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>