diff options
Diffstat (limited to 'examples')
3 files changed, 12 insertions, 52 deletions
diff --git a/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml b/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml index 6ff1adff..573c1fc0 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml @@ -92,7 +92,7 @@ Rectangle { Rectangle { id:file color: "transparent" - width: GridView.view.cellWidth; height: GridView.view.cellHeight + width: file.GridView.view.cellWidth; height: file.GridView.view.cellHeight Text { id:fileName @@ -100,8 +100,8 @@ Rectangle { anchors.centerIn: parent text: name color: "#BDCACD" - font.weight: GridView.view.currentIndex == index ? Font.DemiBold : Font.Normal - font.pointSize: GridView.view.currentIndex == index ? 12 : 10 + font.weight: file.GridView.view.currentIndex == index ? Font.DemiBold : Font.Normal + font.pointSize: file.GridView.view.currentIndex == index ? 12 : 10 elide: Text.ElideMiddle horizontalAlignment: Text.AlignHCenter } @@ -111,8 +111,8 @@ Rectangle { anchors.centerIn: parent radius: 10 smooth: true - scale: GridView.view.currentIndex == index ? 1 : 0.5 - opacity: GridView.view.currentIndex == index ? 1 : 0 + scale: file.GridView.view.currentIndex == index ? 1 : 0.5 + opacity: file.GridView.view.currentIndex == index ? 1 : 0 Text { id: overlay width: parent.width @@ -140,7 +140,7 @@ Rectangle { hoverEnabled: true onClicked: { - GridView.view.currentIndex = index + file.GridView.view.currentIndex = index selectedFile = directory.files[index].name selectChanged() } diff --git a/examples/tutorials/gettingStarted/gsQml/core/qmldir b/examples/tutorials/gettingStarted/gsQml/core/qmldir index 34624b2a..32dc8071 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/qmldir +++ b/examples/tutorials/gettingStarted/gsQml/core/qmldir @@ -1,43 +1,3 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - Button ./button.qml FileDialog ./fileDialog.qml TextArea ./textArea.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml index fb189e9f..807aa79f 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml @@ -99,7 +99,7 @@ Rectangle { Rectangle{ id:file color: "transparent" - width: GridView.view.cellWidth; height: GridView.view.cellHeight + width: file.GridView.view.cellWidth; height: file.GridView.view.cellHeight Text{ id:fileName @@ -107,8 +107,8 @@ Rectangle { anchors.centerIn:parent text: name color: "#BDCACD" - font.weight: GridView.view.currentIndex == index ? Font.DemiBold : Font.Normal - font.pointSize: GridView.view.currentIndex == index ? 12 : 10 + font.weight: file.GridView.view.currentIndex == index ? Font.DemiBold : Font.Normal + font.pointSize: file.GridView.view.currentIndex == index ? 12 : 10 elide: Text.ElideMiddle horizontalAlignment: Text.AlignHCenter } @@ -118,8 +118,8 @@ Rectangle { anchors.centerIn: parent radius: 10 smooth: true - scale: GridView.view.currentIndex == index ? 1 : 0.5 - opacity: GridView.view.currentIndex == index ? 1 : 0 + scale: file.GridView.view.currentIndex == index ? 1 : 0.5 + opacity: file.GridView.view.currentIndex == index ? 1 : 0 Text{ id:overlay width: parent.width @@ -147,7 +147,7 @@ Rectangle { hoverEnabled: true onClicked:{ - GridView.view.currentIndex = index + file.GridView.view.currentIndex = index selectedFile = directory.files[index].name selectChanged() } |