aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/demos/photosurface
Commit message (Collapse)AuthorAgeFilesLines
* Move demos to qtdoc repositoryFrederik Gladhorn2018-07-1212-653/+0
| | | | | | | | | | | These demos use several modules and moving them allows to use for example Qt Quick Controls 2 in them. Change-Id: I1f352671dec672665e9fdb6a9c2a7c6e25a002b0 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* docs and example: clarify the usage of Flickable contentX/contentYShawn Rutledge2017-11-081-2/+2
| | | | | | | | | | | It's such a common mistake to observe that they normally go to zero at the top-left corner, but fail to realize that they won't always do that. Task-number: QTBUG-64219 Task-number: QTBUG-22894 Task-number: QTBUG-27884 Change-Id: I6bc81d4761debdaff8fb3366bf1e944241207157 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-171-5/+5
| | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-172-6/+26
| | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* examples: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-031-3/+5
| | | | | | | | While touching the code, replace QStringLiteral with QL1S in QStringBuilder expression. Change-Id: I2519b254d82453e1c9bd5b834c0bd78e5c026f83 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* photosurface demo: Improve handling of image directories.Friedemann Kleint2016-01-292-3/+84
| | | | | | | | | | | | | | Make it possible to pass URLs on the command line. If no argument is given and the pictures location as returned by QStandardPaths exists and has contents, show it, Otherwise, show the file dialog as was before. Set context properties containing pictures location, image name filters and initial URL. Derive the image filter string from QImageReader/QMimeDatabase. Change-Id: I89bdff27416bf8ef725aa4e17853b2f634cf059b Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Doc: Corrected display qml code in photosurface.qdocNico Vertriest2016-01-261-2/+4
| | | | | | Change-Id: Ic4e0dcc6bd91921cfea68e0cfe805e8369f58618 Task-number: QTBUG-49810 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Photosurface demo: add Shortcuts for open and quit, tooltip for openShawn Rutledge2015-09-031-4/+42
| | | | | | | Demonstrates the new Shortcut.sequenceString property. Change-Id: I6c523a46b595610b310070214c31f3fbd79a3d28 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-172-6/+6
| | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* PinchArea: handle smart zoom gestureShawn Rutledge2015-02-131-1/+20
| | | | | | | This is the double-finger double-tap trackpad gesture on OS X. Change-Id: Ie79dc533adf382170867318bc9b61b367f819e9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-124-18/+18
| | | | | | | | | 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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Photosurface example: flickable surfaceShawn Rutledge2015-02-121-61/+107
| | | | | | | | | | | | | | The Flickable provides a way of testing interaction with 2-finger trackpad gestures: if the cursor is over the background, you can flick the surface via wheel events (which come from native flick gestures if you are using a trackpad on OS X); inside the bounds of a photo, the same 2-finger gesture is for zooming and rotating. Also, random position and rotation are applied more correctly, and only at startup. Position and rotation changes are animated. Change-Id: Iab49b7f2e99a9686424368fd94f0b7f89807da22 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Photosurface example: scale and rotate the frame, not the imageShawn Rutledge2014-12-231-10/+10
| | | | | | | | | | | | | | | | | The size of the border around the image could otherwise change dramatically, because the PinchArea was zooming the image. It's conceivable that the frame could follow the image in scale and rotation, but that doesn't work as long as the image is inside the frame, because changing scale and rotation of the parent affects the child too. So it follows that the scale and rotation of the image should never be directly set. This helps the apparent size of the white border around each image to be visually consistent. Another advantage is that the the image centroid doesn't tend to move, so compensation is not necessary. Change-Id: Ib7767e369097b32f006274add73ac544aedaf839 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fixed frame focusing on touch devicesTomi Korpipää2014-09-192-17/+18
| | | | | | | | | | Also fixed the \quotefromfile commands in the doc to display the changed code correctly. Task-number: QTBUG-38779 Change-Id: I37d37139459cb9cdee7ec9beaffeab26a1cb4aaf Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: add docs for Photo Surface demoLeena Miettinen2014-05-131-4/+126
| | | | | Change-Id: Id6f40b1b769fdd103cfb2afda172b1daf9b1a105 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Improved Qt Quick Demos documentationJerome Pasion2014-04-161-3/+7
| | | | | | | | | | | | | -added include from qtbase/doc/global about running the example. -added link to "QML Applications" (main landing page for QML) -highlighted the names with \e -various documentation changes Task-number: QTBUG-33597 Change-Id: I9e23b8b61862c424f2a17003b3d1f5b2ef931ceb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* photosurface: add C++ boilerplate launcher; open buttonShawn Rutledge2013-06-269-0/+130
| | | | | | | | | | Creator refuses to build it for Android otherwise, and this is a good demo for tablets. Also added a button to re-open the FileDialog. Task-number: QTBUG-31898 Change-Id: I9f90de316fcaa2679484f8a875737ffafa774f31 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* photosurface demo: behavior depends on initialization orderShawn Rutledge2013-06-141-2/+3
| | | | | | | | | | The file dialog wasn't appearing on the mac. This way seems to work. We have a long-term bug here but this workaround will look better for the release. Change-Id: I8538ca5dc11a063591bc4557fd3779c5bb3768b5 Task-number: QTBUG-31699 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Move full apps from "qtquickexamples" to "qtquickdemos"Sze Howe Koh2013-05-062-4/+4
| | | | | | | | | | | | | "qtquickexamples" is for illustrating code usage; "qtquickdemos" is for showcasing fully-functional apps. Renamed titles and screenshots to match the other demos. Also, attempt to make the descriptions sound more interesting. Change-Id: I2fb43c5d32f24159cd39564576d4ebd76b2cbeaa Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* photosurface example: simplify PinchArea usage; fileUrls; licenseShawn Rutledge2013-03-151-41/+33
| | | | | | | | | | FileDialog.filePaths was changed to fileUrls. No need to do so much scripting because the PinchArea.target takes care of the math already, and with better rotational symmetry too. Example QML should have a BSD license. Change-Id: I892292574c81c032d948c1c2d4924fc7127dd008 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Added photosurface example to demo PinchArea/MouseArea togetherShawn Rutledge2013-03-044-0/+195
It seems to be important to put the MouseArea inside the PinchArea in order to support simultaneous drag/rotate/pinch. Change-Id: Ic3ec6a131bd2d4c7f8a8560cd9c3015a717fef20 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>