summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fixes in the multitouch handling.Denis Dzyubenko2009-11-181-0/+3
| | | | | | | | | | | | When filling in touch point data for delivering to widget don't use the setter methods to avoid unnecessary detaches. Making it not detach also allows not to re-calculate widget-relative start position and last position on each delivery step. Also use the QWeakPointer to store a pointer to a widget that expects to receive a touch event, so that if the widget is destroyed we'll get notified. Reviewed-by: Bradley T. Hughes
* Add support for GetURL events on Mac OS XTor Arne Vestbø2009-11-051-0/+2
| | | | | | | | | | | | | | | | | | | | | GetURL events are delivered by Launch Services to the application if the application is registered as the default handler for the given protocol, and the user for example issues 'open http://foo.com/' in the console or clicks a link in another application. The GetURL event is converted to a QFileOpenEvent, which now has both a QUrl constructor and a url() method. These two new methods work in sync with the file() method, so a QFileOpenEvent constructed from a QUrl will return a valid file name from file() if the URL was a local file. The boolean argument to AEInstallEventHandler decides whether the handler is to be added to the system event dispatch table or the application's event dispatch table. Previously we added it to the system table, but this did not work for the GetURL event. We now use the application event table, which works for all three of the events we register on Carbon. Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Merge commit '51c9b68' into 4.6Morten Johan Sørvig2009-11-041-2/+2
|\ | | | | | | | | | | Conflicts: dist/changes-4.6.0 src/gui/kernel/qevent.h
| * Gesture api review.Denis Dzyubenko2009-11-031-2/+2
| | | | | | | | | | | | Changes to the gesture api after the review. Reviewed-by: Jasmin Blanchette
* | Merge commit 'origin/4.6' into featureJørgen Lind2009-11-021-0/+5
|\ \ | |/
| * Added convenience functions QGestureEvent::setAccepted with a gestureDenis Dzyubenko2009-10-261-0/+5
| | | | | | | | | | | | type argument. Reviewed-by: Thomas Zander
* | Fix GRAPHICSVIEWJørgen Lind2009-10-291-0/+2
|/ | | | Reviewed-by: tom
* Make the already-public calls be documented and publicThomas Zander2009-10-221-1/+0
|
* Add QGestureEvent::mapToScene for better graphicsView integrationThomas Zander2009-10-221-0/+2
|
* Improvements for gesture event deliveryDenis Dzyubenko2009-10-221-2/+5
| | | | | | | | | When delivering GestureOverride events by default both the event and individual gestures will be ignored. We also store the acceptance state of individual gesture in the event and not in the gesture object, along with its target. Reviewed-by: Thomas Zander
* Improving gesture event delivery for widgets.Denis Dzyubenko2009-10-221-0/+2
| | | | Reviewed-by: trustme
* Improved gesture event filtering inside QGraphicsView for QGraphicObjectsDenis Dzyubenko2009-10-221-0/+5
| | | | Reviewed-by: trustme
* Added documentation for the Gesture API.Denis Dzyubenko2009-10-121-1/+1
| | | | Reviewed-by: trustme
* A new implementation of the Gesture API.Denis Dzyubenko2009-10-091-0/+34
| | | | | | | Implemented gestures using gesture events and separate QGesture/QGestureRecognizer classes. Reviewed-by: trustme
* fix warnings about declarations shadowing class members (autotest reported)Jeremy Katz2009-09-291-1/+1
| | | | Reviewed-by: Olivier
* Fixes some warning in headersOlivier Goffart2009-09-221-4/+4
| | | | | | | | | such as margins.h:90: warning: declaration of ???bottom??? shadows a member of _this_" 'a' stands for argument Reviewed-by: jbache
* Removed some superfluous semicolonsAlessandro Portale2009-09-091-1/+1
| | | | Reviewed-by: TrustMe
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge commit 'qt/master-stable'Jason Barron2009-07-271-35/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe qmake/Makefile.unix qmake/generators/makefile.cpp src/corelib/global/qglobal.h src/corelib/kernel/kernel.pri src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qaction.cpp src/gui/kernel/qaction.h src/gui/kernel/qaction_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget.h src/gui/kernel/qwidget_mac.mm src/gui/painting/qgraphicssystemfactory.cpp src/gui/styles/qwindowsstyle.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qabstractscrollarea_p.h src/network/access/qnetworkaccessdebugpipebackend.cpp src/network/socket/qlocalsocket_unix.cpp src/network/socket/qnativesocketengine_p.h src/network/socket/qnativesocketengine_unix.cpp src/openvg/qpaintengine_vg.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qcssparser/qcssparser.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfile/tst_qfile.cpp tests/auto/qobject/tst_qobject.cpp tests/auto/qpathclipper/qpathclipper.pro tests/auto/qprocess/tst_qprocess.cpp tests/auto/qsettings/tst_qsettings.cpp tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qsqlquerymodel/qsqlquerymodel.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qwidget/tst_qwidget.cpp
| * | Refactored gesture apiDenis Dzyubenko2009-07-021-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewritten the api almost from scratch, making it simplier and more flexible at the same time. The current implementation will not have complex gseturemanager class inside Qt, but the QGesture base class, which represents both a gesture recognizer and a gesture itself with a set of properties. A set of common gestures that can use used in third-party applications (and in Qt itself internally) is supposed to be found in qstandardgestures.h, and a base class for user-defined gestures is in qgesture.h Gesture implementation for Pan on Windows7 has also been added as a reference implementation for platform gestures.
* | | Merge commit 'qt/master-stable' into 4.6-mergedJason Barron2009-06-301-2/+136
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore configure.exe src/corelib/concurrent/qtconcurrentthreadengine.h src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicssceneevent.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qapplication_p.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qwidget.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp src/network/access/qnetworkaccesshttpbackend.cpp tests/auto/network-settings.h tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro tests/auto/qvariant/tst_qvariant.cpp
| * | Cleanup includes in public headers.Bradley T. Hughes2009-06-261-1/+1
| | | | | | | | | | | | We don't want to pull in too much if we can avoid it.
| * | Add QTouchEvent::DeviceType and deviceType()Bradley T. Hughes2009-06-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This enum indicates what kind of device generated the touch event (TouchScreen or TouchPad). We use this information to control how touch events are sent, specifically we restrict touch events to a single widget/QGraphicsItem on touch-pads, since there is no direct relationship between the physical touch location on the pad and the on- using the touch-pad).
| * | Add functions to report normalized positions in QTouchEvent::TouchPointBradley T. Hughes2009-06-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces normalizedPos(), startNormalizedPos(), and lastNormalizedPos() in QTouchEvent::TouchPoint, and must be set by the implementation before being fed into Qt. We are assuming and hoping that these functions will make it easier to implement certain types of gestures (especially on a touchpad).
| * | Fix qdoc warnings for QTouchEventBradley T. Hughes2009-06-221-2/+2
| | |
| * | Change behavior of how touch and mouse events work togetherBradley T. Hughes2009-06-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | We now send both types of events, i.e. accepting TouchBegin doesn't block mouse events anymore. We are also introducing the idea of a "primary" touch point, which is the one that the system is also generating mouse events for. This lets us reuse existing mouse event code while still being able to add multi-touch support.
| * | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-171-2/+2
| |\ \ | | |/ | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsscene_p.h
| | * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | | | | | Reviewed-by: Trust Me
| | * Long live Qt 4.5!Lars Knoll2009-03-231-0/+726
| |
| * remove duplicated code and API (merge QTouchEvent and QGraphicsSceneTouchEvent)Bradley T. Hughes2009-06-111-37/+36
| | | | | | | | | | | | | | | | | | the API for these 2 classes is identical, the implementation is almost identical, they share the same data structures, so bite the bullet and merge them. this means we go back to using screenPos() instead of globalPos() again
| * another API review round: change Q*TouchEvent size() functions to return ↵Bradley T. Hughes2009-06-111-2/+2
| | | | | | | | | | | | rects instead these are more useful, as already shown in the fingerpaint example
| * Some API changes after an API review roundBradley T. Hughes2009-06-051-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't have QGraphicsSceneTouchEvent::TouchPoint inherit from QTouchEvent::TouchPoint. The only reason to do this is to support an implementation trick, which can be done another way (see below). This means we have to essentially duplicate the API in the GraphicsScene variant. 2. Don't use a list of pointers to touch points in QTouchEvent and QGraphicsSceneTouchEvent. This means we have to make the TouchPoint classes implicitly shared (and the effect of the previous trick of static_casting the widget touch point to a graphics-scene touch point can be emulated by sharing the d-pointers between the classes). 3. QEvent::RawTouch isn't really an event type, it's a backdoor. Remove it and export the bool qt_translateRawTouchEvent(QList<QTouchEvent::TouchPoint>, QWidget *) function instead. 4. Rename QTouchEvent::TouchPoint::area() to size() (which is more clear as to what the function returns). QGraphicsSceneTouchEvent::TouchPoint gains size(), sceneSize(), and screenSize() functions (the actual translation from screen to scene to item still needs to be implemented).
| * Add support for touch point contact areaBradley T. Hughes2009-06-031-0/+3
| | | | | | | | Add QTouchEvent::TouchPoint::area() and implement support for it on Windows
| * Make Qt::TouchPointState ORable, add Q*TouchEvent::touchPointStates()Bradley T. Hughes2009-05-271-1/+15
| | | | | | | | | | | | | | | | | | | | This new function returns a bitwise OR of all the touch point states for the event. This makes it easy to see if a certain type of state is present or not without the need to loop over all touch points. QApplication and QGraphicsScene need to build this state when dispatching the touch points. This also fixes the ASSERT bug that Denis found when trying to send multiple touch presses in a touch begin event.
| * Remove friends from QTouchEvent and QTouchEvent::TouchPointBradley T. Hughes2009-05-271-6/+4
| | | | | | | | | | | | We'll use the \internal functions to modify it instead. This should make it easier for people to implement support for touch events outside of Qt itself (still need to somehow expose the logic for dispatching the touch points to the correct widgets though).
| * Support multiple touch targets in QGraphicsViewBradley T. Hughes2009-05-131-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required a larger change to the kernel and graphicsview directories to make this as efficient as possible: 1. QTouchEvent::TouchPoint becomes the base for QGraphicsSceneTouchEvent::TouchPoint - this means there is one private for every touch point, and we can store both the screen and scene coordinates in one place. Converting a QTouchEvent to QGraphicsSceneTouchEvent becomes nothing more than casting the QTouchEvent::TouchPoints to QGraphicsSceneTouchEvent::TouchPoints. 2. The logic that we use in QApplication to convert WM_TOUCH* messages to QTouchEvents is essentially duplicated (with some minor changes) to QGraphicsScene so that it can support mulitple touch item targets. I will have to investigate how I can perhaps merge some of the duplicated code. QEvent::GraphicsSceneTouchBegin propagation is not implemented yet, and will come in a later commit
| * Improved gesture propagation.Denis Dzyubenko2009-05-111-1/+10
| | | | | | | | | | | | | | | | | | | | | | Each gesture can now be accepted separately and not accepted gestures will be propagated to parent widget that are subscribed to them. Added an internal flag to specify that gesture is a "singleshot" - aka if the gesture is not continious and will not have a GestureStarted state, but only GestureFinished. Asynchronous gestures still need to fixed, as well as QGraphicsView.
| * Improved gesture target widget detection.Denis Dzyubenko2009-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Gesture is now associated with a target widget and whenever several gesture events occur at the same time if they are supposed to be handled by different widgets, each widget will receive only gestures related to itself. For example this makes possible to use gesture framework with multitouch when user interacts with two widgets at the same time. GraphicsView implements is not implemented yet.
| * Removed the use of QSharedPointer from gesture api - since QGestureDenis Dzyubenko2009-05-111-3/+2
| | | | | | | | are QObject now everything is much simplier.
| * More documentation fixes.Denis Dzyubenko2009-05-111-2/+0
| |
| * De-inlined functions in gesture events.Denis Dzyubenko2009-05-111-12/+10
| |
| * Modifications after the api review by Brad.Denis Dzyubenko2009-05-111-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | Gesture types are now separated to internal ones, which are listed as enums (though they might be converted to strings internally), and third party gestures which are referenced by strings. From now on QGesture objects derive from QObject, which means third party gesture recognizer developers can use QObjects property system to store custom data inside QGesture without need to subclass it. Some functions were renamed to show their purpose more clear.
| * Added QGraphicsSceneGestureEvent that extends plain QGestureEvent byDenis Dzyubenko2009-05-111-5/+3
| | | | | | | | | | providing some additional info (like a widget that received a gesture - for coordinates conversions).
| * Added some documentation.Denis Dzyubenko2009-05-111-4/+4
| | | | | | | | Fixed missing const specifiers.