diff options
author | Oliver Wolff <oliver.wolff@digia.com> | 2012-12-05 11:42:20 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-11 18:25:53 +0100 |
commit | 04cb8ef1ee919f071540ccb5cae10bb47f37fb3e (patch) | |
tree | 2e9aa7b3e908b00870d17a93023bd622fcd80c7a /examples | |
parent | 60c101b9907479e8bb6aa9770114572a72434dc6 (diff) | |
download | qtquick1-04cb8ef1ee919f071540ccb5cae10bb47f37fb3e.tar.gz |
centralize and fixup example sources install targets
follow respective change in qtbase
Change-Id: I15346e16cd1d6f30cf32a77284b5f19b1dd2a7a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'examples')
445 files changed, 3832 insertions, 350 deletions
diff --git a/examples/declarative/animation/animation.pro b/examples/declarative/animation/animation.pro index 6ac1b645..c9dca1de 100644 --- a/examples/declarative/animation/animation.pro +++ b/examples/declarative/animation/animation.pro @@ -5,9 +5,5 @@ SUBDIRS += \ basics/color-animation \ easing \ behaviors/behavior-example \ + behaviors/wigglytext \ states - -# install -sources.files = animation.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/animation -INSTALLS += sources diff --git a/examples/declarative/animation/basics/color-animation/color-animation.pro b/examples/declarative/animation/basics/color-animation/color-animation.pro index 11dd9d13..f0e805e5 100644 --- a/examples/declarative/animation/basics/color-animation/color-animation.pro +++ b/examples/declarative/animation/basics/color-animation/color-animation.pro @@ -23,9 +23,9 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/animation/basics/color-animation +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/basics/color-animation exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() OTHER_FILES += \ diff --git a/examples/declarative/animation/basics/property-animation/property-animation.pro b/examples/declarative/animation/basics/property-animation/property-animation.pro index 28e7ebc3..0c2dcdb1 100644 --- a/examples/declarative/animation/basics/property-animation/property-animation.pro +++ b/examples/declarative/animation/basics/property-animation/property-animation.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/animation/basics/property-animation +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/basics/property-animation exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/behaviors/behavior-example/behavior-example.pro b/examples/declarative/animation/behaviors/behavior-example/behavior-example.pro index b1b3cd6b..7430b0fc 100644 --- a/examples/declarative/animation/behaviors/behavior-example/behavior-example.pro +++ b/examples/declarative/animation/behaviors/behavior-example/behavior-example.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/animation/behaviors/behavior-example +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/behaviors/behavior-example exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/behaviors/wigglytext/wigglytext.pro b/examples/declarative/animation/behaviors/wigglytext/wigglytext.pro index e110924e..f8c2b129 100644 --- a/examples/declarative/animation/behaviors/wigglytext/wigglytext.pro +++ b/examples/declarative/animation/behaviors/wigglytext/wigglytext.pro @@ -26,7 +26,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/animation/wigglytext/wigglytext +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/wigglytext/wigglytext exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/easing/easing.pro b/examples/declarative/animation/easing/easing.pro index ac80ef7a..63769634 100644 --- a/examples/declarative/animation/easing/easing.pro +++ b/examples/declarative/animation/easing/easing.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/animation/easing +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/easing exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/states/states.pro b/examples/declarative/animation/states/states.pro index 9a469a68..7e9f48d3 100644 --- a/examples/declarative/animation/states/states.pro +++ b/examples/declarative/animation/states/states.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/animation/states +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/states exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/calculator/calculator.desktop b/examples/declarative/calculator/calculator.desktop index 854120f2..854120f2 100644 --- a/examples/demos/calculator/calculator.desktop +++ b/examples/declarative/calculator/calculator.desktop diff --git a/examples/demos/calculator/calculator.pro b/examples/declarative/calculator/calculator.pro index 7db59b96..3591af05 100644 --- a/examples/demos/calculator/calculator.pro +++ b/examples/declarative/calculator/calculator.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/calculator +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/calculator exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/calculator/calculator.qmlproject b/examples/declarative/calculator/calculator.qmlproject index 88ca3caa..88ca3caa 100644 --- a/examples/demos/calculator/calculator.qmlproject +++ b/examples/declarative/calculator/calculator.qmlproject diff --git a/examples/demos/calculator/calculator.svg b/examples/declarative/calculator/calculator.svg index 566acfad..566acfad 100644 --- a/examples/demos/calculator/calculator.svg +++ b/examples/declarative/calculator/calculator.svg diff --git a/examples/demos/calculator/calculator64.png b/examples/declarative/calculator/calculator64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/calculator/calculator64.png +++ b/examples/declarative/calculator/calculator64.png diff --git a/examples/demos/calculator/calculator80.png b/examples/declarative/calculator/calculator80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/calculator/calculator80.png +++ b/examples/declarative/calculator/calculator80.png diff --git a/examples/demos/calculator/calculator_harmattan.desktop b/examples/declarative/calculator/calculator_harmattan.desktop index 574521d8..574521d8 100644 --- a/examples/demos/calculator/calculator_harmattan.desktop +++ b/examples/declarative/calculator/calculator_harmattan.desktop diff --git a/examples/demos/calculator/main.cpp b/examples/declarative/calculator/main.cpp index 9d2d4168..9d2d4168 100644 --- a/examples/demos/calculator/main.cpp +++ b/examples/declarative/calculator/main.cpp diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/Button.qml b/examples/declarative/calculator/qml/calculator/CalculatorCore/Button.qml index a6126b00..a6126b00 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/Button.qml +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/Button.qml diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/Display.qml b/examples/declarative/calculator/qml/calculator/CalculatorCore/Display.qml index 9e7653fd..9e7653fd 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/Display.qml +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/Display.qml diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/calculator.js b/examples/declarative/calculator/qml/calculator/CalculatorCore/calculator.js index 7c363c7f..7c363c7f 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/calculator.js +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/calculator.js diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-.png b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-.png Binary files differindex 544e5145..544e5145 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-.png +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-.png diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-blue.png b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-blue.png Binary files differindex 5f92de32..5f92de32 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-blue.png +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-blue.png diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-green.png b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-green.png Binary files differindex 36c93914..36c93914 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-green.png +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-green.png diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-purple.png b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-purple.png Binary files differindex 347cbbea..347cbbea 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-purple.png +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-purple.png diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-red.png b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-red.png Binary files differindex 3b335891..3b335891 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/images/button-red.png +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/button-red.png diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/images/display.png b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/display.png Binary files differindex 9507f438..9507f438 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/images/display.png +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/images/display.png diff --git a/examples/demos/calculator/qml/calculator/CalculatorCore/qmldir b/examples/declarative/calculator/qml/calculator/CalculatorCore/qmldir index a926b93f..a926b93f 100644 --- a/examples/demos/calculator/qml/calculator/CalculatorCore/qmldir +++ b/examples/declarative/calculator/qml/calculator/CalculatorCore/qmldir diff --git a/examples/demos/calculator/qml/calculator/calculator.qml b/examples/declarative/calculator/qml/calculator/calculator.qml index 5c7c5e5d..5c7c5e5d 100644 --- a/examples/demos/calculator/qml/calculator/calculator.qml +++ b/examples/declarative/calculator/qml/calculator/calculator.qml diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/declarative/cppextensions/cppextensions.pro index 96550307..c81eb13f 100644 --- a/examples/declarative/cppextensions/cppextensions.pro +++ b/examples/declarative/cppextensions/cppextensions.pro @@ -7,8 +7,3 @@ SUBDIRS += \ qwidgets \ qgraphicslayouts \ referenceexamples - -# install -sources.files = cppextensions.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions -INSTALLS += sources diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/declarative/cppextensions/imageprovider/imageprovider.pro index 9e698d88..9c305212 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider.pro +++ b/examples/declarative/cppextensions/imageprovider/imageprovider.pro @@ -7,16 +7,11 @@ TARGET = qmlimageproviderplugin SOURCES += imageprovider.cpp -OTHER_FILES += imageprovider.json +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/imageprovider/ImageProviderCore +qml.files = imageprovider-example.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/imageprovider +qml2.files = ImageProviderCore/qmldir +qml2.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/imageprovider/ImageProviderCore -sources.files = $$SOURCES imageprovider.qml imageprovider.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/imageprovider - -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/imageprovider/ImageProviderCore - -ImageProviderCore_sources.files = \ - ImageProviderCore/qmldir -ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/imageprovider/ImageProviderCore - -INSTALLS = sources ImageProviderCore_sources target +INSTALLS = qml qml2 target diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index 4048dfd9..0f3e4e43 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -21,7 +21,7 @@ SOURCES += main.cpp RESOURCES += networkaccessmanagerfactory.qrc # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/networkaccessmanagerfactory +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/networkaccessmanagerfactory exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/cppextensions/plugins/plugins.pro b/examples/declarative/cppextensions/plugins/plugins.pro index 053e6c44..93318e40 100644 --- a/examples/declarative/cppextensions/plugins/plugins.pro +++ b/examples/declarative/cppextensions/plugins/plugins.pro @@ -7,7 +7,7 @@ TARGET = qmlqtimeexampleplugin SOURCES += plugin.cpp -OTHER_FILES += "plugin.json" +target.path += $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/plugins/com/nokia/TimeExample qdeclarativesources.files += \ com/nokia/TimeExample/qmldir \ @@ -16,12 +16,10 @@ qdeclarativesources.files += \ com/nokia/TimeExample/Clock.qml \ com/nokia/TimeExample/hour.png \ com/nokia/TimeExample/minute.png +qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/plugins/com/nokia/TimeExample -qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/plugins/com/nokia/TimeExample +qml.files += plugins.qml +qml.path += $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/plugins -sources.files += plugins.pro plugin.cpp plugins.qml README -sources.path += $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/plugins -target.path += $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/plugins/com/nokia/TimeExample - -INSTALLS += qdeclarativesources sources target +INSTALLS += target qdeclarativesources qml diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro index 794979c4..e60ef3cc 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro @@ -28,8 +28,8 @@ RESOURCES += \ gridlayout.qrc # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro index da9b9939..49dbc405 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro @@ -28,7 +28,7 @@ RESOURCES += \ linearlayout.qrc # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro index 3c0c865a..ea61235e 100644 --- a/examples/declarative/cppextensions/qwidgets/qwidgets.pro +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro @@ -7,11 +7,12 @@ TARGET = qmlqwidgetsplugin SOURCES += qwidgets.cpp -OTHER_FILES += qwidgets.json +qml.files = qwidgets.qml +qml.path += $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/qwidgets +qml2.files = QWidgets/qmldir +qml2.path += $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/plugins/QWidgets -sources.files += qwidgets.pro qwidgets.cpp qwidgets.qml -sources.path += $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/plugins -target.path += $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/plugins +target.path += $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/plugins -INSTALLS += sources target +INSTALLS += target qml qml2 diff --git a/examples/declarative/cppextensions/referenceexamples/adding/adding.pro b/examples/declarative/cppextensions/referenceexamples/adding/adding.pro index 57179384..bc17d41c 100644 --- a/examples/declarative/cppextensions/referenceexamples/adding/adding.pro +++ b/examples/declarative/cppextensions/referenceexamples/adding/adding.pro @@ -5,7 +5,5 @@ SOURCES += main.cpp \ HEADERS += person.h RESOURCES += adding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/adding -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/adding -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/adding +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/attached/attached.pro b/examples/declarative/cppextensions/referenceexamples/attached/attached.pro index 2c24fcbd..32f01468 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/attached.pro +++ b/examples/declarative/cppextensions/referenceexamples/attached/attached.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/attached -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/attached -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/attached +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/binding/binding.pro b/examples/declarative/cppextensions/referenceexamples/binding/binding.pro index 7b269491..64bcd0ef 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/binding.pro +++ b/examples/declarative/cppextensions/referenceexamples/binding/binding.pro @@ -9,7 +9,5 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += binding.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/binding -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/binding -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/binding +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro b/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro index 29b905ca..17f67be4 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro +++ b/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/coercion -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/coercion -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/coercion +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/default/default.pro b/examples/declarative/cppextensions/referenceexamples/default/default.pro index 235aa317..b045061d 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/default.pro +++ b/examples/declarative/cppextensions/referenceexamples/default/default.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/default -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/default -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/default +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro b/examples/declarative/cppextensions/referenceexamples/extended/extended.pro index 8acc21de..3956f7ab 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro +++ b/examples/declarative/cppextensions/referenceexamples/extended/extended.pro @@ -5,7 +5,5 @@ SOURCES += main.cpp \ HEADERS += lineedit.h RESOURCES += extended.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/extended -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/extended -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/extended +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro b/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro index 3d98260a..3a3830fb 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro +++ b/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += grouped.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/grouped -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/grouped -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/grouped +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/methods/methods.pro b/examples/declarative/cppextensions/referenceexamples/methods/methods.pro index 105007a0..1d42fcac 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/methods.pro +++ b/examples/declarative/cppextensions/referenceexamples/methods/methods.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += methods.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/methods -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/methods -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/methods +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/properties/properties.pro b/examples/declarative/cppextensions/referenceexamples/properties/properties.pro index d6c547a2..509bf3b6 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/properties.pro +++ b/examples/declarative/cppextensions/referenceexamples/properties/properties.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += properties.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/properties -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/properties -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/properties +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/signal/signal.pro b/examples/declarative/cppextensions/referenceexamples/signal/signal.pro index d62fb200..11465c38 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/signal.pro +++ b/examples/declarative/cppextensions/referenceexamples/signal/signal.pro @@ -7,7 +7,5 @@ HEADERS += person.h \ birthdayparty.h RESOURCES += signal.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/signal -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/signal -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/signal +INSTALLS += target diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro b/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro index 1af33152..ada2ad76 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro +++ b/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro @@ -9,7 +9,5 @@ HEADERS += person.h \ happybirthdaysong.h RESOURCES += valuesource.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/valuesource -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/cppextensions/referenceexamples/valuesource -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/referenceexamples/valuesource +INSTALLS += target diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro index c2e93d55..4079afc2 100644 --- a/examples/declarative/declarative.pro +++ b/examples/declarative/declarative.pro @@ -2,29 +2,36 @@ TEMPLATE = subdirs # These examples contain some C++ and need to be built SUBDIRS = \ - animation \ - cppextensions \ - modelviews \ - i18n \ - imageelements \ - keyinteraction/focus \ - positioners \ - sqllocalstorage \ - text \ - threading \ - tutorials \ - touchinteraction \ - toys \ - ui-components + animation \ + calculator \ + cppextensions \ + flickr \ + i18n \ + imageelements \ + keyinteraction/focus \ + minehunt \ + modelviews \ + photoviewer \ + positioners \ + righttoleft \ + rssnews \ + samegame \ + shadereffects \ + snake \ + sqllocalstorage \ + text \ + threading \ + touchinteraction \ + toys \ + tutorials \ + twitter \ + ui-components # OpenGL shader examples requires opengl and they contain some C++ and need to be built contains(QT_CONFIG, opengl): SUBDIRS += shadereffects # These examples contain no C++ and can simply be copied -sources.files = \ - cppextensions \ - xml \ - declarative.pro - -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative -INSTALLS += sources +EXAMPLE_FILES = \ + helper \ + screenorientation \ + xml diff --git a/examples/demos/flickr/flickr.desktop b/examples/declarative/flickr/flickr.desktop index 8467f39b..8467f39b 100644 --- a/examples/demos/flickr/flickr.desktop +++ b/examples/declarative/flickr/flickr.desktop diff --git a/examples/demos/flickr/flickr.pro b/examples/declarative/flickr/flickr.pro index 625b2a57..cfc3afc5 100644 --- a/examples/demos/flickr/flickr.pro +++ b/examples/declarative/flickr/flickr.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/flickr +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/flickr exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/flickr/flickr.qmlproject b/examples/declarative/flickr/flickr.qmlproject index 3a6d8210..3a6d8210 100644 --- a/examples/demos/flickr/flickr.qmlproject +++ b/examples/declarative/flickr/flickr.qmlproject diff --git a/examples/demos/flickr/flickr.svg b/examples/declarative/flickr/flickr.svg index 566acfad..566acfad 100644 --- a/examples/demos/flickr/flickr.svg +++ b/examples/declarative/flickr/flickr.svg diff --git a/examples/demos/flickr/flickr64.png b/examples/declarative/flickr/flickr64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/flickr/flickr64.png +++ b/examples/declarative/flickr/flickr64.png diff --git a/examples/demos/flickr/flickr80.png b/examples/declarative/flickr/flickr80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/flickr/flickr80.png +++ b/examples/declarative/flickr/flickr80.png diff --git a/examples/demos/flickr/flickr_harmattan.desktop b/examples/declarative/flickr/flickr_harmattan.desktop index 19cf6264..19cf6264 100644 --- a/examples/demos/flickr/flickr_harmattan.desktop +++ b/examples/declarative/flickr/flickr_harmattan.desktop diff --git a/examples/demos/flickr/main.cpp b/examples/declarative/flickr/main.cpp index 62e3246e..62e3246e 100644 --- a/examples/demos/flickr/main.cpp +++ b/examples/declarative/flickr/main.cpp diff --git a/examples/demos/flickr/qml/flickr/common/Progress.qml b/examples/declarative/flickr/qml/flickr/common/Progress.qml index 1781497f..1781497f 100644 --- a/examples/demos/flickr/qml/flickr/common/Progress.qml +++ b/examples/declarative/flickr/qml/flickr/common/Progress.qml diff --git a/examples/demos/flickr/qml/flickr/common/RssModel.qml b/examples/declarative/flickr/qml/flickr/common/RssModel.qml index f7070f43..f7070f43 100644 --- a/examples/demos/flickr/qml/flickr/common/RssModel.qml +++ b/examples/declarative/flickr/qml/flickr/common/RssModel.qml diff --git a/examples/demos/flickr/qml/flickr/common/ScrollBar.qml b/examples/declarative/flickr/qml/flickr/common/ScrollBar.qml index 409cfb7e..409cfb7e 100644 --- a/examples/demos/flickr/qml/flickr/common/ScrollBar.qml +++ b/examples/declarative/flickr/qml/flickr/common/ScrollBar.qml diff --git a/examples/demos/flickr/qml/flickr/common/Slider.qml b/examples/declarative/flickr/qml/flickr/common/Slider.qml index dfb4ac11..dfb4ac11 100644 --- a/examples/demos/flickr/qml/flickr/common/Slider.qml +++ b/examples/declarative/flickr/qml/flickr/common/Slider.qml diff --git a/examples/demos/flickr/qml/flickr/common/qmldir b/examples/declarative/flickr/qml/flickr/common/qmldir index adc2479b..adc2479b 100644 --- a/examples/demos/flickr/qml/flickr/common/qmldir +++ b/examples/declarative/flickr/qml/flickr/common/qmldir diff --git a/examples/demos/flickr/qml/flickr/flickr-90.qml b/examples/declarative/flickr/qml/flickr/flickr-90.qml index 6acc92cb..6acc92cb 100644 --- a/examples/demos/flickr/qml/flickr/flickr-90.qml +++ b/examples/declarative/flickr/qml/flickr/flickr-90.qml diff --git a/examples/demos/flickr/qml/flickr/flickr.qml b/examples/declarative/flickr/qml/flickr/flickr.qml index fa303e76..fa303e76 100644 --- a/examples/demos/flickr/qml/flickr/flickr.qml +++ b/examples/declarative/flickr/qml/flickr/flickr.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/Button.qml b/examples/declarative/flickr/qml/flickr/mobile/Button.qml index a993d7d9..a993d7d9 100644 --- a/examples/demos/flickr/qml/flickr/mobile/Button.qml +++ b/examples/declarative/flickr/qml/flickr/mobile/Button.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/GridDelegate.qml b/examples/declarative/flickr/qml/flickr/mobile/GridDelegate.qml index d6df1d0c..d6df1d0c 100644 --- a/examples/demos/flickr/qml/flickr/mobile/GridDelegate.qml +++ b/examples/declarative/flickr/qml/flickr/mobile/GridDelegate.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/ImageDetails.qml b/examples/declarative/flickr/qml/flickr/mobile/ImageDetails.qml index 27a8f44c..27a8f44c 100644 --- a/examples/demos/flickr/qml/flickr/mobile/ImageDetails.qml +++ b/examples/declarative/flickr/qml/flickr/mobile/ImageDetails.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/ListDelegate.qml b/examples/declarative/flickr/qml/flickr/mobile/ListDelegate.qml index 0165ffb0..0165ffb0 100644 --- a/examples/demos/flickr/qml/flickr/mobile/ListDelegate.qml +++ b/examples/declarative/flickr/qml/flickr/mobile/ListDelegate.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/TitleBar.qml b/examples/declarative/flickr/qml/flickr/mobile/TitleBar.qml index 82370212..82370212 100644 --- a/examples/demos/flickr/qml/flickr/mobile/TitleBar.qml +++ b/examples/declarative/flickr/qml/flickr/mobile/TitleBar.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/ToolBar.qml b/examples/declarative/flickr/qml/flickr/mobile/ToolBar.qml index 7e268303..7e268303 100644 --- a/examples/demos/flickr/qml/flickr/mobile/ToolBar.qml +++ b/examples/declarative/flickr/qml/flickr/mobile/ToolBar.qml diff --git a/examples/demos/flickr/qml/flickr/mobile/images/gloss.png b/examples/declarative/flickr/qml/flickr/mobile/images/gloss.png Binary files differindex 5d370cd9..5d370cd9 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/gloss.png +++ b/examples/declarative/flickr/qml/flickr/mobile/images/gloss.png diff --git a/examples/demos/flickr/qml/flickr/mobile/images/lineedit.png b/examples/declarative/flickr/qml/flickr/mobile/images/lineedit.png Binary files differindex 2cc38dc3..2cc38dc3 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/lineedit.png +++ b/examples/declarative/flickr/qml/flickr/mobile/images/lineedit.png diff --git a/examples/demos/flickr/qml/flickr/mobile/images/lineedit.sci b/examples/declarative/flickr/qml/flickr/mobile/images/lineedit.sci index 054bff78..054bff78 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/lineedit.sci +++ b/examples/declarative/flickr/qml/flickr/mobile/images/lineedit.sci diff --git a/examples/demos/flickr/qml/flickr/mobile/images/quit.png b/examples/declarative/flickr/qml/flickr/mobile/images/quit.png Binary files differindex 5bda1b6e..5bda1b6e 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/quit.png +++ b/examples/declarative/flickr/qml/flickr/mobile/images/quit.png diff --git a/examples/demos/flickr/qml/flickr/mobile/images/stripes.png b/examples/declarative/flickr/qml/flickr/mobile/images/stripes.png Binary files differindex 9f36727e..9f36727e 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/stripes.png +++ b/examples/declarative/flickr/qml/flickr/mobile/images/stripes.png diff --git a/examples/demos/flickr/qml/flickr/mobile/images/titlebar.png b/examples/declarative/flickr/qml/flickr/mobile/images/titlebar.png Binary files differindex 51c90082..51c90082 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/titlebar.png +++ b/examples/declarative/flickr/qml/flickr/mobile/images/titlebar.png diff --git a/examples/demos/flickr/qml/flickr/mobile/images/titlebar.sci b/examples/declarative/flickr/qml/flickr/mobile/images/titlebar.sci index 0418d94c..0418d94c 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/titlebar.sci +++ b/examples/declarative/flickr/qml/flickr/mobile/images/titlebar.sci diff --git a/examples/demos/flickr/qml/flickr/mobile/images/toolbutton.png b/examples/declarative/flickr/qml/flickr/mobile/images/toolbutton.png Binary files differindex 11310013..11310013 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/toolbutton.png +++ b/examples/declarative/flickr/qml/flickr/mobile/images/toolbutton.png diff --git a/examples/demos/flickr/qml/flickr/mobile/images/toolbutton.sci b/examples/declarative/flickr/qml/flickr/mobile/images/toolbutton.sci index 9e4f9653..9e4f9653 100644 --- a/examples/demos/flickr/qml/flickr/mobile/images/toolbutton.sci +++ b/examples/declarative/flickr/qml/flickr/mobile/images/toolbutton.sci diff --git a/examples/helper/deployment.pri b/examples/declarative/helper/deployment.pri index 8dba8025..8dba8025 100644 --- a/examples/helper/deployment.pri +++ b/examples/declarative/helper/deployment.pri diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/helper/qmlapplicationviewer/qmlapplicationviewer.cpp index 05d481be..05d481be 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/examples/declarative/helper/qmlapplicationviewer/qmlapplicationviewer.cpp diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/helper/qmlapplicationviewer/qmlapplicationviewer.h index be12f6a8..be12f6a8 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h +++ b/examples/declarative/helper/qmlapplicationviewer/qmlapplicationviewer.h diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/helper/qmlapplicationviewer/qmlapplicationviewer.pri index 3218a12d..3218a12d 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri +++ b/examples/declarative/helper/qmlapplicationviewer/qmlapplicationviewer.pri diff --git a/examples/declarative/i18n/i18n.pro b/examples/declarative/i18n/i18n.pro index abae210e..bfb628a8 100644 --- a/examples/declarative/i18n/i18n.pro +++ b/examples/declarative/i18n/i18n.pro @@ -23,8 +23,8 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/i18n +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/i18n exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) else:exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/imageelements/borderimage/borderimage.pro b/examples/declarative/imageelements/borderimage/borderimage.pro index 5cfc2e5b..72ca4bb5 100644 --- a/examples/declarative/imageelements/borderimage/borderimage.pro +++ b/examples/declarative/imageelements/borderimage/borderimage.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/imageelements/borderimage +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/imageelements/borderimage exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/imageelements/image/image.pro b/examples/declarative/imageelements/image/image.pro index d19b6fde..0eba8390 100644 --- a/examples/declarative/imageelements/image/image.pro +++ b/examples/declarative/imageelements/image/image.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/imageelements/image +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/imageelements/image exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/imageelements/imageelements.pro b/examples/declarative/imageelements/imageelements.pro index 7c1d576a..8aa99203 100644 --- a/examples/declarative/imageelements/imageelements.pro +++ b/examples/declarative/imageelements/imageelements.pro @@ -4,8 +4,3 @@ SUBDIRS += \ borderimage \ image \ shadows - -# install -sources.files = imageelements.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/imageelements -INSTALLS += sources diff --git a/examples/declarative/imageelements/shadows/shadows.pro b/examples/declarative/imageelements/shadows/shadows.pro index 035a06a6..4f5d91fa 100644 --- a/examples/declarative/imageelements/shadows/shadows.pro +++ b/examples/declarative/imageelements/shadows/shadows.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/imageelements/shadows +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/imageelements/shadows exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/keyinteraction/focus/focus.pro b/examples/declarative/keyinteraction/focus/focus.pro index 584a80bf..e18ffa8e 100644 --- a/examples/declarative/keyinteraction/focus/focus.pro +++ b/examples/declarative/keyinteraction/focus/focus.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/keyinteraction/focus +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/keyinteraction/focus exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/minehunt/README b/examples/declarative/minehunt/README index 3849ca5f..3849ca5f 100644 --- a/examples/demos/minehunt/README +++ b/examples/declarative/minehunt/README diff --git a/examples/demos/minehunt/main.cpp b/examples/declarative/minehunt/main.cpp index cfe36f0b..cfe36f0b 100644 --- a/examples/demos/minehunt/main.cpp +++ b/examples/declarative/minehunt/main.cpp diff --git a/examples/demos/minehunt/minehunt.cpp b/examples/declarative/minehunt/minehunt.cpp index 3527cc17..3527cc17 100644 --- a/examples/demos/minehunt/minehunt.cpp +++ b/examples/declarative/minehunt/minehunt.cpp diff --git a/examples/demos/minehunt/minehunt.h b/examples/declarative/minehunt/minehunt.h index f949ffd7..f949ffd7 100644 --- a/examples/demos/minehunt/minehunt.h +++ b/examples/declarative/minehunt/minehunt.h diff --git a/examples/demos/minehunt/minehunt.pro b/examples/declarative/minehunt/minehunt.pro index 2a43a11f..6a630a1f 100644 --- a/examples/demos/minehunt/minehunt.pro +++ b/examples/declarative/minehunt/minehunt.pro @@ -19,7 +19,7 @@ SOURCES += main.cpp minehunt.cpp RESOURCES = minehunt.qrc # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/minehunt +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/minehunt exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/minehunt/minehunt.qmlproject b/examples/declarative/minehunt/minehunt.qmlproject index 1f8b659f..1f8b659f 100644 --- a/examples/demos/minehunt/minehunt.qmlproject +++ b/examples/declarative/minehunt/minehunt.qmlproject diff --git a/examples/demos/minehunt/minehunt.qrc b/examples/declarative/minehunt/minehunt.qrc index 4694beb1..4694beb1 100644 --- a/examples/demos/minehunt/minehunt.qrc +++ b/examples/declarative/minehunt/minehunt.qrc diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/Explosion.qml b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/Explosion.qml index f096c26c..f096c26c 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/Explosion.qml +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/Explosion.qml diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/Tile.qml b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/Tile.qml index 15b8f871..15b8f871 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/Tile.qml +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/Tile.qml diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/back.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/back.png Binary files differindex f6b3f0b4..f6b3f0b4 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/back.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/back.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/background.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/background.png Binary files differindex 3734a277..3734a277 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/background.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/background.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/bomb-color.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/bomb-color.png Binary files differindex 61ad0a92..61ad0a92 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/bomb-color.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/bomb-color.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/bomb.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/bomb.png Binary files differindex a9925755..a9925755 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/bomb.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/bomb.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/face-sad.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/face-sad.png Binary files differindex cf00aafe..cf00aafe 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/face-sad.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/face-sad.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/face-smile-big.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/face-smile-big.png Binary files differindex f9c2335d..f9c2335d 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/face-smile-big.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/face-smile-big.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/face-smile.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/face-smile.png Binary files differindex 3d66d725..3d66d725 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/face-smile.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/face-smile.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/flag-color.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/flag-color.png Binary files differindex aadad0f1..aadad0f1 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/flag-color.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/flag-color.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/flag.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/flag.png Binary files differindex 39cde4df..39cde4df 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/flag.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/flag.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/front.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/front.png Binary files differindex 834331bd..834331bd 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/front.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/front.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/quit.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/quit.png Binary files differindex b822057d..b822057d 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/quit.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/quit.png diff --git a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/star.png b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/star.png Binary files differindex 37723591..37723591 100644 --- a/examples/demos/minehunt/qml/minehunt/MinehuntCore/pics/star.png +++ b/examples/declarative/minehunt/qml/minehunt/MinehuntCore/pics/star.png diff --git a/examples/demos/minehunt/qml/minehunt/minehunt.qml b/examples/declarative/minehunt/qml/minehunt/minehunt.qml index 2c0911a2..2c0911a2 100644 --- a/examples/demos/minehunt/qml/minehunt/minehunt.qml +++ b/examples/declarative/minehunt/qml/minehunt/minehunt.qml diff --git a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro b/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro index 7ba55ba6..8bf11423 100644 --- a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro +++ b/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro @@ -21,7 +21,7 @@ SOURCES = main.cpp model.cpp HEADERS = model.h # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/abstractitemmodel +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/abstractitemmodel exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/gridview/gridview.pro b/examples/declarative/modelviews/gridview/gridview.pro index 6d7ffc37..f83458da 100644 --- a/examples/declarative/modelviews/gridview/gridview.pro +++ b/examples/declarative/modelviews/gridview/gridview.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/gridview +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/gridview exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro index c37afe45..243d9ace 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro +++ b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/listview/dynamiclist +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/dynamiclist exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro index 1ddbb46f..e3d3cd01 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro +++ b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/listview/expandingdelegates +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/expandingdelegates exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/highlight/highlight.pro b/examples/declarative/modelviews/listview/highlight/highlight.pro index 062de0a7..2ef2c0fb 100644 --- a/examples/declarative/modelviews/listview/highlight/highlight.pro +++ b/examples/declarative/modelviews/listview/highlight/highlight.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/listview/highlight +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/highlight exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro b/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro index b27e2c06..1cb417d1 100644 --- a/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro +++ b/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/listview/highlightranges +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/highlightranges exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/listview.pro b/examples/declarative/modelviews/listview/listview.pro index fa7def33..877eb7cd 100644 --- a/examples/declarative/modelviews/listview/listview.pro +++ b/examples/declarative/modelviews/listview/listview.pro @@ -6,8 +6,3 @@ SUBDIRS += \ highlight \ highlightranges \ sections - -# install -sources.files = listview.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/listview -INSTALLS += sources diff --git a/examples/declarative/modelviews/listview/sections/sections.pro b/examples/declarative/modelviews/listview/sections/sections.pro index edad3e58..5f08fb97 100644 --- a/examples/declarative/modelviews/listview/sections/sections.pro +++ b/examples/declarative/modelviews/listview/sections/sections.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/listview/sections +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/sections exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/modelviews.pro b/examples/declarative/modelviews/modelviews.pro index ee05704c..c50dd742 100644 --- a/examples/declarative/modelviews/modelviews.pro +++ b/examples/declarative/modelviews/modelviews.pro @@ -10,8 +10,3 @@ SUBDIRS += \ pathview \ stringlistmodel \ visualitemmodel - -# install -sources.files = modelviews.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews -INSTALLS += sources diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro index d37bd87b..fb401bd0 100644 --- a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro +++ b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro @@ -22,7 +22,7 @@ SOURCES += main.cpp \ HEADERS += dataobject.h # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/objectlistmodel +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/objectlistmodel exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/package/package.pro b/examples/declarative/modelviews/package/package.pro index d68cdcc8..fbb0408a 100644 --- a/examples/declarative/modelviews/package/package.pro +++ b/examples/declarative/modelviews/package/package.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/package +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/package exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/parallax/parallax.pro b/examples/declarative/modelviews/parallax/parallax.pro index cf21b699..6b1d258b 100644 --- a/examples/declarative/modelviews/parallax/parallax.pro +++ b/examples/declarative/modelviews/parallax/parallax.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/parallax +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/parallax exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/pathview/pathview.pro b/examples/declarative/modelviews/pathview/pathview.pro index e88bbc67..2e4138e4 100644 --- a/examples/declarative/modelviews/pathview/pathview.pro +++ b/examples/declarative/modelviews/pathview/pathview.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/pathview +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/pathview exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro index 8d326922..da3b9608 100644 --- a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro +++ b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro @@ -20,7 +20,7 @@ QT += widgets SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/stringlistmodel +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/stringlistmodel exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro index 7309eea1..07a33b3d 100644 --- a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro +++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/modelviews/visualitemmodel +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/visualitemmodel exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/photoviewer/main.cpp b/examples/declarative/photoviewer/main.cpp index ba976b2d..ba976b2d 100644 --- a/examples/demos/photoviewer/main.cpp +++ b/examples/declarative/photoviewer/main.cpp diff --git a/examples/demos/photoviewer/photoviewer.desktop b/examples/declarative/photoviewer/photoviewer.desktop index 4246b9f3..4246b9f3 100644 --- a/examples/demos/photoviewer/photoviewer.desktop +++ b/examples/declarative/photoviewer/photoviewer.desktop diff --git a/examples/demos/photoviewer/photoviewer.pro b/examples/declarative/photoviewer/photoviewer.pro index 694aeb36..5e7849f9 100644 --- a/examples/demos/photoviewer/photoviewer.pro +++ b/examples/declarative/photoviewer/photoviewer.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/photoviewer +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/photoviewer exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/photoviewer/photoviewer.qmlproject b/examples/declarative/photoviewer/photoviewer.qmlproject index 025a3a8f..025a3a8f 100644 --- a/examples/demos/photoviewer/photoviewer.qmlproject +++ b/examples/declarative/photoviewer/photoviewer.qmlproject diff --git a/examples/demos/photoviewer/photoviewer.svg b/examples/declarative/photoviewer/photoviewer.svg index 566acfad..566acfad 100644 --- a/examples/demos/photoviewer/photoviewer.svg +++ b/examples/declarative/photoviewer/photoviewer.svg diff --git a/examples/demos/photoviewer/photoviewer64.png b/examples/declarative/photoviewer/photoviewer64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/photoviewer/photoviewer64.png +++ b/examples/declarative/photoviewer/photoviewer64.png diff --git a/examples/demos/photoviewer/photoviewer80.png b/examples/declarative/photoviewer/photoviewer80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/photoviewer/photoviewer80.png +++ b/examples/declarative/photoviewer/photoviewer80.png diff --git a/examples/demos/photoviewer/photoviewer_harmattan.desktop b/examples/declarative/photoviewer/photoviewer_harmattan.desktop index 2dced148..2dced148 100644 --- a/examples/demos/photoviewer/photoviewer_harmattan.desktop +++ b/examples/declarative/photoviewer/photoviewer_harmattan.desktop diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml index 1b6e522b..1b6e522b 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/AlbumDelegate.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml index 3cfeaf83..3cfeaf83 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/BusyIndicator.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/Button.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/Button.qml index 29635d5a..29635d5a 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/Button.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/Button.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/EditableButton.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/EditableButton.qml index de98a515..de98a515 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/EditableButton.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml index bf7d92ee..bf7d92ee 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/PhotoDelegate.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/ProgressBar.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/ProgressBar.qml index 2e3e2fa8..2e3e2fa8 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/ProgressBar.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/ProgressBar.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/RssModel.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/RssModel.qml index 3bbcb5ab..3bbcb5ab 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/RssModel.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/RssModel.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/Tag.qml b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/Tag.qml index 8f783d40..8f783d40 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/Tag.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/Tag.qml diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/images/box-shadow.png b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/images/box-shadow.png Binary files differindex 431af854..431af854 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/images/box-shadow.png +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/images/box-shadow.png diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/images/busy.png b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/images/busy.png Binary files differindex 664c2b14..664c2b14 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/images/busy.png +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/images/busy.png diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/images/cardboard.png b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/images/cardboard.png Binary files differindex 1847ab52..1847ab52 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/images/cardboard.png +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/images/cardboard.png diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/qmldir b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/qmldir index d3c247f2..d3c247f2 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/qmldir +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/qmldir diff --git a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/script/script.js b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/script/script.js index e8ef93a8..e8ef93a8 100644 --- a/examples/demos/photoviewer/qml/photoviewer/PhotoViewerCore/script/script.js +++ b/examples/declarative/photoviewer/qml/photoviewer/PhotoViewerCore/script/script.js diff --git a/examples/demos/photoviewer/qml/photoviewer/i18n/base.ts b/examples/declarative/photoviewer/qml/photoviewer/i18n/base.ts index 1accfd2f..1accfd2f 100644 --- a/examples/demos/photoviewer/qml/photoviewer/i18n/base.ts +++ b/examples/declarative/photoviewer/qml/photoviewer/i18n/base.ts diff --git a/examples/demos/photoviewer/qml/photoviewer/i18n/qml_fr.qm b/examples/declarative/photoviewer/qml/photoviewer/i18n/qml_fr.qm Binary files differindex c24fcbc4..c24fcbc4 100644 --- a/examples/demos/photoviewer/qml/photoviewer/i18n/qml_fr.qm +++ b/examples/declarative/photoviewer/qml/photoviewer/i18n/qml_fr.qm diff --git a/examples/demos/photoviewer/qml/photoviewer/i18n/qml_fr.ts b/examples/declarative/photoviewer/qml/photoviewer/i18n/qml_fr.ts index 9f892db6..9f892db6 100644 --- a/examples/demos/photoviewer/qml/photoviewer/i18n/qml_fr.ts +++ b/examples/declarative/photoviewer/qml/photoviewer/i18n/qml_fr.ts diff --git a/examples/demos/photoviewer/qml/photoviewer/photoviewer.qml b/examples/declarative/photoviewer/qml/photoviewer/photoviewer.qml index 9c07e3ce..9c07e3ce 100644 --- a/examples/demos/photoviewer/qml/photoviewer/photoviewer.qml +++ b/examples/declarative/photoviewer/qml/photoviewer/photoviewer.qml diff --git a/examples/declarative/positioners/positioners.pro b/examples/declarative/positioners/positioners.pro index 1991997a..39732285 100644 --- a/examples/declarative/positioners/positioners.pro +++ b/examples/declarative/positioners/positioners.pro @@ -23,8 +23,8 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/positioners +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/positioners exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) else:exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro b/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro index 520ad6d8..901a05e7 100644 --- a/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro +++ b/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro @@ -21,7 +21,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/righttoleft/layoutdirection +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/righttoleft/layoutdirection exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro b/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro index ffcc4d0c..83d1641b 100644 --- a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro +++ b/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro @@ -21,7 +21,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/righttoleft/layoutmirroring +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/righttoleft/layoutmirroring exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/righttoleft/righttoleft.pro b/examples/declarative/righttoleft/righttoleft.pro new file mode 100644 index 00000000..fc5b82fd --- /dev/null +++ b/examples/declarative/righttoleft/righttoleft.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs + +SUBDIRS = \ + layoutdirection \ + layoutmirroring \ + textalignment diff --git a/examples/declarative/righttoleft/textalignment/textalignment.pro b/examples/declarative/righttoleft/textalignment/textalignment.pro index afc8df88..a66ca6c5 100644 --- a/examples/declarative/righttoleft/textalignment/textalignment.pro +++ b/examples/declarative/righttoleft/textalignment/textalignment.pro @@ -21,7 +21,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/righttoleft/textalignment +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/righttoleft/textalignment exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/rssnews/main.cpp b/examples/declarative/rssnews/main.cpp index fb6cd05e..fb6cd05e 100644 --- a/examples/demos/rssnews/main.cpp +++ b/examples/declarative/rssnews/main.cpp diff --git a/examples/demos/rssnews/qml/rssnews/content/BusyIndicator.qml b/examples/declarative/rssnews/qml/rssnews/content/BusyIndicator.qml index e3671cf8..e3671cf8 100644 --- a/examples/demos/rssnews/qml/rssnews/content/BusyIndicator.qml +++ b/examples/declarative/rssnews/qml/rssnews/content/BusyIndicator.qml diff --git a/examples/demos/rssnews/qml/rssnews/content/CategoryDelegate.qml b/examples/declarative/rssnews/qml/rssnews/content/CategoryDelegate.qml index fff34953..fff34953 100644 --- a/examples/demos/rssnews/qml/rssnews/content/CategoryDelegate.qml +++ b/examples/declarative/rssnews/qml/rssnews/content/CategoryDelegate.qml diff --git a/examples/demos/rssnews/qml/rssnews/content/NewsDelegate.qml b/examples/declarative/rssnews/qml/rssnews/content/NewsDelegate.qml index 030f1d88..030f1d88 100644 --- a/examples/demos/rssnews/qml/rssnews/content/NewsDelegate.qml +++ b/examples/declarative/rssnews/qml/rssnews/content/NewsDelegate.qml diff --git a/examples/demos/rssnews/qml/rssnews/content/RssFeeds.qml b/examples/declarative/rssnews/qml/rssnews/content/RssFeeds.qml index 7aaa5ea8..7aaa5ea8 100644 --- a/examples/demos/rssnews/qml/rssnews/content/RssFeeds.qml +++ b/examples/declarative/rssnews/qml/rssnews/content/RssFeeds.qml diff --git a/examples/demos/rssnews/qml/rssnews/content/ScrollBar.qml b/examples/declarative/rssnews/qml/rssnews/content/ScrollBar.qml index 0e2275fb..0e2275fb 100644 --- a/examples/demos/rssnews/qml/rssnews/content/ScrollBar.qml +++ b/examples/declarative/rssnews/qml/rssnews/content/ScrollBar.qml diff --git a/examples/demos/rssnews/qml/rssnews/content/images/busy.png b/examples/declarative/rssnews/qml/rssnews/content/images/busy.png Binary files differindex 664c2b14..664c2b14 100644 --- a/examples/demos/rssnews/qml/rssnews/content/images/busy.png +++ b/examples/declarative/rssnews/qml/rssnews/content/images/busy.png diff --git a/examples/demos/rssnews/qml/rssnews/content/images/scrollbar.png b/examples/declarative/rssnews/qml/rssnews/content/images/scrollbar.png Binary files differindex 0228dcf9..0228dcf9 100644 --- a/examples/demos/rssnews/qml/rssnews/content/images/scrollbar.png +++ b/examples/declarative/rssnews/qml/rssnews/content/images/scrollbar.png diff --git a/examples/demos/rssnews/qml/rssnews/rssnews.qml b/examples/declarative/rssnews/qml/rssnews/rssnews.qml index 18ea2ed0..18ea2ed0 100644 --- a/examples/demos/rssnews/qml/rssnews/rssnews.qml +++ b/examples/declarative/rssnews/qml/rssnews/rssnews.qml diff --git a/examples/demos/rssnews/rssnews.desktop b/examples/declarative/rssnews/rssnews.desktop index 7d02ed5f..7d02ed5f 100644 --- a/examples/demos/rssnews/rssnews.desktop +++ b/examples/declarative/rssnews/rssnews.desktop diff --git a/examples/demos/rssnews/rssnews.pro b/examples/declarative/rssnews/rssnews.pro index 14002fb1..57b81fe6 100644 --- a/examples/demos/rssnews/rssnews.pro +++ b/examples/declarative/rssnews/rssnews.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/rssnews +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/rssnews exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/rssnews/rssnews.qmlproject b/examples/declarative/rssnews/rssnews.qmlproject index 608be8d3..608be8d3 100644 --- a/examples/demos/rssnews/rssnews.qmlproject +++ b/examples/declarative/rssnews/rssnews.qmlproject diff --git a/examples/demos/rssnews/rssnews.svg b/examples/declarative/rssnews/rssnews.svg index 566acfad..566acfad 100644 --- a/examples/demos/rssnews/rssnews.svg +++ b/examples/declarative/rssnews/rssnews.svg diff --git a/examples/demos/rssnews/rssnews64.png b/examples/declarative/rssnews/rssnews64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/rssnews/rssnews64.png +++ b/examples/declarative/rssnews/rssnews64.png diff --git a/examples/demos/rssnews/rssnews80.png b/examples/declarative/rssnews/rssnews80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/rssnews/rssnews80.png +++ b/examples/declarative/rssnews/rssnews80.png diff --git a/examples/demos/rssnews/rssnews_harmattan.desktop b/examples/declarative/rssnews/rssnews_harmattan.desktop index df6303ff..df6303ff 100644 --- a/examples/demos/rssnews/rssnews_harmattan.desktop +++ b/examples/declarative/rssnews/rssnews_harmattan.desktop diff --git a/examples/demos/samegame/main.cpp b/examples/declarative/samegame/main.cpp index f6e2b732..f6e2b732 100644 --- a/examples/demos/samegame/main.cpp +++ b/examples/declarative/samegame/main.cpp diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/BoomBlock.qml b/examples/declarative/samegame/qml/samegame/SamegameCore/BoomBlock.qml index 52cd54db..52cd54db 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/BoomBlock.qml +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/BoomBlock.qml diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/Button.qml b/examples/declarative/samegame/qml/samegame/SamegameCore/Button.qml index 91247233..91247233 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/Button.qml +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/Button.qml diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/Dialog.qml b/examples/declarative/samegame/qml/samegame/SamegameCore/Dialog.qml index ba3e9c60..ba3e9c60 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/Dialog.qml +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/Dialog.qml diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/background.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/background.png Binary files differindex 3734a277..3734a277 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/background.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/background.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/blueStar.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/blueStar.png Binary files differindex ff9588f8..ff9588f8 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/blueStar.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/blueStar.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/blueStone.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/blueStone.png Binary files differindex 20e43c75..20e43c75 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/blueStone.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/blueStone.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/greenStar.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/greenStar.png Binary files differindex cd068547..cd068547 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/greenStar.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/greenStar.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/greenStone.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/greenStone.png Binary files differindex b568a190..b568a190 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/greenStone.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/greenStone.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/redStar.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/redStar.png Binary files differindex 0a4dffe5..0a4dffe5 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/redStar.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/redStar.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/redStone.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/redStone.png Binary files differindex 36b09a26..36b09a26 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/redStone.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/redStone.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/star.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/star.png Binary files differindex defbde53..defbde53 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/star.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/star.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/pics/yellowStone.png b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/yellowStone.png Binary files differindex b1ce7621..b1ce7621 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/pics/yellowStone.png +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/pics/yellowStone.png diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/qmldir b/examples/declarative/samegame/qml/samegame/SamegameCore/qmldir index e17b1f5d..e17b1f5d 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/qmldir +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/qmldir diff --git a/examples/demos/samegame/qml/samegame/SamegameCore/samegame.js b/examples/declarative/samegame/qml/samegame/SamegameCore/samegame.js index d7b827a1..d7b827a1 100644 --- a/examples/demos/samegame/qml/samegame/SamegameCore/samegame.js +++ b/examples/declarative/samegame/qml/samegame/SamegameCore/samegame.js diff --git a/examples/demos/samegame/qml/samegame/highscores/README b/examples/declarative/samegame/qml/samegame/highscores/README index eaa00fae..eaa00fae 100644 --- a/examples/demos/samegame/qml/samegame/highscores/README +++ b/examples/declarative/samegame/qml/samegame/highscores/README diff --git a/examples/demos/samegame/qml/samegame/highscores/score_data.xml b/examples/declarative/samegame/qml/samegame/highscores/score_data.xml index c3fd90d9..c3fd90d9 100644 --- a/examples/demos/samegame/qml/samegame/highscores/score_data.xml +++ b/examples/declarative/samegame/qml/samegame/highscores/score_data.xml diff --git a/examples/demos/samegame/qml/samegame/highscores/score_style.xsl b/examples/declarative/samegame/qml/samegame/highscores/score_style.xsl index 670354c9..670354c9 100644 --- a/examples/demos/samegame/qml/samegame/highscores/score_style.xsl +++ b/examples/declarative/samegame/qml/samegame/highscores/score_style.xsl diff --git a/examples/demos/samegame/qml/samegame/highscores/scores.php b/examples/declarative/samegame/qml/samegame/highscores/scores.php index 3cceb2d7..3cceb2d7 100644 --- a/examples/demos/samegame/qml/samegame/highscores/scores.php +++ b/examples/declarative/samegame/qml/samegame/highscores/scores.php diff --git a/examples/demos/samegame/qml/samegame/samegame.qml b/examples/declarative/samegame/qml/samegame/samegame.qml index 5356ab78..5356ab78 100644 --- a/examples/demos/samegame/qml/samegame/samegame.qml +++ b/examples/declarative/samegame/qml/samegame/samegame.qml diff --git a/examples/demos/samegame/samegame.desktop b/examples/declarative/samegame/samegame.desktop index 18ad2d98..18ad2d98 100644 --- a/examples/demos/samegame/samegame.desktop +++ b/examples/declarative/samegame/samegame.desktop diff --git a/examples/demos/samegame/samegame.pro b/examples/declarative/samegame/samegame.pro index 6342ba4a..baac5dc1 100644 --- a/examples/demos/samegame/samegame.pro +++ b/examples/declarative/samegame/samegame.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/samegame +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/samegame exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/samegame/samegame.qmlproject b/examples/declarative/samegame/samegame.qmlproject index c17ee1ee..c17ee1ee 100644 --- a/examples/demos/samegame/samegame.qmlproject +++ b/examples/declarative/samegame/samegame.qmlproject diff --git a/examples/demos/samegame/samegame.svg b/examples/declarative/samegame/samegame.svg index 566acfad..566acfad 100644 --- a/examples/demos/samegame/samegame.svg +++ b/examples/declarative/samegame/samegame.svg diff --git a/examples/demos/samegame/samegame64.png b/examples/declarative/samegame/samegame64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/samegame/samegame64.png +++ b/examples/declarative/samegame/samegame64.png diff --git a/examples/demos/samegame/samegame80.png b/examples/declarative/samegame/samegame80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/samegame/samegame80.png +++ b/examples/declarative/samegame/samegame80.png diff --git a/examples/demos/samegame/samegame_harmattan.desktop b/examples/declarative/samegame/samegame_harmattan.desktop index 1f35b8e3..1f35b8e3 100644 --- a/examples/demos/samegame/samegame_harmattan.desktop +++ b/examples/declarative/samegame/samegame_harmattan.desktop diff --git a/examples/declarative/shadereffects/shadereffects.pro b/examples/declarative/shadereffects/shadereffects.pro index 4911a52b..7a4f1a8b 100644 --- a/examples/declarative/shadereffects/shadereffects.pro +++ b/examples/declarative/shadereffects/shadereffects.pro @@ -20,8 +20,8 @@ QT += declarative opengl SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/shadereffects +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/shadereffects exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) else:exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/snake/main.cpp b/examples/declarative/snake/main.cpp index 7bd252f0..7bd252f0 100644 --- a/examples/demos/snake/main.cpp +++ b/examples/declarative/snake/main.cpp diff --git a/examples/demos/snake/qml/snake/content/Button.qml b/examples/declarative/snake/qml/snake/content/Button.qml index c1e0be5c..c1e0be5c 100644 --- a/examples/demos/snake/qml/snake/content/Button.qml +++ b/examples/declarative/snake/qml/snake/content/Button.qml diff --git a/examples/demos/snake/qml/snake/content/Cookie.qml b/examples/declarative/snake/qml/snake/content/Cookie.qml index 353bf508..353bf508 100644 --- a/examples/demos/snake/qml/snake/content/Cookie.qml +++ b/examples/declarative/snake/qml/snake/content/Cookie.qml diff --git a/examples/demos/snake/qml/snake/content/HighScoreModel.qml b/examples/declarative/snake/qml/snake/content/HighScoreModel.qml index 58695c6e..58695c6e 100644 --- a/examples/demos/snake/qml/snake/content/HighScoreModel.qml +++ b/examples/declarative/snake/qml/snake/content/HighScoreModel.qml diff --git a/examples/demos/snake/qml/snake/content/Link.qml b/examples/declarative/snake/qml/snake/content/Link.qml index 7ace4054..7ace4054 100644 --- a/examples/demos/snake/qml/snake/content/Link.qml +++ b/examples/declarative/snake/qml/snake/content/Link.qml diff --git a/examples/demos/snake/qml/snake/content/Skull.qml b/examples/declarative/snake/qml/snake/content/Skull.qml index 111e87b3..111e87b3 100644 --- a/examples/demos/snake/qml/snake/content/Skull.qml +++ b/examples/declarative/snake/qml/snake/content/Skull.qml diff --git a/examples/demos/snake/qml/snake/content/pics/README b/examples/declarative/snake/qml/snake/content/pics/README index 0215132c..0215132c 100644 --- a/examples/demos/snake/qml/snake/content/pics/README +++ b/examples/declarative/snake/qml/snake/content/pics/README diff --git a/examples/demos/snake/qml/snake/content/pics/background.png b/examples/declarative/snake/qml/snake/content/pics/background.png Binary files differindex 72dffaa8..72dffaa8 100644 --- a/examples/demos/snake/qml/snake/content/pics/background.png +++ b/examples/declarative/snake/qml/snake/content/pics/background.png diff --git a/examples/demos/snake/qml/snake/content/pics/blueStar.png b/examples/declarative/snake/qml/snake/content/pics/blueStar.png Binary files differindex ba7acabd..ba7acabd 100644 --- a/examples/demos/snake/qml/snake/content/pics/blueStar.png +++ b/examples/declarative/snake/qml/snake/content/pics/blueStar.png diff --git a/examples/demos/snake/qml/snake/content/pics/blueStone.png b/examples/declarative/snake/qml/snake/content/pics/blueStone.png Binary files differindex 356affdd..356affdd 100644 --- a/examples/demos/snake/qml/snake/content/pics/blueStone.png +++ b/examples/declarative/snake/qml/snake/content/pics/blueStone.png diff --git a/examples/demos/snake/qml/snake/content/pics/cookie.png b/examples/declarative/snake/qml/snake/content/pics/cookie.png Binary files differindex aec2957f..aec2957f 100644 --- a/examples/demos/snake/qml/snake/content/pics/cookie.png +++ b/examples/declarative/snake/qml/snake/content/pics/cookie.png diff --git a/examples/demos/snake/qml/snake/content/pics/eyes.svg b/examples/declarative/snake/qml/snake/content/pics/eyes.svg index 10786927..10786927 100644 --- a/examples/demos/snake/qml/snake/content/pics/eyes.svg +++ b/examples/declarative/snake/qml/snake/content/pics/eyes.svg diff --git a/examples/demos/snake/qml/snake/content/pics/head.png b/examples/declarative/snake/qml/snake/content/pics/head.png Binary files differindex 550e0026..550e0026 100644 --- a/examples/demos/snake/qml/snake/content/pics/head.png +++ b/examples/declarative/snake/qml/snake/content/pics/head.png diff --git a/examples/demos/snake/qml/snake/content/pics/head.svg b/examples/declarative/snake/qml/snake/content/pics/head.svg index 3bf0bd2f..3bf0bd2f 100644 --- a/examples/demos/snake/qml/snake/content/pics/head.svg +++ b/examples/declarative/snake/qml/snake/content/pics/head.svg diff --git a/examples/demos/snake/qml/snake/content/pics/pause.png b/examples/declarative/snake/qml/snake/content/pics/pause.png Binary files differindex 056d97dd..056d97dd 100644 --- a/examples/demos/snake/qml/snake/content/pics/pause.png +++ b/examples/declarative/snake/qml/snake/content/pics/pause.png diff --git a/examples/demos/snake/qml/snake/content/pics/redStar.png b/examples/declarative/snake/qml/snake/content/pics/redStar.png Binary files differindex cd068547..cd068547 100644 --- a/examples/demos/snake/qml/snake/content/pics/redStar.png +++ b/examples/declarative/snake/qml/snake/content/pics/redStar.png diff --git a/examples/demos/snake/qml/snake/content/pics/redStone.png b/examples/declarative/snake/qml/snake/content/pics/redStone.png Binary files differindex 9bb7fe42..9bb7fe42 100644 --- a/examples/demos/snake/qml/snake/content/pics/redStone.png +++ b/examples/declarative/snake/qml/snake/content/pics/redStone.png diff --git a/examples/demos/snake/qml/snake/content/pics/skull.png b/examples/declarative/snake/qml/snake/content/pics/skull.png Binary files differindex 63186167..63186167 100644 --- a/examples/demos/snake/qml/snake/content/pics/skull.png +++ b/examples/declarative/snake/qml/snake/content/pics/skull.png diff --git a/examples/demos/snake/qml/snake/content/pics/snake.jpg b/examples/declarative/snake/qml/snake/content/pics/snake.jpg Binary files differindex e91a784f..e91a784f 100644 --- a/examples/demos/snake/qml/snake/content/pics/snake.jpg +++ b/examples/declarative/snake/qml/snake/content/pics/snake.jpg diff --git a/examples/demos/snake/qml/snake/content/pics/star.png b/examples/declarative/snake/qml/snake/content/pics/star.png Binary files differindex defbde53..defbde53 100644 --- a/examples/demos/snake/qml/snake/content/pics/star.png +++ b/examples/declarative/snake/qml/snake/content/pics/star.png diff --git a/examples/demos/snake/qml/snake/content/pics/stoneShadow.png b/examples/declarative/snake/qml/snake/content/pics/stoneShadow.png Binary files differindex 1bd56afd..1bd56afd 100644 --- a/examples/demos/snake/qml/snake/content/pics/stoneShadow.png +++ b/examples/declarative/snake/qml/snake/content/pics/stoneShadow.png diff --git a/examples/demos/snake/qml/snake/content/pics/yellowStar.png b/examples/declarative/snake/qml/snake/content/pics/yellowStar.png Binary files differindex 52fb9c4b..52fb9c4b 100644 --- a/examples/demos/snake/qml/snake/content/pics/yellowStar.png +++ b/examples/declarative/snake/qml/snake/content/pics/yellowStar.png diff --git a/examples/demos/snake/qml/snake/content/pics/yellowStone.png b/examples/declarative/snake/qml/snake/content/pics/yellowStone.png Binary files differindex c56124a8..c56124a8 100644 --- a/examples/demos/snake/qml/snake/content/pics/yellowStone.png +++ b/examples/declarative/snake/qml/snake/content/pics/yellowStone.png diff --git a/examples/demos/snake/qml/snake/content/snake.js b/examples/declarative/snake/qml/snake/content/snake.js index 837b82ad..837b82ad 100644 --- a/examples/demos/snake/qml/snake/content/snake.js +++ b/examples/declarative/snake/qml/snake/content/snake.js diff --git a/examples/demos/snake/qml/snake/snake.qml b/examples/declarative/snake/qml/snake/snake.qml index 47e8501c..47e8501c 100644 --- a/examples/demos/snake/qml/snake/snake.qml +++ b/examples/declarative/snake/qml/snake/snake.qml diff --git a/examples/demos/snake/snake.desktop b/examples/declarative/snake/snake.desktop index fef60907..fef60907 100644 --- a/examples/demos/snake/snake.desktop +++ b/examples/declarative/snake/snake.desktop diff --git a/examples/demos/snake/snake.pro b/examples/declarative/snake/snake.pro index 0fa838d5..ce1e28e3 100644 --- a/examples/demos/snake/snake.pro +++ b/examples/declarative/snake/snake.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/snake +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/snake exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/snake/snake.qmlproject b/examples/declarative/snake/snake.qmlproject index 431d2a9e..431d2a9e 100644 --- a/examples/demos/snake/snake.qmlproject +++ b/examples/declarative/snake/snake.qmlproject diff --git a/examples/demos/snake/snake.svg b/examples/declarative/snake/snake.svg index 566acfad..566acfad 100644 --- a/examples/demos/snake/snake.svg +++ b/examples/declarative/snake/snake.svg diff --git a/examples/demos/snake/snake64.png b/examples/declarative/snake/snake64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/snake/snake64.png +++ b/examples/declarative/snake/snake64.png diff --git a/examples/demos/snake/snake80.png b/examples/declarative/snake/snake80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/snake/snake80.png +++ b/examples/declarative/snake/snake80.png diff --git a/examples/demos/snake/snake_harmattan.desktop b/examples/declarative/snake/snake_harmattan.desktop index 10b0f792..10b0f792 100644 --- a/examples/demos/snake/snake_harmattan.desktop +++ b/examples/declarative/snake/snake_harmattan.desktop diff --git a/examples/declarative/sqllocalstorage/sqllocalstorage.pro b/examples/declarative/sqllocalstorage/sqllocalstorage.pro index 631cff40..824f407a 100644 --- a/examples/declarative/sqllocalstorage/sqllocalstorage.pro +++ b/examples/declarative/sqllocalstorage/sqllocalstorage.pro @@ -19,8 +19,8 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/sqllocalstorage +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/sqllocalstorage exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) else:exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/availableFonts/availableFonts.pro b/examples/declarative/text/fonts/availableFonts/availableFonts.pro index a175e3d5..3cd3f973 100644 --- a/examples/declarative/text/fonts/availableFonts/availableFonts.pro +++ b/examples/declarative/text/fonts/availableFonts/availableFonts.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text/fonts/availableFonts +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/availableFonts exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/banner/banner.pro b/examples/declarative/text/fonts/banner/banner.pro index ab6f3e56..e21ee2e3 100644 --- a/examples/declarative/text/fonts/banner/banner.pro +++ b/examples/declarative/text/fonts/banner/banner.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text/fonts/banner +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/banner exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/fonts.pro b/examples/declarative/text/fonts/fonts.pro index 33637ef4..2359918e 100644 --- a/examples/declarative/text/fonts/fonts.pro +++ b/examples/declarative/text/fonts/fonts.pro @@ -5,8 +5,3 @@ SUBDIRS += \ banner \ fonts \ hello - -# install -sources.files = fonts.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text/fonts -INSTALLS += sources diff --git a/examples/declarative/text/fonts/fonts/fonts.pro b/examples/declarative/text/fonts/fonts/fonts.pro index 1e10fc17..4fd22c68 100644 --- a/examples/declarative/text/fonts/fonts/fonts.pro +++ b/examples/declarative/text/fonts/fonts/fonts.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text/fonts/fonts +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/fonts exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/hello/hello.pro b/examples/declarative/text/fonts/hello/hello.pro index 8a7752a8..db92f145 100644 --- a/examples/declarative/text/fonts/hello/hello.pro +++ b/examples/declarative/text/fonts/hello/hello.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text/fonts/hello +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/hello exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/text.pro b/examples/declarative/text/text.pro index 755e811a..4e86deb3 100644 --- a/examples/declarative/text/text.pro +++ b/examples/declarative/text/text.pro @@ -3,8 +3,3 @@ TEMPLATE = subdirs SUBDIRS += \ fonts \ textselection - -# install -sources.files = text.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text -INSTALLS += sources diff --git a/examples/declarative/text/textselection/textselection.pro b/examples/declarative/text/textselection/textselection.pro index 327efad9..bd697106 100644 --- a/examples/declarative/text/textselection/textselection.pro +++ b/examples/declarative/text/textselection/textselection.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/text/textselection +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/textselection exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro index 35f203f1..a669ed41 100644 --- a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro +++ b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/threading/threadedlistmodel +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/threading/threadedlistmodel exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/threading/threading.pro b/examples/declarative/threading/threading.pro index d281a764..56508617 100644 --- a/examples/declarative/threading/threading.pro +++ b/examples/declarative/threading/threading.pro @@ -3,8 +3,3 @@ TEMPLATE = subdirs SUBDIRS = \ threadedlistmodel \ workerscript - -# install -sources.files = threading.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/threading -INSTALLS += sources diff --git a/examples/declarative/threading/workerscript/workerscript.pro b/examples/declarative/threading/workerscript/workerscript.pro index b92a2745..afd4d47b 100644 --- a/examples/declarative/threading/workerscript/workerscript.pro +++ b/examples/declarative/threading/workerscript/workerscript.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/threading/workerscript +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/threading/workerscript exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/gestures/experimental-gestures/experimentalgestures.pro b/examples/declarative/touchinteraction/gestures/experimental-gestures/experimental-gestures.pro index db652cc3..396a59d8 100644 --- a/examples/declarative/touchinteraction/gestures/experimental-gestures/experimentalgestures.pro +++ b/examples/declarative/touchinteraction/gestures/experimental-gestures/experimental-gestures.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/touchinteraction/gestures/experimental-gestures +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/touchinteraction/gestures/experimental-gestures exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/mousearea/mousearea-example/mouseareaexample.pro b/examples/declarative/touchinteraction/mousearea/mousearea-example/mousearea-example.pro index c55b883c..9d984146 100644 --- a/examples/declarative/touchinteraction/mousearea/mousearea-example/mouseareaexample.pro +++ b/examples/declarative/touchinteraction/mousearea/mousearea-example/mousearea-example.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/touchinteraction/mousearea/mousearea-example +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/touchinteraction/mousearea/mousearea-example exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/pincharea/pincharea.pro b/examples/declarative/touchinteraction/pincharea/pincharea.pro index 6a2e9dd3..15bf06be 100644 --- a/examples/declarative/touchinteraction/pincharea/pincharea.pro +++ b/examples/declarative/touchinteraction/pincharea/pincharea.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/touchinteraction/pincharea +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/touchinteraction/pincharea exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/touchinteraction.pro b/examples/declarative/touchinteraction/touchinteraction.pro index 1db70571..5ce0abe0 100644 --- a/examples/declarative/touchinteraction/touchinteraction.pro +++ b/examples/declarative/touchinteraction/touchinteraction.pro @@ -1,9 +1,4 @@ TEMPLATE = subdirs -SUBDIRS = gestures/experimental-gestures/experimentalgestures.pro \ - mousearea/mousearea-example/mouseareaexample.pro \ +SUBDIRS = gestures/experimental-gestures \ + mousearea/mousearea-example \ pincharea - -# install -sources.files = touchinteraction.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/touchinteraction -INSTALLS += sources diff --git a/examples/declarative/toys/clocks/clocks.pro b/examples/declarative/toys/clocks/clocks.pro index 483924e1..3fc085ca 100644 --- a/examples/declarative/toys/clocks/clocks.pro +++ b/examples/declarative/toys/clocks/clocks.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/toys/clocks +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/clocks exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/corkboards/corkboards.pro b/examples/declarative/toys/corkboards/corkboards.pro index 61e141fa..dbcfc859 100644 --- a/examples/declarative/toys/corkboards/corkboards.pro +++ b/examples/declarative/toys/corkboards/corkboards.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/toys/corkboards +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/corkboards exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.pro b/examples/declarative/toys/dynamicscene/dynamicscene.pro index 5d19757b..c77e7374 100644 --- a/examples/declarative/toys/dynamicscene/dynamicscene.pro +++ b/examples/declarative/toys/dynamicscene/dynamicscene.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/toys/dynamicscene +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/dynamicscene exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/tic-tac-toe/tictactoe.pro b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.pro index 4a669f6f..1352bc1c 100644 --- a/examples/declarative/toys/tic-tac-toe/tictactoe.pro +++ b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.pro @@ -19,12 +19,11 @@ DEFINES += ORIENTATIONLOCK # CONFIG += mobility # MOBILITY += -TARGET = tic-tac-toe # The .cpp file which was generated for your project. Feel free to hack it. SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/toys/tic-tac-toe exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/toys.pro b/examples/declarative/toys/toys.pro index 2e35b44a..5c7f70b0 100644 --- a/examples/declarative/toys/toys.pro +++ b/examples/declarative/toys/toys.pro @@ -4,10 +4,5 @@ SUBDIRS += \ clocks \ corkboards \ dynamicscene \ - tic-tac-toe/tictactoe.pro \ + tic-tac-toe \ tvtennis - -# install -sources.files = toys.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/toys -INSTALLS += sources diff --git a/examples/declarative/toys/tvtennis/tvtennis.pro b/examples/declarative/toys/tvtennis/tvtennis.pro index 2b4cc07e..1b934494 100644 --- a/examples/declarative/toys/tvtennis/tvtennis.pro +++ b/examples/declarative/toys/tvtennis/tvtennis.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/toys/tvtennis +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/tvtennis exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro b/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro index 74ef3b66..b3ff1bfb 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro +++ b/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro @@ -4,8 +4,7 @@ HEADERS += piechart.h SOURCES += piechart.cpp \ main.cpp -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending/chapter1-basics -sources.files = $$SOURCES $$HEADERS app.qml chapter1-basics.pro -sources.path = $$[QT_INSTALL_EXAMPLES]//qtquick1/declarative/tutorials/extending/chapter1-basics -INSTALLS += target sources +qml.files = app.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter1-basics +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter1-basics +INSTALLS += target qml diff --git a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro b/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro index 05b8e7dd..b5c8703e 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro +++ b/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro @@ -4,8 +4,7 @@ HEADERS += piechart.h SOURCES += piechart.cpp \ main.cpp -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending/chapter2-methods -sources.files = $$SOURCES $$HEADERS app.qml chapter2-methods.pro -sources.path = $$[QT_INSTALL_EXAMPLES]//qtquick1/declarative/tutorials/extending/chapter2-methods -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter2-methods +qml.files = app.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter2-methods +INSTALLS += target qml diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro b/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro index 66a59503..cc37d591 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro +++ b/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro @@ -4,8 +4,7 @@ HEADERS += piechart.h SOURCES += piechart.cpp \ main.cpp -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending/chapter3-bindings -sources.files = $$SOURCES $$HEADERS app.qml chapter3-bindings.pro -sources.path = $$[QT_INSTALL_EXAMPLES]//qtquick1/declarative/tutorials/extending/chapter3-bindings -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter3-bindings +qml.files = app.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter3-bindings +INSTALLS += target qml diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro index 50583372..8152fcaf 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro @@ -6,8 +6,7 @@ SOURCES += piechart.cpp \ pieslice.cpp \ main.cpp -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending/chapter4-customPropertyTypes -sources.files = $$SOURCES $$HEADERS app.qml chapter4-customPropertyTypes.pro -sources.path = $$[QT_INSTALL_EXAMPLES]//qtquick1/declarative/tutorials/extending/chapter4-customPropertyTypes -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter4-customPropertyTypes +qml.files = app.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter4-customPropertyTypes +INSTALLS += target qml diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro index e76d3807..ef45c8d3 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro @@ -6,8 +6,7 @@ SOURCES += piechart.cpp \ pieslice.cpp \ main.cpp -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending/chapter5-listproperties -sources.files = $$SOURCES $$HEADERS app.qml chapter5-listproperties.pro -sources.path = $$[QT_INSTALL_EXAMPLES]//qtquick1/declarative/tutorials/extending/chapter5-listproperties -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter5-listproperties +qml.files = app.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter5-listproperties +INSTALLS += target qml diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro b/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro index f8012e66..095312ea 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro +++ b/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro @@ -14,10 +14,7 @@ SOURCES += piechart.cpp \ pieslice.cpp \ chartsplugin.cpp -OTHER_FILES += chartsplugin.json - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending/chapter6-plugins -sources.files = $$SOURCES $$HEADERS $$OTHER_FILES app.qml chapter6-plugins.pro -sources.path = $$[QT_INSTALL_EXAMPLES]//qtquick1/declarative/tutorials/extending/chapter6-plugins -INSTALLS += target sources +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter6-plugins +qml.files = app.qml qmldir +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/extending/chapter6-plugins +INSTALLS += target qml diff --git a/examples/declarative/tutorials/extending/extending.pro b/examples/declarative/tutorials/extending/extending.pro index 19bf40b9..fe9a5cc7 100644 --- a/examples/declarative/tutorials/extending/extending.pro +++ b/examples/declarative/tutorials/extending/extending.pro @@ -7,9 +7,3 @@ SUBDIRS += \ chapter4-customPropertyTypes \ chapter5-listproperties \ chapter6-plugins - -# install -sources.files = extending.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials/extending -INSTALLS += sources - diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp b/examples/declarative/tutorials/gettingStarted/filedialog/dialogPlugin.cpp index bc711932..bc711932 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp +++ b/examples/declarative/tutorials/gettingStarted/filedialog/dialogPlugin.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h b/examples/declarative/tutorials/gettingStarted/filedialog/dialogPlugin.h index e87b7e82..e87b7e82 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h +++ b/examples/declarative/tutorials/gettingStarted/filedialog/dialogPlugin.h diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp b/examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp index fe5018b1..fe5018b1 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp +++ b/examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.h b/examples/declarative/tutorials/gettingStarted/filedialog/directory.h index 90e15781..90e15781 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.h +++ b/examples/declarative/tutorials/gettingStarted/filedialog/directory.h diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp b/examples/declarative/tutorials/gettingStarted/filedialog/file.cpp index 7921489c..7921489c 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp +++ b/examples/declarative/tutorials/gettingStarted/filedialog/file.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/file.h b/examples/declarative/tutorials/gettingStarted/filedialog/file.h index ee93aa2e..ee93aa2e 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/file.h +++ b/examples/declarative/tutorials/gettingStarted/filedialog/file.h diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.json b/examples/declarative/tutorials/gettingStarted/filedialog/filedialog.json index 0967ef42..0967ef42 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.json +++ b/examples/declarative/tutorials/gettingStarted/filedialog/filedialog.json diff --git a/examples/declarative/tutorials/gettingStarted/filedialog/filedialog.pro b/examples/declarative/tutorials/gettingStarted/filedialog/filedialog.pro new file mode 100644 index 00000000..0d8dc981 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/filedialog/filedialog.pro @@ -0,0 +1,22 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += declarative + +DESTDIR += ../plugins +OBJECTS_DIR = tmp +MOC_DIR = tmp + +TARGET = FileDialog + +HEADERS += directory.h \ + file.h \ + dialogPlugin.h + +SOURCES += directory.cpp \ + file.cpp \ + dialogPlugin.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/gettingStarted/filedialog +qml.files = qmldir +qml.path = $$[QT_INSTALL_EXAMPLES]/declarative/tutorials/gettingStarted/filedialog +INSTALLS += target qml diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/qmldir b/examples/declarative/tutorials/gettingStarted/filedialog/qmldir index c2b27dad..c2b27dad 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/qmldir +++ b/examples/declarative/tutorials/gettingStarted/filedialog/qmldir diff --git a/examples/declarative/tutorials/gettingStarted/gettingStarted.pro b/examples/declarative/tutorials/gettingStarted/gettingStarted.pro new file mode 100644 index 00000000..4fb010b8 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gettingStarted.pro @@ -0,0 +1,11 @@ +TEMPLATE = subdirs +SUBDIRS = \ + filedialog\ + + +EXAMPLE_FILES = \ + gettingStarted.qml \ + core \ + images \ + parts \ + pics diff --git a/examples/tutorials/gettingStarted/gsQml/texteditor.qml b/examples/declarative/tutorials/gettingStarted/gettingStarted.qml index 84bb0c7d..84bb0c7d 100644 --- a/examples/tutorials/gettingStarted/gsQml/texteditor.qml +++ b/examples/declarative/tutorials/gettingStarted/gettingStarted.qml diff --git a/examples/tutorials/gettingStarted/gsQml/core/button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/core/button.qml index 1c31f661..1c31f661 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/core/editMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/core/editMenu.qml index 8dc7b246..8dc7b246 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/editMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/editMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml b/examples/declarative/tutorials/gettingStarted/gsQml/core/fileDialog.qml index b2f845c3..b2f845c3 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/fileDialog.qml diff --git a/examples/tutorials/gettingStarted/gsQml/core/fileMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/core/fileMenu.qml index 87391893..87391893 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/fileMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/fileMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/core/menuBar.qml b/examples/declarative/tutorials/gettingStarted/gsQml/core/menuBar.qml index 8ddb03ae..8ddb03ae 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/menuBar.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/menuBar.qml diff --git a/examples/tutorials/gettingStarted/gsQml/core/qmldir b/examples/declarative/tutorials/gettingStarted/gsQml/core/qmldir index 32dc8071..32dc8071 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/qmldir +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/qmldir diff --git a/examples/tutorials/gettingStarted/gsQml/core/textArea.qml b/examples/declarative/tutorials/gettingStarted/gsQml/core/textArea.qml index 6e392ac9..6e392ac9 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/textArea.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/core/textArea.qml diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp new file mode 100644 index 00000000..bc711932 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#include "dialogPlugin.h" +#include "directory.h" +#include "file.h" +#include <QtDeclarative/qdeclarative.h> + +void DialogPlugin::registerTypes(const char *uri) +{ + //register the class Directory into QML as a "Directory" element version 1.0 + qmlRegisterType<Directory>(uri, 1, 0, "Directory"); + qmlRegisterType<File>(uri,1,0,"File"); +} diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h new file mode 100644 index 00000000..e87b7e82 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#ifndef DIALOGPLUGIN_H +#define DIALOGPLUGIN_H + +#include <QtDeclarative/QDeclarativeExtensionPlugin> + +class DialogPlugin : public QDeclarativeExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "filedialog.json") + + public: + //registerTypes is inherited from QDeclarativeExtensionPlugin + void registerTypes(const char *uri); + +}; + +#endif + diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/directory.cpp b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/directory.cpp new file mode 100644 index 00000000..fe5018b1 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/directory.cpp @@ -0,0 +1,224 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#include "directory.h" +#include <QDebug> + +/* +Directory constructor + +Initialize the saves directory and creates the file list +*/ +Directory::Directory(QObject *parent) : QObject(parent) +{ + m_dir.cd( QDir::currentPath() ); + + //go to the saved directory. if not found, create save directory + m_saveDir = "saves"; + if ( m_dir.cd(m_saveDir) == 0 ) { + m_dir.mkdir(m_saveDir); + m_dir.cd(m_saveDir); + } + m_filterList << "*.txt"; + refresh(); +} + +/* +Directory::filesNumber +Return the number of Files +*/ +int Directory::filesCount() const +{ + return m_fileList.size(); +} + +/* +Function called to append data onto list property +*/ +void appendFiles(QDeclarativeListProperty<File> * property, File * file) +{ + Q_UNUSED(property); + Q_UNUSED(file); + //Do nothing. can't add to a directory using this method +} + +/* +Function called to retrieve file in the list using an index +*/ +File* fileAt(QDeclarativeListProperty<File> * property, int index) +{ + return static_cast< QList<File *> *>(property->data)->at(index); +} + +/* +Returns the number of files in the list +*/ +int filesSize(QDeclarativeListProperty<File> * property) +{ + return static_cast< QList<File *> *>(property->data)->size(); +} + +/* +Function called to empty the list property contents +*/ +void clearFilesPtr(QDeclarativeListProperty<File> *property) +{ + return static_cast< QList<File *> *>(property->data)->clear(); +} + +/* +Returns the list of files as a QDeclarativeListProperty. +*/ +QDeclarativeListProperty<File> Directory::files() +{ + refresh(); + return QDeclarativeListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); +} + +/* +Return the name of the currently selected file +*/ +QString Directory::filename() const +{ + return currentFile.name(); +} + +/* +Return the file's content as a string. +*/ +QString Directory::fileContent() const +{ + return m_fileContent; +} + +/* +Set the file name of the current file +*/ +void Directory::setFilename(const QString &str) +{ + if( str != currentFile.name() ) { + currentFile.setName(str); + emit filenameChanged(); + } +} + +/* +Set the content of the file as a string +*/ +void Directory::setFileContent(const QString &str) +{ + if(str != m_fileContent){ + m_fileContent = str; + emit fileContentChanged(); + } +} + +/* +Called from QML to save the file using the filename and file content. +Saving makes sure that the file has a .txt extension. +*/ +void Directory::saveFile() +{ + if(currentFile.name().size() == 0){ + qWarning()<< "Empty filename. no save"; + return; + } + QString extendedName = currentFile.name(); + if(!currentFile.name().endsWith(".txt")){ + extendedName.append(".txt"); + } + QFile file( m_dir.filePath(extendedName) ); + if ( file.open(QFile::WriteOnly | QFile::Truncate) ) { + QTextStream outStream(&file); + outStream << m_fileContent; + } + file.close(); + refresh(); + emit directoryChanged(); +} + +/* +Load the contents of a file. +Only loads files with a .txt extension +*/ +void Directory::loadFile() +{ + m_fileContent.clear(); + QString extendedName = currentFile.name(); + if( !currentFile.name().endsWith(".txt") ) { + extendedName.append(".txt"); + } + + QFile file( m_dir.filePath(extendedName) ); + if ( file.open(QFile::ReadOnly ) ) { + QTextStream inStream(&file); + + QString line; + do { + line = inStream.read(75); + m_fileContent.append(line); + } while ( !line.isNull() ) ; + } + file.close(); +} + +/* +Reloads the content of the files list. This is to ensure that the newly +created files are added onto the list. +*/ +void Directory::refresh() +{ + m_dirFiles = m_dir.entryList(m_filterList,QDir::Files,QDir::Name); + m_fileList.clear(); + + File * file; + for(int i = 0; i < m_dirFiles.size() ; i ++) { + file = new File(); + + if( m_dirFiles.at(i).endsWith(".txt") ) { + QString name = m_dirFiles.at(i); + file->setName( name.remove(".txt",Qt::CaseSensitive) ); + } + else { + file->setName(m_dirFiles.at(i)); + } + m_fileList.append(file); + } +} diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/directory.h b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/directory.h new file mode 100644 index 00000000..90e15781 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/directory.h @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#ifndef DIRECTORY_H +#define DIRECTORY_H + +#include "file.h" + +#include <QDir> +#include <QStringList> +#include <QTextStream> +#include <QDeclarativeListProperty> +#include <QObject> + +class Directory : public QObject { + + Q_OBJECT + + //number of files in the directory + Q_PROPERTY(int filesCount READ filesCount) + + //list property containing file names as QString + Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT ) + + //file name of the text file to read/write + Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) + + //text content of the file + Q_PROPERTY(QString fileContent READ fileContent WRITE setFileContent NOTIFY fileContentChanged) + + public: + Directory(QObject *parent = 0); + + //properties' read functions + int filesCount() const; + QString filename() const; + QString fileContent() const; + QDeclarativeListProperty<File> files(); + + //properties' write functions + void setFilename(const QString &str); + void setFileContent(const QString &str); + + //accessible from QML + Q_INVOKABLE void saveFile(); + Q_INVOKABLE void loadFile(); + + signals: + void directoryChanged(); + void filenameChanged(); + void fileContentChanged(); + + private: + QDir m_dir; + QStringList m_dirFiles; + File currentFile; + QString m_saveDir; + QStringList m_filterList; + + //contains the file data in QString format + QString m_fileContent; + + //Registered to QML in a plugin. Accessible from QML as a property of Directory + QList<File *> m_fileList; + + //refresh content of the directory + void refresh(); +}; + +#endif diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/file.cpp b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/file.cpp new file mode 100644 index 00000000..7921489c --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/file.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + + +#include "file.h" + +File::File(QObject *parent) : QObject(parent) +{ + m_name = ""; +} + +QString File::name() const{ + return m_name; +} +void File::setName(const QString &str){ + if(str != m_name){ + m_name = str; + emit nameChanged(); + } +} diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/file.h b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/file.h new file mode 100644 index 00000000..ee93aa2e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/file.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#ifndef FILE_H +#define FILE_H + + +#include <QString> +#include <QObject> + +class File : public QObject{ + + Q_OBJECT + + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + + public: + File(QObject *parent = 0); + + QString name() const; + void setName(const QString &str); + + signals: + void nameChanged(); + + private: + QString m_name; +}; + +#endif diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/filedialog.json index 0967ef42..0967ef42 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/filedialog.json diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro index d85787d0..d85787d0 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/qmldir index c2b27dad..c2b27dad 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir +++ b/examples/declarative/tutorials/gettingStarted/gsQml/filedialog/qmldir diff --git a/examples/tutorials/gettingStarted/gsQml/images/arrow.png b/examples/declarative/tutorials/gettingStarted/gsQml/images/arrow.png Binary files differindex 14978c2e..14978c2e 100644 --- a/examples/tutorials/gettingStarted/gsQml/images/arrow.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/images/arrow.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part0/Button.qml index 0794e8a2..0794e8a2 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part0/Button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/Button.qml index 1048711a..1048711a 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/Button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml index cf5e481d..cf5e481d 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml index b74ea0e4..b74ea0e4 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml index a1512e0b..a1512e0b 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png Binary files differindex aab64bcf..aab64bcf 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png Binary files differindex d3ff66f2..d3ff66f2 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png Binary files differindex f2e2b0d9..f2e2b0d9 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png Binary files differindex 21ce5092..21ce5092 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject index d4909f86..d4909f86 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/Button.qml index 744d4bf4..744d4bf4 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/Button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml index 20f88545..20f88545 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml index 75aac68b..75aac68b 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml index c53196a4..c53196a4 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png Binary files differindex da959a34..da959a34 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject index d4909f86..d4909f86 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/Button.qml index 744d4bf4..744d4bf4 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/Button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml index 20f88545..20f88545 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml index 75aac68b..75aac68b 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml index c53196a4..c53196a4 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml index 4b09eff5..4b09eff5 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml index 61beb1c6..61beb1c6 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png Binary files differindex 14978c2e..14978c2e 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png Binary files differindex d0623b5a..d0623b5a 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject index d4909f86..d4909f86 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/Button.qml index e0ba7ed7..e0ba7ed7 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/Button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml index 7177ed25..7177ed25 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml index f897be60..f897be60 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml index 7dbb1c9a..7dbb1c9a 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml index df28ba3f..df28ba3f 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml index f83e5d49..f83e5d49 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml index 35d0e88c..35d0e88c 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png Binary files differindex 14978c2e..14978c2e 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png Binary files differindex a195fb87..a195fb87 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject index d4909f86..d4909f86 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml index 84d8d874..84d8d874 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml index 9c15a1aa..9c15a1aa 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml index 1677440f..1677440f 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml index ca9e5c23..ca9e5c23 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml index c4bbad00..c4bbad00 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml index db698518..db698518 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml index 64a1bae6..64a1bae6 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir index 3f22778a..3f22778a 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp index 286374d8..286374d8 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h index ddcf82be..ddcf82be 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp index c5f455c7..c5f455c7 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h index 1d01372e..1d01372e 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp index 9da61921..9da61921 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h index 76c192e3..76c192e3 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json @@ -0,0 +1 @@ +{} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro index 62477470..62477470 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir new file mode 100644 index 00000000..c2b27dad --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir @@ -0,0 +1 @@ +plugin FileDialog plugins diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png Binary files differindex 14978c2e..14978c2e 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png Binary files differindex 27feed5e..27feed5e 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png Binary files differindex 4d8f9f22..4d8f9f22 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png Binary files differindex 680acfe8..680acfe8 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject index ed034dff..ed034dff 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject +++ b/examples/declarative/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject diff --git a/examples/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_editmenu.png b/examples/declarative/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_editmenu.png Binary files differindex 27feed5e..27feed5e 100644 --- a/examples/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_editmenu.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_editmenu.png diff --git a/examples/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_filemenu.png b/examples/declarative/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_filemenu.png Binary files differindex 4d8f9f22..4d8f9f22 100644 --- a/examples/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_filemenu.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_filemenu.png diff --git a/examples/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_newfile.png b/examples/declarative/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_newfile.png Binary files differindex 680acfe8..680acfe8 100644 --- a/examples/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_newfile.png +++ b/examples/declarative/tutorials/gettingStarted/gsQml/pics/qml-texteditor5_newfile.png diff --git a/examples/tutorials/gettingStarted/gsQml/texteditor.pro b/examples/declarative/tutorials/gettingStarted/gsQml/texteditor.pro index aa5306cc..aa5306cc 100644 --- a/examples/tutorials/gettingStarted/gsQml/texteditor.pro +++ b/examples/declarative/tutorials/gettingStarted/gsQml/texteditor.pro diff --git a/examples/declarative/tutorials/gettingStarted/gsQml/texteditor.qml b/examples/declarative/tutorials/gettingStarted/gsQml/texteditor.qml new file mode 100644 index 00000000..84bb0c7d --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/gsQml/texteditor.qml @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 +import "core" + +Rectangle { + id: screen + width: 1000; height: 1000 + property int partition: height/3 + border { width: 1; color: "#DCDCCC"} + state: "DRAWER_CLOSED" + + //Item 1: MenuBar on the top portion of the screen + MenuBar { + id:menuBar + height: screen.partition; width: screen.width + z: 1 + } + + //Item 2: The editable text area + TextArea { + id: textArea + y: drawer.height + color: "#3F3F3F" + fontColor: "#DCDCCC" + height: partition*2; width:parent.width + } + + //Item 3: The drawer handle + Rectangle { + id: drawer + height: 15; width: parent.width + border { color : "#6A6D6A"; width: 1 } + z: 1 + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.77; color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#6A6D6A" } + } + Image { + id: arrowIcon + source: "images/arrow.png" + anchors.horizontalCenter: parent.horizontalCenter + Behavior{ NumberAnimation { property: "rotation"; easing.type: Easing.OutExpo } } + } + + MouseArea { + id: drawerMouseArea + anchors.fill: parent + hoverEnabled: true + onEntered: parent.border.color = Qt.lighter("#6A6D6A") + onExited: parent.border.color = "#6A6D6A" + onClicked: { + if (screen.state == "DRAWER_CLOSED") { + screen.state = "DRAWER_OPEN" + } + else if (screen.state == "DRAWER_OPEN"){ + screen.state = "DRAWER_CLOSED" + } + } + } + } + +//! [states] + states:[ + State { + name: "DRAWER_OPEN" + PropertyChanges { target: menuBar; y: 0} + PropertyChanges { target: textArea; y: partition + drawer.height} + PropertyChanges { target: drawer; y: partition} + PropertyChanges { target: arrowIcon; rotation: 180} + }, + State { + name: "DRAWER_CLOSED" + PropertyChanges { target: menuBar; y:-height; } + PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height } + PropertyChanges { target: drawer; y: 0 } + PropertyChanges { target: arrowIcon; rotation: 0 } + } + ] +//! [states] + +//! [transitions] + transitions: [ + Transition { + to: "*" + NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo } + NumberAnimation { target: menuBar; properties: "y"; duration: 100; easing.type: Easing.OutExpo } + NumberAnimation { target: drawer; properties: "y"; duration: 100; easing.type: Easing.OutExpo } + } + ] +//! [transitions] +} diff --git a/examples/declarative/tutorials/gettingStarted/images/arrow.png b/examples/declarative/tutorials/gettingStarted/images/arrow.png Binary files differnew file mode 100644 index 00000000..14978c2e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/images/arrow.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml new file mode 100644 index 00000000..0794e8a2 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +//! [document] +import QtQuick 1.0 + +Rectangle { + id: simplebutton + color: "grey" + width: 150; height: 75 + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: "button label" + } +} +//! [document] diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part1/Button.qml new file mode 100644 index 00000000..1048711a --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/Button.qml @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + property string label: "button label" + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius: 10 + smooth: true + border{color: "white"; width: 3} + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part1/EditMenu.qml new file mode 100644 index 00000000..cf5e481d --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/EditMenu.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part1/FileMenu.qml new file mode 100644 index 00000000..b74ea0e4 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/FileMenu.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/SimpleButton.qml b/examples/declarative/tutorials/gettingStarted/parts/part1/SimpleButton.qml new file mode 100644 index 00000000..a1512e0b --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/SimpleButton.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: simplebutton + + //the rectangle's fill color + color: "grey" + + //dimensions of the button + width: 150; height: 75 + + //A text element contains functionalities for creating texts + Text { + id: buttonLabel + + //center the text inside the parent + anchors.centerIn: parent + + //text property binds to the label displayed on the button + text: "button label" + } + + //define the clickable area to be the whole rectangle + MouseArea { + id: buttonMouseArea + anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors + + //onClicked handles valid mouse button clicks + onClicked: console.log(buttonLabel.text + " clicked" ) + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_button.png b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_button.png Binary files differnew file mode 100644 index 00000000..aab64bcf --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_button.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_editmenu.png b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_editmenu.png Binary files differnew file mode 100644 index 00000000..d3ff66f2 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_editmenu.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_filemenu.png b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_filemenu.png Binary files differnew file mode 100644 index 00000000..f2e2b0d9 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_filemenu.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_simplebutton.png b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_simplebutton.png Binary files differnew file mode 100644 index 00000000..21ce5092 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/pics/qml-texteditor1_simplebutton.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part1/qml-texteditor.qmlproject b/examples/declarative/tutorials/gettingStarted/parts/part1/qml-texteditor.qmlproject new file mode 100644 index 00000000..d4909f86 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part1/qml-texteditor.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/gettingStarted/parts/part2/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml new file mode 100644 index 00000000..744d4bf4 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + property string label: "button label" + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius:10 + smooth: true + border{color: "white"; width: 3} + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml new file mode 100644 index 00000000..20f88545 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml new file mode 100644 index 00000000..75aac68b --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml new file mode 100644 index 00000000..c53196a4 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000 + height:300 + + property color fileColor: "thistle" + property color editColor: "powderblue" + + //container for the header and the buttons + Rectangle{ + + id: labelList + height:parent.height/10 + width: parent.width + color: "steelblue" + + //default z is 0, items with higher z values are shown on top of items with lower z values + z: 1 + + //row displays its children in a vertical row + Row{ + anchors.centerIn: parent + spacing:40 + Button{ + height: 20 + width: 50 + label: "File" + id: fileButton + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + radius: 1 + + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: { + menuListView.currentIndex = 0 + } + } + Button{ + height: 20 + width: 50 + id: editButton + buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: { + menuListView.currentIndex = 1 + } + + + } + + + } + } + + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + width: menuListView.width + height: menuBar.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width + height: menuBar.height + + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + anchors.fill:parent + anchors.bottom: parent.bottom + width:parent.width + height: parent.height + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/pics/qml-texteditor2_menubar.png b/examples/declarative/tutorials/gettingStarted/parts/part2/pics/qml-texteditor2_menubar.png Binary files differnew file mode 100644 index 00000000..da959a34 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part2/pics/qml-texteditor2_menubar.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/qml-texteditor2.qmlproject b/examples/declarative/tutorials/gettingStarted/parts/part2/qml-texteditor2.qmlproject new file mode 100644 index 00000000..d4909f86 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part2/qml-texteditor2.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/gettingStarted/parts/part3/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml new file mode 100644 index 00000000..744d4bf4 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + property string label: "button label" + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius:10 + smooth: true + border{color: "white"; width: 3} + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml new file mode 100644 index 00000000..20f88545 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml new file mode 100644 index 00000000..75aac68b --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml new file mode 100644 index 00000000..c53196a4 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000 + height:300 + + property color fileColor: "thistle" + property color editColor: "powderblue" + + //container for the header and the buttons + Rectangle{ + + id: labelList + height:parent.height/10 + width: parent.width + color: "steelblue" + + //default z is 0, items with higher z values are shown on top of items with lower z values + z: 1 + + //row displays its children in a vertical row + Row{ + anchors.centerIn: parent + spacing:40 + Button{ + height: 20 + width: 50 + label: "File" + id: fileButton + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + radius: 1 + + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: { + menuListView.currentIndex = 0 + } + } + Button{ + height: 20 + width: 50 + id: editButton + buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: { + menuListView.currentIndex = 1 + } + + + } + + + } + } + + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + width: menuListView.width + height: menuBar.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width + height: menuBar.height + + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + anchors.fill:parent + anchors.bottom: parent.bottom + width:parent.width + height: parent.height + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml new file mode 100644 index 00000000..4b09eff5 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id:textArea + + width :400 + height:400 + color: "white" + + Flickable{ + id: flickArea + + width: parent.width + height: parent.height + anchors.fill:parent + + function ensureVisible(r){ + if (contentX >= r.x) + contentX = r.x; + else if (contentX+width <= r.x+r.width) + contentX = r.x+r.width-width; + if (contentY >= r.y) + contentY = r.y; + else if (contentY+height <= r.y+r.height) + contentY = r.y+r.height-height; + } + + TextEdit{ + id: textEditor + anchors.fill:parent + width:parent.width; height:parent.height + color:"midnightblue" + focus: true + + wrapMode: TextEdit.Wrap + + onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle) + } + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml new file mode 100644 index 00000000..61beb1c6 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + id: screen + width: 1000; height: 1000 + border.color:"black" + //the screen is partitioned into the MenuBar and TextArea. 1/3 of the screen is assigned to the MenuBar + property int partition: height/3 + + MenuBar{ + id:menuBar + height: partition + width:parent.width + z: 1 + } + + + TextArea{ + id:textArea + anchors.bottom:parent.bottom + y: partition + color: "azure" + height: partition*2 + width:parent.width + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/images/arrow.png b/examples/declarative/tutorials/gettingStarted/parts/part3/images/arrow.png Binary files differnew file mode 100644 index 00000000..14978c2e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/images/arrow.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/pics/qml-texteditor3_texteditor.png b/examples/declarative/tutorials/gettingStarted/parts/part3/pics/qml-texteditor3_texteditor.png Binary files differnew file mode 100644 index 00000000..d0623b5a --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/pics/qml-texteditor3_texteditor.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/qml-texteditor3.qmlproject b/examples/declarative/tutorials/gettingStarted/parts/part3/qml-texteditor3.qmlproject new file mode 100644 index 00000000..d4909f86 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part3/qml-texteditor3.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/gettingStarted/parts/part4/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml new file mode 100644 index 00000000..e0ba7ed7 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //attaches to the Text element's text content + property string label + property color textColor: buttonLabel.color + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius:10 + smooth: true + border.color: "white" + border.width: 3 + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label //"button label" //bind the text to the parent's text + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + //animate the color whenever the color property changes + Behavior on color { ColorAnimation{ duration: 55} } + + //scale the button when pressed + scale: buttonMouseArea.pressed ? 1.1 : 1.00 + //Animate the scale property change + Behavior on scale { NumberAnimation{ duration: 55} } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml new file mode 100644 index 00000000..7177ed25 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + gradient: Gradient{ + GradientStop { position: 0.0; color: "#6A6F70" } + GradientStop { position: 1.0; color: Qt.darker("#6A6D67") } + } + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml new file mode 100644 index 00000000..f897be60 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + gradient: Gradient{ + GradientStop { position: 0.0; color: "#6C646A" } + GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") } + } + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml new file mode 100644 index 00000000..7dbb1c9a --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000 + height:300 + + property color fileColor: "plum" + property color editColor: "powderblue" + + //container for the header and the buttons + Rectangle{ + + id: labelList + height:parent.height/10 + width: parent.width + color: "beige" + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.98;color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#0e1B20" } + } + + //default z is 0, items with higher z values are shown on top of items with lower z values + z: 1 + + //row displays its children in a vertical row + Row{ + anchors.centerIn: parent + spacing:40 + Button{ + height: 20 + width: 50 + label: "File" + id: fileButton + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + radius: 1 + + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: { + menuListView.currentIndex = 0 + } + } + Button{ + height: 20 + width: 50 + id: editButton + buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: { + menuListView.currentIndex = 1 + } + + + } + + + } + } + + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + width: menuListView.width + height: menuBar.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width + height: menuBar.height + + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + anchors.fill:parent + anchors.bottom: parent.bottom + width:parent.width + height: parent.height + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml new file mode 100644 index 00000000..df28ba3f --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: simplebutton + color: "grey" + width: 150; height: 75 + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: "button label" + } + + MouseArea{ + id: buttonMouseArea + anchors.fill: parent + onClicked: console.log(buttonLabel.text + " clicked" ) + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml new file mode 100644 index 00000000..f83e5d49 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id:textArea + + width :400 + height:400 + property color fontColor: "white" + + Flickable{ + id: flickArea + + width: parent.width + height: parent.height + anchors.fill:parent + + function ensureVisible(r){ + if (contentX >= r.x) + contentX = r.x; + else if (contentX+width <= r.x+r.width) + contentX = r.x+r.width-width; + if (contentY >= r.y) + contentY = r.y; + else if (contentY+height <= r.y+r.height) + contentY = r.y+r.height-height; + } + + TextEdit{ + id: textEditor + anchors.fill:parent + width:parent.width; height:parent.height + color:fontColor + focus: true + + wrapMode: TextEdit.Wrap + + onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle) + } + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml new file mode 100644 index 00000000..35d0e88c --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: screen + width: 1000; height: 1000 + property int partition: height/3 + state: "DRAWER_CLOSED" + + + //Item 1: MenuBar on the top portion of the screen + MenuBar{ + id:menuBar + height: partition + //anchors.top:parent.top + width:parent.width + z:1 + } + + + //Item 2: The editable text area + TextArea{ + id:textArea + y:drawer.height + border.color: Qt.darker(color, 1.4) + border.width: 2 + color: "#3F3F3F" + fontColor: "#DCDCCC" + height: partition*2 + width:parent.width + } + + //Item 3: The drawer handle + Rectangle{ + id:drawer + height:15 + width: parent.width + border.color : "#6A6D6A" + border.width: 1 + + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.77; color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#6A6D6A" } + } + + Image{ + id: arrowIcon + source: "images/arrow.png" + anchors.horizontalCenter: parent.horizontalCenter + + Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }} + } + + MouseArea{ + id: drawerMouseArea + anchors.fill:parent + onClicked:{ + if (screen.state == "DRAWER_CLOSED"){ + screen.state = "DRAWER_OPEN" + console.log("drawer OPEN") + } + else if (screen.state == "DRAWER_OPEN"){ + screen.state = "DRAWER_CLOSED" + console.log("drawer closed") + } + } + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = Qt.lighter("#6A6D6A") + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = "#6A6D6A" + } + + } + states:[ + State{ + name: "DRAWER_OPEN" + PropertyChanges { target: menuBar; y:0} + PropertyChanges { target: textArea; y: partition + drawer.height} + PropertyChanges { target: drawer; y: partition} + PropertyChanges { target: arrowIcon; rotation: 180} + }, + State{ + name: "DRAWER_CLOSED" + PropertyChanges { target: menuBar; y:-partition} + PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height} + PropertyChanges { target: drawer; y: 0} + PropertyChanges { target: arrowIcon; rotation: 0} + } + + ] + transitions: [ + Transition{ + to: "*" + NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo } + NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + } + + ] +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/images/arrow.png b/examples/declarative/tutorials/gettingStarted/parts/part4/images/arrow.png Binary files differnew file mode 100644 index 00000000..14978c2e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/images/arrow.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/pics/qml-texteditor4_texteditor.png b/examples/declarative/tutorials/gettingStarted/parts/part4/pics/qml-texteditor4_texteditor.png Binary files differnew file mode 100644 index 00000000..a195fb87 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/pics/qml-texteditor4_texteditor.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/qml-texteditor4.qmlproject b/examples/declarative/tutorials/gettingStarted/parts/part4/qml-texteditor4.qmlproject new file mode 100644 index 00000000..d4909f86 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part4/qml-texteditor4.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/gettingStarted/parts/part5/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml new file mode 100644 index 00000000..84d8d874 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml @@ -0,0 +1,127 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +import QtQuick 1.0 +import "core" + +Rectangle { + id: screen + width: 1000; height: 1000 + property int partition: height/3 + state: "DRAWER_CLOSED" + + //Item 1: MenuBar on the top portion of the screen + MenuBar{ + id:menuBar + height: screen.partition; width: screen.width + z:1 + } + //Item 2: The editable text area + TextArea{ + id:textArea + y:drawer.height + color: "#3F3F3F" + fontColor: "#DCDCCC" + height: partition*2; width:parent.width + } + //Item 3: The drawer handle + Rectangle{ + id:drawer + height:15; width: parent.width + border.color : "#6A6D6A" + border.width: 1 + z:1 + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.77; color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#6A6D6A" } + } + Image{ + id: arrowIcon + source: "images/arrow.png" + anchors.horizontalCenter: parent.horizontalCenter + + Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }} + } + + MouseArea{ + id: drawerMouseArea + anchors.fill:parent + hoverEnabled: true + onEntered: parent.border.color = Qt.lighter("#6A6D6A") + onExited: parent.border.color = "#6A6D6A" + onClicked:{ + if (screen.state == "DRAWER_CLOSED"){ + screen.state = "DRAWER_OPEN" + } + else if (screen.state == "DRAWER_OPEN"){ + screen.state = "DRAWER_CLOSED" + } + } + } + } + + states:[ + State{ + name: "DRAWER_OPEN" + PropertyChanges { target: menuBar; y: 0} + PropertyChanges { target: textArea; y: partition + drawer.height} + PropertyChanges { target: drawer; y: partition} + PropertyChanges { target: arrowIcon; rotation: 180} + }, + State{ + name: "DRAWER_CLOSED" + PropertyChanges { target: menuBar; y:-height; } + PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height} + PropertyChanges { target: drawer; y: 0} + PropertyChanges { target: arrowIcon; rotation: 0} + } + ] + + transitions: [ + Transition{ + to: "*" + NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo } + NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + } + ] +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp new file mode 100644 index 00000000..286374d8 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#include "dialogPlugin.h" +#include "directory.h" +#include "file.h" +#include <QtDeclarative/qdeclarative.h> + +void DialogPlugin::registerTypes(const char *uri){ + + //register the class Directory into QML as a "Directory" element version 1.0 + qmlRegisterType<Directory>(uri, 1, 0, "Directory"); + qmlRegisterType<File>(uri,1,0,"File"); + + //qRegisterMetaType<QDeclarativeListProperty<QString> > ("QDeclarativeListProperty<QString>"); + +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h new file mode 100644 index 00000000..ddcf82be --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#ifndef DIALOGPLUGIN_H +#define DIALOGPLUGIN_H + +#include <QtDeclarative/QDeclarativeExtensionPlugin> + +class DialogPlugin : public QDeclarativeExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "filedialog.json") + + public: + //registerTypes is inherited from QDeclarativeExtensionPlugin + void registerTypes(const char *uri); + +}; + +#endif + diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp new file mode 100644 index 00000000..c5f455c7 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp @@ -0,0 +1,219 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#include "directory.h" +#include <QDebug> + +/* +Directory constructor + +Initialize the saves directory and creates the file list +*/ +Directory::Directory(QObject *parent) : QObject(parent) +{ + + + m_dir.cd( QDir::currentPath()); + + //go to the saved directory. if not found, create save directory + m_saveDir = "saves"; + if (m_dir.cd(m_saveDir) == 0){ + m_dir.mkdir(m_saveDir); + m_dir.cd(m_saveDir); + } + m_filterList << "*.txt"; + + refresh(); +} + +/* +Directory::filesNumber +Return the number of Files +*/ +int Directory:: filesCount() const{ + return m_fileList.size(); +} + +/* +Function called to append data onto list property +*/ +void appendFiles(QDeclarativeListProperty<File> * property, File * file){ + //Do nothing. can't add to a directory using this method +} + +/* +Function called to retrieve file in the list using an index +*/ +File* fileAt(QDeclarativeListProperty<File> * property, int index){ + return static_cast< QList<File *> *>(property->data)->at(index); +} + +/* +Returns the number of files in the list +*/ +int filesSize(QDeclarativeListProperty<File> * property){ + return static_cast< QList<File *> *>(property->data)->size(); +} + +/* +Function called to empty the list property contents +*/ +void clearFilesPtr(QDeclarativeListProperty<File> *property){ + return static_cast< QList<File *> *>(property->data)->clear(); +} + +/* +Returns the list of files as a QDeclarativeListProperty. +*/ +QDeclarativeListProperty<File> Directory::files(){ + + refresh(); +// return QDeclarativeListProperty<QString>(this,m_filePtrList); //not recommended in the docs + return QDeclarativeListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); +} + +/* +Return te name of the currently selected file +*/ +QString Directory::filename() const{ + return currentFile.name(); +} + +/* +Return the file's content as a string. +*/ +QString Directory::fileContent() const{ + return m_fileContent; +} + +/* +Set the file name of the current file +*/ +void Directory::setFilename(const QString &str){ + if(str != currentFile.name()){ + currentFile.setName(str); + emit filenameChanged(); + } +} + +/* +Set the content of the file as a string +*/ +void Directory::setFileContent(const QString &str){ + if(str != m_fileContent){ + m_fileContent = str; + emit fileContentChanged(); + } +} + +/* +Called from QML to save the file using the filename and file content. +Saving makes sure that the file has a .txt extension. +*/ +void Directory::saveFile(){ + + if(currentFile.name().size() == 0){ + qWarning()<< "Empty filename. no save"; + return; + } + + QString extendedName = currentFile.name(); + if(!currentFile.name().endsWith(".txt")){ + extendedName.append(".txt"); + } + + QFile file( m_dir.filePath(extendedName) ); + if (file.open(QFile::WriteOnly | QFile::Truncate)){ + QTextStream outStream(&file); + outStream << m_fileContent; + } + file.close(); + refresh(); + emit directoryChanged(); +} + +/* +Load the contents of a file. +Only loads files with a .txt extension +*/ +void Directory::loadFile(){ + + m_fileContent.clear(); + QString extendedName = currentFile.name(); + if(!currentFile.name().endsWith(".txt")){ + extendedName.append(".txt"); + } + + QFile file( m_dir.filePath(extendedName) ); + if (file.open(QFile::ReadOnly )){ + QTextStream inStream(&file); + + QString line; + do{ + line = inStream.read(75); + m_fileContent.append(line); + }while (!line .isNull()); + } + file.close(); +} + +/* +Reloads the content of the files list. This is to ensure that the newly +created files are added onto the list. +*/ +void Directory::refresh(){ + m_dirFiles = m_dir.entryList(m_filterList,QDir::Files,QDir::Name); + m_fileList.clear(); + + File * file; + for(int i = 0; i < m_dirFiles.size() ; i ++){ + + file = new File(); + + if(m_dirFiles.at(i).endsWith(".txt")){ + QString name = m_dirFiles.at(i); + file->setName( name.remove(".txt",Qt::CaseSensitive)); + } + else{ + file->setName(m_dirFiles.at(i)); + } + m_fileList.append(file); + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h new file mode 100644 index 00000000..1d01372e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#ifndef DIRECTORY_H +#define DIRECTORY_H + +#include "file.h" + +#include <QDir> +#include <QStringList> +#include <QTextStream> +#include <QDeclarativeListProperty> +#include <QObject> + +class Directory : public QObject{ + + Q_OBJECT + + //number of files in the directory + Q_PROPERTY(int filesCount READ filesCount) + + //list property containing file names as QString + Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT ) + + //file name of the text file to read/write + Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) + + //text content of the file + Q_PROPERTY(QString fileContent READ fileContent WRITE setFileContent NOTIFY fileContentChanged) + + public: + Directory(QObject *parent = 0); + + //properties' read functions + int filesCount() const; + QString filename() const; + QString fileContent() const; + QDeclarativeListProperty<File> files(); + + //properties' write functions + void setFilename(const QString &str); + void setFileContent(const QString &str); + + //accessible from QML + Q_INVOKABLE void saveFile(); + Q_INVOKABLE void loadFile(); + + signals: + void directoryChanged(); + void filenameChanged(); + void fileContentChanged(); + + private: + QDir m_dir; + QStringList m_dirFiles; + File currentFile; + QString m_saveDir; + QStringList m_filterList; + + //contains the file data in QString format + QString m_fileContent; + + //Registered to QML in a plugin. Accessible from QML as a property of Directory + QList<File *> m_fileList; + + //refresh content of the directory + void refresh(); +}; + + +#endif diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.cpp b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.cpp new file mode 100644 index 00000000..9da61921 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#include "file.h" + +File::File(QObject *parent) : QObject(parent) +{ + m_name = ""; +} + +QString File::name() const{ + return m_name; +} +void File::setName(const QString &str){ + if(str != m_name){ + m_name = str; + emit nameChanged(); + } +} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h new file mode 100644 index 00000000..76c192e3 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia Plc 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$ +** +****************************************************************************/ + +#ifndef FILE_H +#define FILE_H + + +#include <QString> +#include <QObject> + +class File : public QObject{ + + Q_OBJECT + + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + + public: + File(QObject *parent = 0); + + QString name() const; + void setName(const QString &str); + + signals: + void nameChanged(); + + private: + QString m_name; +}; + +#endif diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.json b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.json @@ -0,0 +1 @@ +{} diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro new file mode 100644 index 00000000..62477470 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro @@ -0,0 +1,17 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += declarative + +DESTDIR += ../plugins +OBJECTS_DIR = tmp +MOC_DIR = tmp + +TARGET = FileDialog + +HEADERS += directory.h \ + file.h \ + dialogPlugin.h + +SOURCES += directory.cpp \ + file.cpp \ + dialogPlugin.cpp diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/qmldir b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/qmldir new file mode 100644 index 00000000..c2b27dad --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/qmldir @@ -0,0 +1 @@ +plugin FileDialog plugins diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/images/arrow.png b/examples/declarative/tutorials/gettingStarted/parts/part5/images/arrow.png Binary files differnew file mode 100644 index 00000000..14978c2e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/images/arrow.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_editmenu.png b/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_editmenu.png Binary files differnew file mode 100644 index 00000000..27feed5e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_editmenu.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_filemenu.png b/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_filemenu.png Binary files differnew file mode 100644 index 00000000..4d8f9f22 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_filemenu.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_newfile.png b/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_newfile.png Binary files differnew file mode 100644 index 00000000..680acfe8 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/pics/qml-texteditor5_newfile.png diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject b/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject new file mode 100644 index 00000000..ed034dff --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + directory: "core" + directory: "filedialog" + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + importPaths: [ " ./plugins " ] +} diff --git a/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_editmenu.png b/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_editmenu.png Binary files differnew file mode 100644 index 00000000..27feed5e --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_editmenu.png diff --git a/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_filemenu.png b/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_filemenu.png Binary files differnew file mode 100644 index 00000000..4d8f9f22 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_filemenu.png diff --git a/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_newfile.png b/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_newfile.png Binary files differnew file mode 100644 index 00000000..680acfe8 --- /dev/null +++ b/examples/declarative/tutorials/gettingStarted/pics/qml-texteditor5_newfile.png diff --git a/examples/declarative/tutorials/tutorials.pro b/examples/declarative/tutorials/tutorials.pro index 5ad5b37a..7e26353e 100644 --- a/examples/declarative/tutorials/tutorials.pro +++ b/examples/declarative/tutorials/tutorials.pro @@ -1,9 +1,9 @@ TEMPLATE = subdirs SUBDIRS += \ - extending + extending \ + gettingStarted -# install -sources.files = tutorials.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/tutorials -INSTALLS += sources +EXAMPLE_FILES = \ + helloworld \ + samegame diff --git a/examples/demos/twitter/main.cpp b/examples/declarative/twitter/main.cpp index c79424b7..c79424b7 100644 --- a/examples/demos/twitter/main.cpp +++ b/examples/declarative/twitter/main.cpp diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/Button.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/Button.qml index 9b9b2d67..9b9b2d67 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/Button.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/Button.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/FatDelegate.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/FatDelegate.qml index e4a6e150..e4a6e150 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/FatDelegate.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/FatDelegate.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/Input.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/Input.qml index ce1bc0e9..ce1bc0e9 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/Input.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/Input.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/Loading.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/Loading.qml index b8fe357a..b8fe357a 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/Loading.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/Loading.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/MultiTitleBar.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/MultiTitleBar.qml index 1e1dbd62..1e1dbd62 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/MultiTitleBar.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/MultiTitleBar.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/RssModel.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/RssModel.qml index 348fd2a8..348fd2a8 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/RssModel.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/RssModel.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/SearchView.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/SearchView.qml index d1c50fca..d1c50fca 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/SearchView.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/SearchView.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/TitleBar.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/TitleBar.qml index 7f094028..7f094028 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/TitleBar.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/TitleBar.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/ToolBar.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/ToolBar.qml index 87cea7af..87cea7af 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/ToolBar.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/ToolBar.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/UserModel.qml b/examples/declarative/twitter/qml/twitter/TwitterCore/UserModel.qml index d5714754..d5714754 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/UserModel.qml +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/UserModel.qml diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/gloss.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/gloss.png Binary files differindex 5d370cd9..5d370cd9 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/gloss.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/gloss.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/lineedit.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/lineedit.png Binary files differindex 2cc38dc3..2cc38dc3 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/lineedit.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/lineedit.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/lineedit.sci b/examples/declarative/twitter/qml/twitter/TwitterCore/images/lineedit.sci index 054bff78..054bff78 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/lineedit.sci +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/lineedit.sci diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/loading.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/loading.png Binary files differindex 47a1589c..47a1589c 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/loading.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/loading.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/quit.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/quit.png Binary files differindex 5bda1b6e..5bda1b6e 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/quit.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/quit.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/stripes.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/stripes.png Binary files differindex 9f36727e..9f36727e 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/stripes.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/stripes.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/titlebar.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/titlebar.png Binary files differindex 51c90082..51c90082 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/titlebar.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/titlebar.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/titlebar.sci b/examples/declarative/twitter/qml/twitter/TwitterCore/images/titlebar.sci index 0418d94c..0418d94c 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/titlebar.sci +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/titlebar.sci diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/toolbutton.png b/examples/declarative/twitter/qml/twitter/TwitterCore/images/toolbutton.png Binary files differindex 11310013..11310013 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/toolbutton.png +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/toolbutton.png diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/images/toolbutton.sci b/examples/declarative/twitter/qml/twitter/TwitterCore/images/toolbutton.sci index 9e4f9653..9e4f9653 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/images/toolbutton.sci +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/images/toolbutton.sci diff --git a/examples/demos/twitter/qml/twitter/TwitterCore/qmldir b/examples/declarative/twitter/qml/twitter/TwitterCore/qmldir index 84d85c28..84d85c28 100644 --- a/examples/demos/twitter/qml/twitter/TwitterCore/qmldir +++ b/examples/declarative/twitter/qml/twitter/TwitterCore/qmldir diff --git a/examples/demos/twitter/qml/twitter/twitter.qml b/examples/declarative/twitter/qml/twitter/twitter.qml index 5d4cd885..5d4cd885 100644 --- a/examples/demos/twitter/qml/twitter/twitter.qml +++ b/examples/declarative/twitter/qml/twitter/twitter.qml diff --git a/examples/demos/twitter/twitter.desktop b/examples/declarative/twitter/twitter.desktop index 5d1b851b..5d1b851b 100644 --- a/examples/demos/twitter/twitter.desktop +++ b/examples/declarative/twitter/twitter.desktop diff --git a/examples/demos/twitter/twitter.pro b/examples/declarative/twitter/twitter.pro index c2beb0e3..68ece226 100644 --- a/examples/demos/twitter/twitter.pro +++ b/examples/declarative/twitter/twitter.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/demos/twitter +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/twitter exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/twitter/twitter.qmlproject b/examples/declarative/twitter/twitter.qmlproject index 3b360cf2..3b360cf2 100644 --- a/examples/demos/twitter/twitter.qmlproject +++ b/examples/declarative/twitter/twitter.qmlproject diff --git a/examples/demos/twitter/twitter.svg b/examples/declarative/twitter/twitter.svg index 566acfad..566acfad 100644 --- a/examples/demos/twitter/twitter.svg +++ b/examples/declarative/twitter/twitter.svg diff --git a/examples/demos/twitter/twitter64.png b/examples/declarative/twitter/twitter64.png Binary files differindex 707d5c4e..707d5c4e 100644 --- a/examples/demos/twitter/twitter64.png +++ b/examples/declarative/twitter/twitter64.png diff --git a/examples/demos/twitter/twitter80.png b/examples/declarative/twitter/twitter80.png Binary files differindex 6ad8096c..6ad8096c 100644 --- a/examples/demos/twitter/twitter80.png +++ b/examples/declarative/twitter/twitter80.png diff --git a/examples/demos/twitter/twitter_harmattan.desktop b/examples/declarative/twitter/twitter_harmattan.desktop index 40a4a1bc..40a4a1bc 100644 --- a/examples/demos/twitter/twitter_harmattan.desktop +++ b/examples/declarative/twitter/twitter_harmattan.desktop diff --git a/examples/declarative/ui-components/dialcontrol/dialcontrol.pro b/examples/declarative/ui-components/dialcontrol/dialcontrol.pro index 5e112a8d..a2159f30 100644 --- a/examples/declarative/ui-components/dialcontrol/dialcontrol.pro +++ b/examples/declarative/ui-components/dialcontrol/dialcontrol.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/dialcontrol +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/dialcontrol exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/flipable/flipable.pro b/examples/declarative/ui-components/flipable/flipable.pro index 0cfd2ec2..af1892f7 100644 --- a/examples/declarative/ui-components/flipable/flipable.pro +++ b/examples/declarative/ui-components/flipable/flipable.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/flipable +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/flipable exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/main/main.pro b/examples/declarative/ui-components/main/main.pro index 428ffd47..d44b7adc 100644 --- a/examples/declarative/ui-components/main/main.pro +++ b/examples/declarative/ui-components/main/main.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/main +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/main exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/progressbar/progressbar.pro b/examples/declarative/ui-components/progressbar/progressbar.pro index 8e232277..66365c2e 100644 --- a/examples/declarative/ui-components/progressbar/progressbar.pro +++ b/examples/declarative/ui-components/progressbar/progressbar.pro @@ -23,7 +23,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/progressbar +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/progressbar exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/scrollbar/scrollbar.pro b/examples/declarative/ui-components/scrollbar/scrollbar.pro index 5843ef7f..3f131b85 100644 --- a/examples/declarative/ui-components/scrollbar/scrollbar.pro +++ b/examples/declarative/ui-components/scrollbar/scrollbar.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/scrollbar +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/scrollbar exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/searchbox/searchbox.pro b/examples/declarative/ui-components/searchbox/searchbox.pro index 6219524f..aa8dd9c2 100644 --- a/examples/declarative/ui-components/searchbox/searchbox.pro +++ b/examples/declarative/ui-components/searchbox/searchbox.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/searchbox +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/searchbox exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.pro b/examples/declarative/ui-components/slideswitch/slideswitch.pro index 63e471cf..7f7c981c 100644 --- a/examples/declarative/ui-components/slideswitch/slideswitch.pro +++ b/examples/declarative/ui-components/slideswitch/slideswitch.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/slideswitch +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/slideswitch exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/spinner/spinner.pro b/examples/declarative/ui-components/spinner/spinner.pro index 0c65f28d..80c4e523 100644 --- a/examples/declarative/ui-components/spinner/spinner.pro +++ b/examples/declarative/ui-components/spinner/spinner.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/spinner +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/spinner exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/tabwidget/tabwidget.pro b/examples/declarative/ui-components/tabwidget/tabwidget.pro index 97d49ea2..83618d03 100644 --- a/examples/declarative/ui-components/tabwidget/tabwidget.pro +++ b/examples/declarative/ui-components/tabwidget/tabwidget.pro @@ -18,7 +18,7 @@ QML_IMPORT_PATH = SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components/tabwidget +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/tabwidget exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/ui-components.pro b/examples/declarative/ui-components/ui-components.pro index 951121f3..62d1cdf8 100644 --- a/examples/declarative/ui-components/ui-components.pro +++ b/examples/declarative/ui-components/ui-components.pro @@ -9,8 +9,3 @@ SUBDIRS += dialcontrol \ slideswitch \ spinner \ tabwidget - -# install -sources.files = ui-components.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/ui-components -INSTALLS += sources diff --git a/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro b/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro index 9c75b8b0..3755d5fc 100644 --- a/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro +++ b/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro @@ -23,7 +23,7 @@ DEFINES += ORIENTATIONLOCK SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/qtquick1/declarative/xml/xmlhttprequest-example +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/xml/xmlhttprequest-example exists(qmlapplicationviewer/qmlapplicationviewer.pri):include(qmlapplicationviewer/qmlapplicationviewer.pri) -else:include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) +else:include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/demos/demos.pro b/examples/demos/demos.pro deleted file mode 100644 index b0ac9ce3..00000000 --- a/examples/demos/demos.pro +++ /dev/null @@ -1,17 +0,0 @@ -TEMPLATE = subdirs - -# These demos contain C++ and need to be compiled -SUBDIRS = \ - calculator \ - flickr \ - photoviewer \ - minehunt \ - samegame \ - snake \ - rssnews \ - twitter - -# install -sources.files = demos.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/demos -INSTALLS += sources diff --git a/examples/examples.pro b/examples/examples.pro index 0d688669..baae4bb9 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,6 +1,4 @@ TEMPLATE = subdirs SUBDIRS += \ - declarative \ - demos \ - helper + declarative diff --git a/examples/helper/helper.pro b/examples/helper/helper.pro deleted file mode 100644 index 5b55497a..00000000 --- a/examples/helper/helper.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = subdirs - -# the helpers simply need a make install target, but require no compilation -sources.files = \ - qmlapplicationviewer \ - deployment.pri \ - helper.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick1/helper -INSTALLS += sources |