From 0574eded91a1cb37299917541f3afb51cba5b014 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 20 Apr 2010 10:54:59 +1000 Subject: Add .qmlproject files to declarative examples. --- examples/declarative/animations/animations.qmlproject | 16 ++++++++++++++++ examples/declarative/aspectratio/aspectratio.qmlproject | 16 ++++++++++++++++ examples/declarative/behaviors/behaviors.qmlproject | 16 ++++++++++++++++ .../declarative/border-image/border-image.qmlproject | 16 ++++++++++++++++ examples/declarative/clocks/clocks.qmlproject | 16 ++++++++++++++++ examples/declarative/connections/connections.qmlproject | 16 ++++++++++++++++ examples/declarative/dial/dial.qmlproject | 16 ++++++++++++++++ examples/declarative/dynamic/dynamic.qmlproject | 16 ++++++++++++++++ examples/declarative/effects/effects.qmlproject | 16 ++++++++++++++++ examples/declarative/extending/extending.qmlproject | 16 ++++++++++++++++ examples/declarative/fillmode/fillmode.qmlproject | 16 ++++++++++++++++ examples/declarative/flipable/flipable.qmlproject | 16 ++++++++++++++++ examples/declarative/focus/focus.qmlproject | 16 ++++++++++++++++ examples/declarative/fonts/fonts.qmlproject | 16 ++++++++++++++++ examples/declarative/gestures/gestures.qmlproject | 16 ++++++++++++++++ examples/declarative/gridview/gridview.qmlproject | 16 ++++++++++++++++ .../declarative/imageprovider/imageprovider.qmlproject | 16 ++++++++++++++++ examples/declarative/images/images.qmlproject | 16 ++++++++++++++++ examples/declarative/layouts/layouts.qmlproject | 16 ++++++++++++++++ .../listmodel-threaded/listmodel-threaded.qmlproject | 16 ++++++++++++++++ examples/declarative/listview/listview.qmlproject | 16 ++++++++++++++++ examples/declarative/mousearea/mousearea.qmlproject | 16 ++++++++++++++++ .../objectlistmodel/objectlistmodel.qmlproject | 16 ++++++++++++++++ examples/declarative/package/package.qmlproject | 16 ++++++++++++++++ examples/declarative/parallax/parallax.qmlproject | 16 ++++++++++++++++ examples/declarative/plugins/plugins.qmlproject | 16 ++++++++++++++++ examples/declarative/progressbar/progressbar.qmlproject | 16 ++++++++++++++++ .../declarative/proxywidgets/proxywidgets.qmlproject | 16 ++++++++++++++++ examples/declarative/scrollbar/scrollbar.qmlproject | 16 ++++++++++++++++ examples/declarative/searchbox/searchbox.qmlproject | 16 ++++++++++++++++ examples/declarative/slideswitch/slideswitch.qmlproject | 16 ++++++++++++++++ examples/declarative/sql/sql.qmlproject | 16 ++++++++++++++++ examples/declarative/states/states.qmlproject | 16 ++++++++++++++++ examples/declarative/tabwidget/tabwidget.qmlproject | 16 ++++++++++++++++ examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject | 16 ++++++++++++++++ examples/declarative/tutorials/tutorials.qmlproject | 16 ++++++++++++++++ examples/declarative/tvtennis/tvtennis.qmlproject | 16 ++++++++++++++++ examples/declarative/velocity/velocity.qmlproject | 16 ++++++++++++++++ examples/declarative/webview/webview.qmlproject | 16 ++++++++++++++++ .../declarative/workerscript/workerscript.qmlproject | 16 ++++++++++++++++ examples/declarative/xmldata/xmldata.qmlproject | 16 ++++++++++++++++ .../declarative/xmlhttprequest/xmlhttprequest.qmlproject | 16 ++++++++++++++++ 42 files changed, 672 insertions(+) create mode 100644 examples/declarative/animations/animations.qmlproject create mode 100644 examples/declarative/aspectratio/aspectratio.qmlproject create mode 100644 examples/declarative/behaviors/behaviors.qmlproject create mode 100644 examples/declarative/border-image/border-image.qmlproject create mode 100644 examples/declarative/clocks/clocks.qmlproject create mode 100644 examples/declarative/connections/connections.qmlproject create mode 100644 examples/declarative/dial/dial.qmlproject create mode 100644 examples/declarative/dynamic/dynamic.qmlproject create mode 100644 examples/declarative/effects/effects.qmlproject create mode 100644 examples/declarative/extending/extending.qmlproject create mode 100644 examples/declarative/fillmode/fillmode.qmlproject create mode 100644 examples/declarative/flipable/flipable.qmlproject create mode 100644 examples/declarative/focus/focus.qmlproject create mode 100644 examples/declarative/fonts/fonts.qmlproject create mode 100644 examples/declarative/gestures/gestures.qmlproject create mode 100644 examples/declarative/gridview/gridview.qmlproject create mode 100644 examples/declarative/imageprovider/imageprovider.qmlproject create mode 100644 examples/declarative/images/images.qmlproject create mode 100644 examples/declarative/layouts/layouts.qmlproject create mode 100644 examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject create mode 100644 examples/declarative/listview/listview.qmlproject create mode 100644 examples/declarative/mousearea/mousearea.qmlproject create mode 100644 examples/declarative/objectlistmodel/objectlistmodel.qmlproject create mode 100644 examples/declarative/package/package.qmlproject create mode 100644 examples/declarative/parallax/parallax.qmlproject create mode 100644 examples/declarative/plugins/plugins.qmlproject create mode 100644 examples/declarative/progressbar/progressbar.qmlproject create mode 100644 examples/declarative/proxywidgets/proxywidgets.qmlproject create mode 100644 examples/declarative/scrollbar/scrollbar.qmlproject create mode 100644 examples/declarative/searchbox/searchbox.qmlproject create mode 100644 examples/declarative/slideswitch/slideswitch.qmlproject create mode 100644 examples/declarative/sql/sql.qmlproject create mode 100644 examples/declarative/states/states.qmlproject create mode 100644 examples/declarative/tabwidget/tabwidget.qmlproject create mode 100644 examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject create mode 100644 examples/declarative/tutorials/tutorials.qmlproject create mode 100644 examples/declarative/tvtennis/tvtennis.qmlproject create mode 100644 examples/declarative/velocity/velocity.qmlproject create mode 100644 examples/declarative/webview/webview.qmlproject create mode 100644 examples/declarative/workerscript/workerscript.qmlproject create mode 100644 examples/declarative/xmldata/xmldata.qmlproject create mode 100644 examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject diff --git a/examples/declarative/animations/animations.qmlproject b/examples/declarative/animations/animations.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/animations/animations.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/aspectratio/aspectratio.qmlproject b/examples/declarative/aspectratio/aspectratio.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/aspectratio/aspectratio.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/behaviors/behaviors.qmlproject b/examples/declarative/behaviors/behaviors.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/behaviors/behaviors.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/border-image/border-image.qmlproject b/examples/declarative/border-image/border-image.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/border-image/border-image.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/clocks/clocks.qmlproject b/examples/declarative/clocks/clocks.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/clocks/clocks.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/connections/connections.qmlproject b/examples/declarative/connections/connections.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/connections/connections.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/dial/dial.qmlproject b/examples/declarative/dial/dial.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/dial/dial.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/dynamic/dynamic.qmlproject b/examples/declarative/dynamic/dynamic.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/dynamic/dynamic.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/effects/effects.qmlproject b/examples/declarative/effects/effects.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/effects/effects.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/extending/extending.qmlproject b/examples/declarative/extending/extending.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/extending/extending.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/fillmode/fillmode.qmlproject b/examples/declarative/fillmode/fillmode.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/fillmode/fillmode.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/flipable/flipable.qmlproject b/examples/declarative/flipable/flipable.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/flipable/flipable.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/focus/focus.qmlproject b/examples/declarative/focus/focus.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/focus/focus.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/fonts/fonts.qmlproject b/examples/declarative/fonts/fonts.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/fonts/fonts.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/gestures/gestures.qmlproject b/examples/declarative/gestures/gestures.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/gestures/gestures.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/gridview/gridview.qmlproject b/examples/declarative/gridview/gridview.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/gridview/gridview.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/imageprovider/imageprovider.qmlproject b/examples/declarative/imageprovider/imageprovider.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/imageprovider/imageprovider.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/images/images.qmlproject b/examples/declarative/images/images.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/images/images.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/layouts/layouts.qmlproject b/examples/declarative/layouts/layouts.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/layouts/layouts.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/listmodel-threaded/listmodel-threaded.qmlproject b/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/listmodel-threaded/listmodel-threaded.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/listview/listview.qmlproject b/examples/declarative/listview/listview.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/listview/listview.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/mousearea/mousearea.qmlproject b/examples/declarative/mousearea/mousearea.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/mousearea/mousearea.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/objectlistmodel/objectlistmodel.qmlproject b/examples/declarative/objectlistmodel/objectlistmodel.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/objectlistmodel/objectlistmodel.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/package/package.qmlproject b/examples/declarative/package/package.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/package/package.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/parallax/parallax.qmlproject b/examples/declarative/parallax/parallax.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/parallax/parallax.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/plugins/plugins.qmlproject b/examples/declarative/plugins/plugins.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/plugins/plugins.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/progressbar/progressbar.qmlproject b/examples/declarative/progressbar/progressbar.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/progressbar/progressbar.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/proxywidgets/proxywidgets.qmlproject b/examples/declarative/proxywidgets/proxywidgets.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/proxywidgets/proxywidgets.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/scrollbar/scrollbar.qmlproject b/examples/declarative/scrollbar/scrollbar.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/scrollbar/scrollbar.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/searchbox/searchbox.qmlproject b/examples/declarative/searchbox/searchbox.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/searchbox/searchbox.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/slideswitch/slideswitch.qmlproject b/examples/declarative/slideswitch/slideswitch.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/slideswitch/slideswitch.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/sql/sql.qmlproject b/examples/declarative/sql/sql.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/sql/sql.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/states/states.qmlproject b/examples/declarative/states/states.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/states/states.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/tabwidget/tabwidget.qmlproject b/examples/declarative/tabwidget/tabwidget.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/tabwidget/tabwidget.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/tic-tac-toe/tic-tac-toe.qmlproject b/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/tic-tac-toe/tic-tac-toe.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/tutorials/tutorials.qmlproject b/examples/declarative/tutorials/tutorials.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/tutorials/tutorials.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/tvtennis/tvtennis.qmlproject b/examples/declarative/tvtennis/tvtennis.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/tvtennis/tvtennis.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/velocity/velocity.qmlproject b/examples/declarative/velocity/velocity.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/velocity/velocity.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/webview/webview.qmlproject b/examples/declarative/webview/webview.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/webview/webview.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/workerscript/workerscript.qmlproject b/examples/declarative/workerscript/workerscript.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/workerscript/workerscript.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/xmldata/xmldata.qmlproject b/examples/declarative/xmldata/xmldata.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/xmldata/xmldata.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/xmlhttprequest/xmlhttprequest.qmlproject b/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/xmlhttprequest/xmlhttprequest.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 " ] +} -- cgit v0.12 From 8efa7be3fd66119753730be643d0882afe329348 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 20 Apr 2010 10:56:00 +1000 Subject: Add an examples.qmlproject for all QML examples. --- examples/declarative/examples.qmlproject | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/declarative/examples.qmlproject diff --git a/examples/declarative/examples.qmlproject b/examples/declarative/examples.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/examples.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 " ] +} -- cgit v0.12 From fca7ddd5522f1462192b6c2b4b9e9e5a0f8449d9 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Tue, 20 Apr 2010 10:56:04 +1000 Subject: Add drag.active property to MouseArea in qml The drag.active property specifies if the target item is being dragged. Task-number: QTBUG-9833 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativemousearea.cpp | 35 +++++++++++--- .../graphicsitems/qdeclarativemousearea_p.h | 6 +++ .../graphicsitems/qdeclarativemousearea_p_p.h | 4 +- .../qdeclarativemousearea/data/dragging.qml | 28 +++++++++++ .../tst_qdeclarativemousearea.cpp | 56 ++++++++++++++++++++++ 5 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativemousearea/data/dragging.qml diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index bdb4868..969c60e 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -50,7 +50,8 @@ QT_BEGIN_NAMESPACE static const int PressAndHoldDelay = 800; QDeclarativeDrag::QDeclarativeDrag(QObject *parent) -: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0) +: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0), +_active(false) { } @@ -144,6 +145,19 @@ void QDeclarativeDrag::setYmax(qreal m) emit maximumYChanged(); } +bool QDeclarativeDrag::active() const +{ + return _active; +} + +void QDeclarativeDrag::setActive(bool drag) +{ + if (_active == drag) + return; + _active = drag; + emit activeChanged(); +} + QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() { delete drag; @@ -389,7 +403,8 @@ void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event) d->dragX = drag()->axis() & QDeclarativeDrag::XAxis; d->dragY = drag()->axis() & QDeclarativeDrag::YAxis; } - d->dragged = false; + if (d->drag) + d->drag->setActive(false); setHovered(true); d->startScene = event->scenePos(); // we should only start timer if pressAndHold is connected to. @@ -438,7 +453,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event) qreal dx = qAbs(curLocalPos.x() - startLocalPos.x()); qreal dy = qAbs(curLocalPos.y() - startLocalPos.y()); if ((d->dragX && !(dx < dragThreshold)) || (d->dragY && !(dy < dragThreshold))) - d->dragged = true; + d->drag->setActive(true); if (!keepMouseGrab()) { if ((!d->dragY && dy < dragThreshold && d->dragX && dx > dragThreshold) || (!d->dragX && dx < dragThreshold && d->dragY && dy > dragThreshold) @@ -447,7 +462,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } } - if (d->dragX && d->dragged) { + if (d->dragX && d->drag->active()) { qreal x = (curLocalPos.x() - startLocalPos.x()) + d->startX; if (x < drag()->xmin()) x = drag()->xmin(); @@ -455,7 +470,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event) x = drag()->xmax(); drag()->target()->setX(x); } - if (d->dragY && d->dragged) { + if (d->dragY && d->drag->active()) { qreal y = (curLocalPos.y() - startLocalPos.y()) + d->startY; if (y < drag()->ymin()) y = drag()->ymin(); @@ -481,6 +496,8 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } else { d->saveEvent(event); setPressed(false); + if (d->drag) + d->drag->setActive(false); // If we don't accept hover, we need to reset containsMouse. if (!acceptHoverEvents()) setHovered(false); @@ -559,7 +576,8 @@ void QDeclarativeMouseArea::timerEvent(QTimerEvent *event) Q_D(QDeclarativeMouseArea); if (event->timerId() == d->pressAndHoldTimer.timerId()) { d->pressAndHoldTimer.stop(); - if (d->pressed && d->dragged == false && d->hovered == true) { + bool dragged = d->drag && d->drag->active(); + if (d->pressed && dragged == false && d->hovered == true) { d->longPress = true; QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress); emit pressAndHold(&me); @@ -659,7 +677,8 @@ void QDeclarativeMouseArea::setAcceptedButtons(Qt::MouseButtons buttons) bool QDeclarativeMouseArea::setPressed(bool p) { Q_D(QDeclarativeMouseArea); - bool isclick = d->pressed == true && p == false && d->dragged == false && d->hovered == true; + bool dragged = d->drag && d->drag->active(); + bool isclick = d->pressed == true && p == false && dragged == false && d->hovered == true; if (d->pressed != p) { d->pressed = p; @@ -693,6 +712,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag() /*! \qmlproperty Item MouseArea::drag.target + \qmlproperty bool MouseArea::drag.active \qmlproperty Axis MouseArea::drag.axis \qmlproperty real MouseArea::drag.minimumX \qmlproperty real MouseArea::drag.maximumX @@ -703,6 +723,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag() \list \i \c target specifies the item to drag. + \i \c active specifies if the target item is being currently dragged. \i \c axis specifies whether dragging can be done horizontally (XAxis), vertically (YAxis), or both (XandYAxis) \i the minimum and maximum properties limit how far the target can be dragged along the corresponding axes. \endlist diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h index 630840f..4f7df62 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h +++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h @@ -61,6 +61,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDrag : public QObject Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged) Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged) Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged) + Q_PROPERTY(bool active READ active NOTIFY activeChanged) //### consider drag and drop public: @@ -84,6 +85,9 @@ public: qreal ymax() const; void setYmax(qreal); + bool active() const; + void setActive(bool); + Q_SIGNALS: void targetChanged(); void axisChanged(); @@ -91,6 +95,7 @@ Q_SIGNALS: void maximumXChanged(); void minimumYChanged(); void maximumYChanged(); + void activeChanged(); private: QGraphicsObject *_target; @@ -99,6 +104,7 @@ private: qreal _xmax; qreal _ymin; qreal _ymax; + bool _active; Q_DISABLE_COPY(QDeclarativeDrag) }; diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h index 4973957..4e909ff 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h @@ -67,7 +67,8 @@ class QDeclarativeMouseAreaPrivate : public QDeclarativeItemPrivate public: QDeclarativeMouseAreaPrivate() - : absorb(true), hovered(false), pressed(false), longPress(false), drag(0) + : absorb(true), hovered(false), pressed(false), longPress(false), + moved(false), drag(0) { } @@ -100,7 +101,6 @@ public: bool moved : 1; bool dragX : 1; bool dragY : 1; - bool dragged : 1; QDeclarativeDrag *drag; QPointF startScene; qreal startX; diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml new file mode 100644 index 0000000..a28f049 --- /dev/null +++ b/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml @@ -0,0 +1,28 @@ +import Qt 4.7 +Rectangle { + id: whiteRect + width: 200 + height: 200 + color: "white" + Rectangle { + id: blackRect + objectName: "blackrect" + color: "black" + y: 50 + x: 50 + width: 100 + height: 100 + opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200 + Text { text: blackRect.opacity} + MouseArea { + objectName: "mouseregion" + anchors.fill: parent + drag.target: blackRect + drag.axis: Drag.XandYAxis + drag.minimumX: 0 + drag.maximumX: whiteRect.width-blackRect.width + drag.minimumY: 0 + drag.maximumY: whiteRect.height-blackRect.height + } + } + } diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp index 4a58049..eb4aa12 100644 --- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp +++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp @@ -52,6 +52,7 @@ class tst_QDeclarativeMouseArea: public QObject private slots: void dragProperties(); void resetDrag(); + void dragging(); void updateMouseAreaPosOnClick(); void updateMouseAreaPosOnResize(); void noOnClickedWithPressAndHold(); @@ -163,6 +164,61 @@ void tst_QDeclarativeMouseArea::resetDrag() } +void tst_QDeclarativeMouseArea::dragging() +{ + QDeclarativeView *canvas = createView(); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/dragging.qml")); + canvas->show(); + canvas->setFocus(); + QVERIFY(canvas->rootObject() != 0); + + QDeclarativeMouseArea *mouseRegion = canvas->rootObject()->findChild("mouseregion"); + QDeclarativeDrag *drag = mouseRegion->drag(); + QVERIFY(mouseRegion != 0); + QVERIFY(drag != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + QVERIFY(blackRect == drag->target()); + + QVERIFY(!drag->active()); + + QGraphicsScene *scene = canvas->scene(); + QGraphicsSceneMouseEvent pressEvent(QEvent::GraphicsSceneMousePress); + pressEvent.setScenePos(QPointF(100, 100)); + pressEvent.setButton(Qt::LeftButton); + pressEvent.setButtons(Qt::LeftButton); + QApplication::sendEvent(scene, &pressEvent); + + QVERIFY(!drag->active()); + QCOMPARE(blackRect->x(), 50.0); + QCOMPARE(blackRect->y(), 50.0); + + QGraphicsSceneMouseEvent moveEvent(QEvent::GraphicsSceneMouseMove); + moveEvent.setScenePos(QPointF(110, 110)); + moveEvent.setButton(Qt::LeftButton); + moveEvent.setButtons(Qt::LeftButton); + QApplication::sendEvent(scene, &moveEvent); + + QVERIFY(drag->active()); + QCOMPARE(blackRect->x(), 60.0); + QCOMPARE(blackRect->y(), 60.0); + + QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMouseRelease); + releaseEvent.setScenePos(QPointF(110, 110)); + releaseEvent.setButton(Qt::LeftButton); + releaseEvent.setButtons(Qt::LeftButton); + QApplication::sendEvent(scene, &releaseEvent); + + QVERIFY(!drag->active()); + QCOMPARE(blackRect->x(), 60.0); + QCOMPARE(blackRect->y(), 60.0); + + delete canvas; +} + QDeclarativeView *tst_QDeclarativeMouseArea::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12