summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-20 04:31:09 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-20 04:31:09 (GMT)
commit99f6250a4ac031b70757442715b226bc339ab699 (patch)
treeae7fd462b5255a0ed8cef079716f64749bc02e9c /examples/declarative
parent178a4e12da0601ecc662851e5bf7f124932e1a12 (diff)
parente75088323ae15604139ddfd66b85cc3b8d43abeb (diff)
downloadQt-99f6250a4ac031b70757442715b226bc339ab699.zip
Qt-99f6250a4ac031b70757442715b226bc339ab699.tar.gz
Qt-99f6250a4ac031b70757442715b226bc339ab699.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (53 commits) Be consistent in conversion from string (eg. color, int rounding). Simplify code to make next change clearer. Stop warnings. Improve error messages when tests fail. Stop highlight animators for highlightFollowsCurrentItem: false Ensure valuetype enums can be assigned from JS Improve testcase Rename Component::errorsString() -> errorString() (and also for Fixes for docs, example code Make test more stable Autotest (XFAIL) for QTBUG-10822 Add return value for resolveTypeInNamespace Fix test Fix test. Missed files. Missing break Create overview page for examples for Extending QML in C++ Search for QML import libraries also in application directory Doc improvements Disable mouse-based selection in TextInput/TextEdit Rename qml executable to qmlviewer ...
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/cppextensions/cppextensions.pro4
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp (renamed from examples/declarative/cppextensions/proxyviewer/main.cpp)6
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro (renamed from examples/declarative/cppextensions/proxyviewer/proxyviewer.pro)4
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject (renamed from examples/declarative/toys/velocity/velocity.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc (renamed from examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc)0
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml (renamed from examples/declarative/cppextensions/proxyviewer/view.qml)0
-rw-r--r--examples/declarative/cppextensions/proxywidgets/README4
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject (renamed from examples/declarative/toys/dynamic/dynamic.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro5
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml12
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject (renamed from examples/declarative/imageelements/image/image.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp2
-rw-r--r--examples/declarative/cppextensions/qwidgets/QWidgets/qmldir (renamed from examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir)0
-rw-r--r--examples/declarative/cppextensions/qwidgets/README6
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.cpp (renamed from examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp)6
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.pro (renamed from examples/declarative/cppextensions/proxywidgets/proxywidgets.pro)10
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.qml (renamed from examples/declarative/cppextensions/proxywidgets/proxywidgets.qml)2
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject (renamed from examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject)0
-rw-r--r--examples/declarative/imageelements/image/face_fit.qml26
-rw-r--r--examples/declarative/imageelements/image/face_fit_animated.qml28
-rw-r--r--examples/declarative/imageelements/image/pics/face.pngbin15408 -> 0 bytes
-rw-r--r--examples/declarative/imageelements/image/scale_and_crop.qml21
-rw-r--r--examples/declarative/imageelements/image/scale_and_crop_simple.qml20
-rw-r--r--examples/declarative/imageelements/image/scale_and_sidecrop.qml22
-rw-r--r--examples/declarative/imageelements/image/scale_to_fit.qml22
-rw-r--r--examples/declarative/imageelements/image/scale_to_fit_simple.qml20
-rw-r--r--examples/declarative/toys/corkboards/Day.qml (renamed from examples/declarative/toys/velocity/Day.qml)0
-rw-r--r--examples/declarative/toys/corkboards/cork.jpg (renamed from examples/declarative/toys/velocity/cork.jpg)bin149337 -> 149337 bytes
-rw-r--r--examples/declarative/toys/corkboards/corkboards.qml (renamed from examples/declarative/toys/velocity/velocity.qml)0
-rw-r--r--examples/declarative/toys/corkboards/corkboards.qmlproject16
-rw-r--r--examples/declarative/toys/corkboards/note-yellow.png (renamed from examples/declarative/toys/velocity/note-yellow.png)bin54559 -> 54559 bytes
-rw-r--r--examples/declarative/toys/corkboards/tack.png (renamed from examples/declarative/toys/velocity/tack.png)bin7282 -> 7282 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml (renamed from examples/declarative/toys/dynamic/dynamic.qml)0
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qmlproject16
-rw-r--r--examples/declarative/toys/dynamicscene/images/NOTE (renamed from examples/declarative/toys/dynamic/images/NOTE)0
-rw-r--r--examples/declarative/toys/dynamicscene/images/face-smile.png (renamed from examples/declarative/toys/dynamic/images/face-smile.png)bin15408 -> 15408 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/moon.png (renamed from examples/declarative/toys/dynamic/images/moon.png)bin1757 -> 1757 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/rabbit_brown.png (renamed from examples/declarative/toys/dynamic/images/rabbit_brown.png)bin1245 -> 1245 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/rabbit_bw.png (renamed from examples/declarative/toys/dynamic/images/rabbit_bw.png)bin1759 -> 1759 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/star.png (renamed from examples/declarative/toys/dynamic/images/star.png)bin349 -> 349 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/sun.png (renamed from examples/declarative/toys/dynamic/images/sun.png)bin8153 -> 8153 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/tree_s.png (renamed from examples/declarative/toys/dynamic/images/tree_s.png)bin3406 -> 3406 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/qml/Button.qml (renamed from examples/declarative/toys/dynamic/qml/Button.qml)0
-rw-r--r--examples/declarative/toys/dynamicscene/qml/PaletteItem.qml (renamed from examples/declarative/toys/dynamic/qml/PaletteItem.qml)0
-rw-r--r--examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml (renamed from examples/declarative/toys/dynamic/qml/PerspectiveItem.qml)0
-rw-r--r--examples/declarative/toys/dynamicscene/qml/Sun.qml (renamed from examples/declarative/toys/dynamic/qml/Sun.qml)0
-rw-r--r--examples/declarative/toys/dynamicscene/qml/itemCreation.js (renamed from examples/declarative/toys/dynamic/qml/itemCreation.js)2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.js4
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.js4
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js4
50 files changed, 70 insertions, 196 deletions
diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/declarative/cppextensions/cppextensions.pro
index caa6092..33762fe 100644
--- a/examples/declarative/cppextensions/cppextensions.pro
+++ b/examples/declarative/cppextensions/cppextensions.pro
@@ -3,8 +3,8 @@ TEMPLATE = subdirs
SUBDIRS += \
imageprovider \
plugins \
- proxyviewer \
- proxywidgets \
+ networkaccessmanagerfactory \
+ qwidgets \
qgraphicslayouts \
referenceexamples
diff --git a/examples/declarative/cppextensions/proxyviewer/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
index b82d2c9..fac36ff 100644
--- a/examples/declarative/cppextensions/proxyviewer/main.cpp
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
@@ -49,11 +49,11 @@
/*
- This example illustrates using a QNetworkAccessManagerFactory to
+ This example illustrates using a QDeclarativeNetworkAccessManagerFactory to
create a QNetworkAccessManager with a proxy.
Usage:
- proxyviewer [-host <proxy> -port <port>] [file]
+ networkaccessmanagerfactory [-host <proxy> -port <port>] [file]
*/
static QString proxyHost;
@@ -93,7 +93,7 @@ int main(int argc, char ** argv)
} else if (arg[0] != '-') {
source = QUrl::fromLocalFile(arg);
} else {
- qWarning() << "Usage: proxyviewer [-host <proxy> -port <port>] [file]";
+ qWarning() << "Usage: networkaccessmanagerfactory [-host <proxy> -port <port>] [file]";
exit(1);
}
}
diff --git a/examples/declarative/cppextensions/proxyviewer/proxyviewer.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro
index b6bfa7f..74d8db3 100644
--- a/examples/declarative/cppextensions/proxyviewer/proxyviewer.pro
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro
@@ -1,9 +1,9 @@
TEMPLATE = app
-TARGET = proxyviewer
+TARGET = networkaccessmanagerfactory
DEPENDPATH += .
INCLUDEPATH += .
QT += declarative network
# Input
SOURCES += main.cpp
-RESOURCES += proxyviewer.qrc
+RESOURCES += networkaccessmanagerfactory.qrc
diff --git a/examples/declarative/toys/velocity/velocity.qmlproject b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/toys/velocity/velocity.qmlproject
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject
diff --git a/examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc
index 17e9301..17e9301 100644
--- a/examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc
diff --git a/examples/declarative/cppextensions/proxyviewer/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml
index 7f1bdef..7f1bdef 100644
--- a/examples/declarative/cppextensions/proxyviewer/view.qml
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml
diff --git a/examples/declarative/cppextensions/proxywidgets/README b/examples/declarative/cppextensions/proxywidgets/README
deleted file mode 100644
index f50fa22..0000000
--- a/examples/declarative/cppextensions/proxywidgets/README
+++ /dev/null
@@ -1,4 +0,0 @@
-To run:
-
- make install
- qml proxywidgets.qml
diff --git a/examples/declarative/toys/dynamic/dynamic.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/toys/dynamic/dynamic.qmlproject
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
index 4a3fc73..c85a400 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
@@ -1,13 +1,8 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Tue May 4 13:36:26 2010
-######################################################################
-
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += declarative
-# Input
SOURCES += main.cpp
RESOURCES += layoutItem.qrc
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
index 460c564..6f91dc9 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
@@ -1,15 +1,17 @@
import Qt 4.7
-LayoutItem {//Sized by the layout
+LayoutItem { //Sized by the layout
id: resizable
+
minimumSize: "100x100"
maximumSize: "300x300"
preferredSize: "100x100"
+
Rectangle { color: "yellow"; anchors.fill: parent }
+
Rectangle {
- width: 100; height: 100;
- anchors.top: parent.top;
- anchors.right: parent.right;
- color: "green";
+ width: 100; height: 100
+ anchors.top: parent.top; anchors.right: parent.right
+ color: "green"
}
}
diff --git a/examples/declarative/imageelements/image/image.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/imageelements/image/image.qmlproject
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
index a104251..47d3a23 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
@@ -53,6 +53,7 @@
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
+
//Set up a graphics scene with a QGraphicsWidget and Layout
QGraphicsView view;
QGraphicsScene scene;
@@ -61,6 +62,7 @@ int main(int argc, char* argv[])
widget->setLayout(layout);
scene.addItem(widget);
view.setScene(&scene);
+
//Add the QML snippet into the layout
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl(":layoutItem.qml"));
diff --git a/examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir
index e55267c..e55267c 100644
--- a/examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir
+++ b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir
diff --git a/examples/declarative/cppextensions/qwidgets/README b/examples/declarative/cppextensions/qwidgets/README
new file mode 100644
index 0000000..e2f1b2b
--- /dev/null
+++ b/examples/declarative/cppextensions/qwidgets/README
@@ -0,0 +1,6 @@
+This example shows how to embed QWidget-based objects into QML.
+
+To run:
+
+ make install
+ qml qwidgets.qml
diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
index 067eb2c..228f9f1 100644
--- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
@@ -82,7 +82,7 @@ private:
QPushButton *widget;
};
-class ProxyWidgetsPlugin : public QDeclarativeExtensionPlugin
+class QWidgetsPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
public:
@@ -92,6 +92,6 @@ public:
}
};
-#include "proxywidgets.moc"
+#include "qwidgets.moc"
-Q_EXPORT_PLUGIN2(proxywidgetsplugin, ProxyWidgetsPlugin);
+Q_EXPORT_PLUGIN2(qwidgetsplugin, QWidgetsPlugin);
diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
index cb07d80..37f313d 100644
--- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.pro
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
@@ -1,12 +1,12 @@
TEMPLATE = lib
-DESTDIR = ProxyWidgets
-TARGET = proxywidgetsplugin
+DESTDIR = QWidgets
+TARGET = qwidgetsplugin
CONFIG += qt plugin
QT += declarative
-SOURCES += proxywidgets.cpp
+SOURCES += qwidgets.cpp
-sources.files += proxywidgets.pro proxywidgets.cpp proxywidgets.qml
+sources.files += qwidgets.pro qwidgets.cpp qwidgets.qml
sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins
@@ -18,4 +18,4 @@ symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
symbian:{
TARGET.EPOCALLOWDLLDATA = 1
-} \ No newline at end of file
+}
diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qml b/examples/declarative/cppextensions/qwidgets/qwidgets.qml
index 88de37f..47f9573 100644
--- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qml
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qml
@@ -1,5 +1,5 @@
import Qt 4.7
-import "ProxyWidgets" 1.0
+import "QWidgets" 1.0
Rectangle {
id: window
diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject
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/pics/face.png b/examples/declarative/imageelements/image/pics/face.png
deleted file mode 100644
index 3d66d72..0000000
--- a/examples/declarative/imageelements/image/pics/face.png
+++ /dev/null
Binary files 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
- }
-}
diff --git a/examples/declarative/toys/velocity/Day.qml b/examples/declarative/toys/corkboards/Day.qml
index 350c1c4..350c1c4 100644
--- a/examples/declarative/toys/velocity/Day.qml
+++ b/examples/declarative/toys/corkboards/Day.qml
diff --git a/examples/declarative/toys/velocity/cork.jpg b/examples/declarative/toys/corkboards/cork.jpg
index 160bc00..160bc00 100644
--- a/examples/declarative/toys/velocity/cork.jpg
+++ b/examples/declarative/toys/corkboards/cork.jpg
Binary files differ
diff --git a/examples/declarative/toys/velocity/velocity.qml b/examples/declarative/toys/corkboards/corkboards.qml
index 871bafc..871bafc 100644
--- a/examples/declarative/toys/velocity/velocity.qml
+++ b/examples/declarative/toys/corkboards/corkboards.qml
diff --git a/examples/declarative/toys/corkboards/corkboards.qmlproject b/examples/declarative/toys/corkboards/corkboards.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/toys/corkboards/corkboards.qmlproject
@@ -0,0 +1,16 @@
+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/toys/velocity/note-yellow.png b/examples/declarative/toys/corkboards/note-yellow.png
index 8ddecc8..8ddecc8 100644
--- a/examples/declarative/toys/velocity/note-yellow.png
+++ b/examples/declarative/toys/corkboards/note-yellow.png
Binary files differ
diff --git a/examples/declarative/toys/velocity/tack.png b/examples/declarative/toys/corkboards/tack.png
index cef2d1c..cef2d1c 100644
--- a/examples/declarative/toys/velocity/tack.png
+++ b/examples/declarative/toys/corkboards/tack.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/dynamic.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
index 52c7c1e..52c7c1e 100644
--- a/examples/declarative/toys/dynamic/dynamic.qml
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject b/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject
@@ -0,0 +1,16 @@
+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/toys/dynamic/images/NOTE b/examples/declarative/toys/dynamicscene/images/NOTE
index fcd87f9..fcd87f9 100644
--- a/examples/declarative/toys/dynamic/images/NOTE
+++ b/examples/declarative/toys/dynamicscene/images/NOTE
diff --git a/examples/declarative/toys/dynamic/images/face-smile.png b/examples/declarative/toys/dynamicscene/images/face-smile.png
index 3d66d72..3d66d72 100644
--- a/examples/declarative/toys/dynamic/images/face-smile.png
+++ b/examples/declarative/toys/dynamicscene/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/images/moon.png b/examples/declarative/toys/dynamicscene/images/moon.png
index 1c0d606..1c0d606 100644
--- a/examples/declarative/toys/dynamic/images/moon.png
+++ b/examples/declarative/toys/dynamicscene/images/moon.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/images/rabbit_brown.png b/examples/declarative/toys/dynamicscene/images/rabbit_brown.png
index ebfdeed..ebfdeed 100644
--- a/examples/declarative/toys/dynamic/images/rabbit_brown.png
+++ b/examples/declarative/toys/dynamicscene/images/rabbit_brown.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/images/rabbit_bw.png b/examples/declarative/toys/dynamicscene/images/rabbit_bw.png
index 7bff9b9..7bff9b9 100644
--- a/examples/declarative/toys/dynamic/images/rabbit_bw.png
+++ b/examples/declarative/toys/dynamicscene/images/rabbit_bw.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/images/star.png b/examples/declarative/toys/dynamicscene/images/star.png
index 27ef924..27ef924 100644
--- a/examples/declarative/toys/dynamic/images/star.png
+++ b/examples/declarative/toys/dynamicscene/images/star.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/images/sun.png b/examples/declarative/toys/dynamicscene/images/sun.png
index 7713ca5..7713ca5 100644
--- a/examples/declarative/toys/dynamic/images/sun.png
+++ b/examples/declarative/toys/dynamicscene/images/sun.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/images/tree_s.png b/examples/declarative/toys/dynamicscene/images/tree_s.png
index 6eac35a..6eac35a 100644
--- a/examples/declarative/toys/dynamic/images/tree_s.png
+++ b/examples/declarative/toys/dynamicscene/images/tree_s.png
Binary files differ
diff --git a/examples/declarative/toys/dynamic/qml/Button.qml b/examples/declarative/toys/dynamicscene/qml/Button.qml
index 963a850..963a850 100644
--- a/examples/declarative/toys/dynamic/qml/Button.qml
+++ b/examples/declarative/toys/dynamicscene/qml/Button.qml
diff --git a/examples/declarative/toys/dynamic/qml/PaletteItem.qml b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml
index dcb5cc3..dcb5cc3 100644
--- a/examples/declarative/toys/dynamic/qml/PaletteItem.qml
+++ b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml
diff --git a/examples/declarative/toys/dynamic/qml/PerspectiveItem.qml b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml
index c04d3dc..c04d3dc 100644
--- a/examples/declarative/toys/dynamic/qml/PerspectiveItem.qml
+++ b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml
diff --git a/examples/declarative/toys/dynamic/qml/Sun.qml b/examples/declarative/toys/dynamicscene/qml/Sun.qml
index 43dcb9a..43dcb9a 100644
--- a/examples/declarative/toys/dynamic/qml/Sun.qml
+++ b/examples/declarative/toys/dynamicscene/qml/Sun.qml
diff --git a/examples/declarative/toys/dynamic/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
index 59750f3..f92dd15 100644
--- a/examples/declarative/toys/dynamic/qml/itemCreation.js
+++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
@@ -36,7 +36,7 @@ function createItem() {
} else if (itemComponent.status == Component.Error) {
draggedItem = null;
console.log("error creating component");
- console.log(component.errorsString());
+ console.log(component.errorString());
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/declarative/tutorials/samegame/samegame2/samegame.js
index 0dbe6a6..c749dc1 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.js
@@ -44,7 +44,7 @@ function createBlock(column, row) {
var dynamicObject = component.createObject(background);
if (dynamicObject == null) {
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
dynamicObject.x = column * blockSize;
@@ -54,7 +54,7 @@ function createBlock(column, row) {
board[index(column, row)] = dynamicObject;
} else {
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js
index 3e97264..df5bdfb 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js
@@ -41,7 +41,7 @@ function createBlock(column, row) {
var dynamicObject = component.createObject(gameCanvas);
if (dynamicObject == null) {
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
@@ -52,7 +52,7 @@ function createBlock(column, row) {
board[index(column, row)] = dynamicObject;
} else {
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index 0505b8d..930a3d8 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -52,7 +52,7 @@ function createBlock(column, row) {
var dynamicObject = component.createObject(gameCanvas);
if (dynamicObject == null) {
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
@@ -65,7 +65,7 @@ function createBlock(column, row) {
board[index(column, row)] = dynamicObject;
} else {
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;