summaryrefslogtreecommitdiffstats
path: root/examples/demos
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-11-27 11:09:38 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-11-27 12:49:49 +0100
commite984bd7b4991bec0d0aa7dc407f67496638275c5 (patch)
treebab5bd54c24198314c8ccb48311a518a9778045f /examples/demos
parente5a8bfdea883f6124439f6b5e68ae6341c3441af (diff)
Doc: Fix issues with the Photosurface demo documentation
FileDialog has been replaced with FolderDialog. Rename the element id accordingly. Pick-to: 6.0 6.0.0 Change-Id: I2c0732f74ce8f5c20ee1844080203c14b28e311a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/demos')
-rw-r--r--examples/demos/photosurface/doc/src/photosurface.qdoc20
-rw-r--r--examples/demos/photosurface/photosurface.qml10
2 files changed, 15 insertions, 15 deletions
diff --git a/examples/demos/photosurface/doc/src/photosurface.qdoc b/examples/demos/photosurface/doc/src/photosurface.qdoc
index 306ca42da..2c96c2c3e 100644
--- a/examples/demos/photosurface/doc/src/photosurface.qdoc
+++ b/examples/demos/photosurface/doc/src/photosurface.qdoc
@@ -35,11 +35,11 @@
\image qtquick-demo-photosurface-small.png
\e{Photo Surface} demonstrates how to use a \l{Repeater} with a
- FolderListModel and a FileDialog to access images from a folder selected
+ FolderListModel and a FolderDialog to access images from a folder selected
by a user and how to handle dragging, rotation and pinch zooming within the
same item using a \l PinchArea that contains a \l MouseArea.
- All the app code is contained in one QML file, photosurface.qml. Inline
+ All the app code is contained in one QML file, \c photosurface.qml. Inline
JavaScript code is used to place, rotate, and scale images on the photo
surface.
@@ -76,30 +76,30 @@
import Qt.labs.folderlistmodel 1.0
\endcode
- We use a FileDialog to enable users to select the folder that contains
+ We use a FolderDialog to enable users to select the folder that contains
the images:
\quotefromfile demos/photosurface/photosurface.qml
- \skipto FileDialog
+ \skipto FolderDialog
\printuntil }
- To use the FileDialog type, we must import Qt Quick Dialogs:
+ To use the FolderDialog type, we add the following import statement:
\code
- import QtQuick.Dialogs 1.0
+ import Qt.labs.platform 1.1
\endcode
- We use the \c {fileDialog.open()} function to open the file dialog when the
+ We use the \c {folderDialog.open()} function to open the file dialog when the
app starts:
\code
- Component.onCompleted: fileDialog.open()
+ Component.onCompleted: folderDialog.open()
\endcode
- Users can also click the file dialog icon to open the file dialog. We use
+ Users can also click the folder dialog icon to open it. We use
an \l{Image} QML type to display the icon. Inside the \l{Image} type, we
use a MouseArea with the \c onClicked signal handler to call the
- \c {fileDialog.open()} function:
+ \c {folderDialog.open()} function:
\quotefromfile demos/photosurface/photosurface.qml
\skipuntil Image {
diff --git a/examples/demos/photosurface/photosurface.qml b/examples/demos/photosurface/photosurface.qml
index cd0e5d509..abdef5bda 100644
--- a/examples/demos/photosurface/photosurface.qml
+++ b/examples/demos/photosurface/photosurface.qml
@@ -63,7 +63,7 @@ Window {
property real surfaceViewportRatio: 1.5
FolderDialog {
- id: fileDialog
+ id: folderDialog
title: "Choose a folder with some images"
folder: picturesLocation
onAccepted: folderModel.folder = folder + "/"
@@ -211,7 +211,7 @@ Window {
MouseArea {
anchors.fill: parent
anchors.margins: -10
- onClicked: fileDialog.open()
+ onClicked: folderDialog.open()
hoverEnabled: true
onPositionChanged: {
tooltip.visible = false
@@ -247,7 +247,7 @@ Window {
Shortcut {
id: openShortcut
sequence: StandardKey.Open
- onActivated: fileDialog.open()
+ onActivated: folderDialog.open()
}
}
@@ -271,12 +271,12 @@ Window {
imageNameFilters = contextImageNameFilters;
picturesLocation = contextPicturesLocation;
if (contextInitialUrl == "")
- fileDialog.open();
+ folderDialog.open();
else
folderModel.folder = contextInitialUrl + "/";
} else {
// Launched via QML viewer without context properties set.
- fileDialog.open();
+ folderDialog.open();
}
}