From 71114e0c0af7418f61c0bf5d9ec881619946e128 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 19 May 2010 11:15:30 +1000 Subject: Remove image example (covered in class docs) --- doc/src/declarative/examples.qdoc | 1 - doc/src/examples/qml-examples.qdoc | 7 ------ .../declarative/imageelements/image/face_fit.qml | 26 ------------------- .../imageelements/image/face_fit_animated.qml | 28 --------------------- .../imageelements/image/image.qmlproject | 16 ------------ .../declarative/imageelements/image/pics/face.png | Bin 15408 -> 0 bytes .../imageelements/image/scale_and_crop.qml | 21 ---------------- .../imageelements/image/scale_and_crop_simple.qml | 20 --------------- .../imageelements/image/scale_and_sidecrop.qml | 22 ---------------- .../imageelements/image/scale_to_fit.qml | 22 ---------------- .../imageelements/image/scale_to_fit_simple.qml | 20 --------------- 11 files changed, 183 deletions(-) delete mode 100644 examples/declarative/imageelements/image/face_fit.qml delete mode 100644 examples/declarative/imageelements/image/face_fit_animated.qml delete mode 100644 examples/declarative/imageelements/image/image.qmlproject delete mode 100644 examples/declarative/imageelements/image/pics/face.png delete mode 100644 examples/declarative/imageelements/image/scale_and_crop.qml delete mode 100644 examples/declarative/imageelements/image/scale_and_crop_simple.qml delete mode 100644 examples/declarative/imageelements/image/scale_and_sidecrop.qml delete mode 100644 examples/declarative/imageelements/image/scale_to_fit.qml delete mode 100644 examples/declarative/imageelements/image/scale_to_fit_simple.qml diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index 4ad57f2..bc02646 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -82,7 +82,6 @@ For example, from your build directory, run: \section2 Image Elements \list \o \l{declarative/imageelements/borderimage}{BorderImage} -\o \l{declarative/imageelements/image}{Image} \endlist \section2 \l{declarative/positioners}{Positioners} diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 2973d8c..7a0fcca 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -71,13 +71,6 @@ */ /*! - \title Image - \example declarative/imageelements/image - - This example shows uses of the \l Image element in QML. -*/ - -/*! \title Reference examples \example declarative/cppextensions/referenceexamples */ diff --git a/examples/declarative/imageelements/image/face_fit.qml b/examples/declarative/imageelements/image/face_fit.qml deleted file mode 100644 index 52cd4c2..0000000 --- a/examples/declarative/imageelements/image/face_fit.qml +++ /dev/null @@ -1,26 +0,0 @@ -import Qt 4.7 - -// Here, we implement a hybrid of the "scale to fit" and "scale and crop" -// behaviours which will crop up to 25% from *one* dimension if necessary -// to fully scale the other. This is a realistic algorithm, for example -// when the edges of the image contain less vital information than the -// center - such as a face. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: Math.max(Math.min(parent.width/width*1.333,parent.height/height), - Math.min(parent.width/width,parent.height/height*1.333)) - } -} diff --git a/examples/declarative/imageelements/image/face_fit_animated.qml b/examples/declarative/imageelements/image/face_fit_animated.qml deleted file mode 100644 index 63fc9c6..0000000 --- a/examples/declarative/imageelements/image/face_fit_animated.qml +++ /dev/null @@ -1,28 +0,0 @@ -import Qt 4.7 - -// Here, we extend the "face_fit" example with animation to show how truly -// diverse and usage-specific behaviours are made possible by NOT putting a -// hard-coded aspect ratio feature into the Image primitive. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - SpringFollow on scale { - to: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height), - Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333)) - spring: 1 - damping: 0.05 - } - } -} diff --git a/examples/declarative/imageelements/image/image.qmlproject b/examples/declarative/imageelements/image/image.qmlproject deleted file mode 100644 index d4909f8..0000000 --- a/examples/declarative/imageelements/image/image.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/examples/declarative/imageelements/image/pics/face.png b/examples/declarative/imageelements/image/pics/face.png deleted file mode 100644 index 3d66d72..0000000 Binary files a/examples/declarative/imageelements/image/pics/face.png and /dev/null differ diff --git a/examples/declarative/imageelements/image/scale_and_crop.qml b/examples/declarative/imageelements/image/scale_and_crop.qml deleted file mode 100644 index a438104..0000000 --- a/examples/declarative/imageelements/image/scale_and_crop.qml +++ /dev/null @@ -1,21 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale and Crop" behaviour. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: Math.max(parent.width/width,parent.height/height) - } -} diff --git a/examples/declarative/imageelements/image/scale_and_crop_simple.qml b/examples/declarative/imageelements/image/scale_and_crop_simple.qml deleted file mode 100644 index 1160ec5..0000000 --- a/examples/declarative/imageelements/image/scale_and_crop_simple.qml +++ /dev/null @@ -1,20 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale to Fit" behaviour, using the -// fillMode property. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - source: "pics/face.png" - fillMode: Image.PreserveAspectCrop - anchors.fill: parent - } -} diff --git a/examples/declarative/imageelements/image/scale_and_sidecrop.qml b/examples/declarative/imageelements/image/scale_and_sidecrop.qml deleted file mode 100644 index 5593ab8..0000000 --- a/examples/declarative/imageelements/image/scale_and_sidecrop.qml +++ /dev/null @@ -1,22 +0,0 @@ -import Qt 4.7 - -// Here, we implement a variant of "Scale and Crop" behaviour, where we -// crop the sides if necessary to fully fit vertically, but not the reverse. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: parent.height/height - } -} diff --git a/examples/declarative/imageelements/image/scale_to_fit.qml b/examples/declarative/imageelements/image/scale_to_fit.qml deleted file mode 100644 index 724a36e..0000000 --- a/examples/declarative/imageelements/image/scale_to_fit.qml +++ /dev/null @@ -1,22 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale to Fit" behaviour "manually", rather -// than using the preserveAspect property. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - anchors.centerIn: parent - source: "pics/face.png" - x: (parent.width-width*scale)/2 - y: (parent.height-height*scale)/2 - scale: Math.min(parent.width/width,parent.height/height) - } -} diff --git a/examples/declarative/imageelements/image/scale_to_fit_simple.qml b/examples/declarative/imageelements/image/scale_to_fit_simple.qml deleted file mode 100644 index 0e960b4..0000000 --- a/examples/declarative/imageelements/image/scale_to_fit_simple.qml +++ /dev/null @@ -1,20 +0,0 @@ -import Qt 4.7 - -// Here, we implement "Scale to Fit" behaviour, using the -// fillMode property. -// -Rectangle { - // default size: whole image, unscaled - width: face.width - height: face.height - color: "gray" - clip: true - - Image { - id: face - smooth: true - source: "pics/face.png" - fillMode: Image.PreserveAspectFit - anchors.fill: parent - } -} -- cgit v0.12