summaryrefslogtreecommitdiffstats
path: root/tests/manual/widgets/qgraphicsview/rubberband
Commit message (Collapse)AuthorAgeFilesLines
* Clean up manual test to QGraphicsView (rubberband)Thorbjørn Martsum2013-03-011-8/+7
| | | | | | | | | | This cleans a bit up in the manual test by a) Removing a weird reference alloration (and replace . with ->) b) rename for variable from v (which was also the view name) to n. c) remove a big item in the scene rect that is irrelevant to the test Change-Id: I49cb319bcc2f4bceef0c96ca86b571b0240a9a92 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QGraphicsView - emit signal when rubber band changes.Thorbjørn Lund Martsum2013-02-261-18/+9
| | | | | | | | | | | | | The rubberBandRect function is nice to have, but this patch makes it easier to track the rubber band by emiting a signal on change. That makes it easier (and less clumsy/hacky) to show information related to the rubber band. Change-Id: If65eb85d743a1804be3fdb823a821423411e9745 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGraphicsView - add function to get RubberBand rectThorbjørn Lund Martsum2013-02-261-3/+34
| | | | | | | | | | | | | | In many situations it is handy to know the rubberband rect. There are many situations where we want to show something related to the rubberband. Regardless how that is done the rubberband area is needed. (Not having this is a flaw that can force people to do make a customized rubberband just to get this information) Change-Id: Ia854db4c0022b6a97b150af2b4bb78fd5e974991 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGraphicsView - fix rubberband to expand on wheel eventThorbjørn Lund Martsum2012-12-111-7/+14
| | | | | | | | | | | | | | | | | In SHA 51914375b615ddcac711171ac31779fea01b4323 the rubberband selection was fixed, so it followed the scene-point on mousemove. However wheelEvent could move the view - but avoid update of the rubberband (that would not be updated until next mouse-move). This patch fixes that (and generally improves rubberband behavior) since QGraphicsViewPrivate::mouseMoveEventHandler is called by replayLastMouseEvent, which is called from various places, where we need to update the rubberband (e.g scrollContentsBy). Change-Id: I1b78c27edaaecea797a2319086d7a11d437d2bd3 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QGraphicsView - fix rubberband to stay right on scrollThorbjørn Lund Martsum2012-12-012-0/+103
We should consider the scene-position when we are expanding moving a rubberband. If the user does some auto-scroll (Qt should support that itself, but that is another matter) then the rubberband should not keep the (old) local position to calculate the rubberband extension, but instead use the scene-position that was actually clicked. Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Lars Knoll <lars.knoll@digia.com>