summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorartoka <arto.katajasalo@digia.com>2011-11-17 14:49:42 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-11-17 14:58:10 (GMT)
commit4446847282855b00e66dc61e6a07edcad6939e63 (patch)
treefb59f89e4b40f782e5dc194f2816e0859015a46e /examples
parent3a750ac1b575efb2da50557483d6a1c3e1813c9d (diff)
downloadQt-4446847282855b00e66dc61e6a07edcad6939e63.zip
Qt-4446847282855b00e66dc61e6a07edcad6939e63.tar.gz
Qt-4446847282855b00e66dc61e6a07edcad6939e63.tar.bz2
cppextensions/qgraphicslayouts examples modifications
Modified projects to use centralized qmlapplicationviewer, removed duplicated files and modified project files according to the changes. Merge-request: 2719 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.qrc9
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/main.cpp12
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro55
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qml/qgraphicsgridlayout/qgraphicsgridlayout.qml (renamed from examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.qrc9
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/main.cpp12
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro52
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qml/qgraphicslinearlayout/qgraphicslinearlayout.qml (renamed from examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml)0
8 files changed, 120 insertions, 29 deletions
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.qrc b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.qrc
index bdf8312..112b6f0 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.qrc
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.qrc
@@ -1,6 +1,5 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>qgraphicsgridlayout.qml</file>
-</qresource>
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qgraphicsgridlayout/qgraphicsgridlayout.qml</file>
+ </qresource>
</RCC>
-
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/main.cpp
index 6525cb3..2c42cd9 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/main.cpp
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/main.cpp
@@ -39,10 +39,9 @@
****************************************************************************/
#include "gridlayout.h"
-
+#include "qmlapplicationviewer.h"
#include <qdeclarative.h>
#include <QDeclarativeView>
-
#include <QApplication>
int main(int argc, char* argv[])
@@ -53,11 +52,12 @@ int main(int argc, char* argv[])
qmlRegisterInterface<QGraphicsLayout>("QGraphicsLayout");
qmlRegisterType<GraphicsGridLayoutObject>("GridLayouts", 4, 7, "GraphicsGridLayout");
- QDeclarativeView view;
- view.setSource(QUrl(":qgraphicsgridlayout.qml"));
- view.show();
+ QmlApplicationViewer viewer;
+ viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
+ viewer.setMainQmlFile("qml/qgraphicsgridlayout/qgraphicsgridlayout.qml");
+ viewer.showExpanded();
return app.exec();
-};
+}
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro
index ae6373d..d39a50f 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro
@@ -1,7 +1,53 @@
-TEMPLATE = app
-TARGET = qgraphicsgridlayout
-QT += declarative
+#TEMPLATE = app
+#TARGET = qgraphicsgridlayout
+#QT += declarative
+#SOURCES += \
+# gridlayout.cpp \
+# main.cpp
+
+#HEADERS += \
+# gridlayout.h
+
+#RESOURCES += \
+# gridlayout.qrc
+
+
+
+
+# Add more folders to ship with the application, here
+folder_01.source = qml/qgraphicsgridlayout
+folder_01.target = qml
+DEPLOYMENTFOLDERS = folder_01
+
+# Additional import path used to resolve QML modules in Creator's code model
+QML_IMPORT_PATH =
+
+symbian:TARGET.UID3 = 0xE7E0DF63
+
+# Smart Installer package's UID
+# This UID is from the protected range and therefore the package will
+# fail to install if self-signed. By default qmake uses the unprotected
+# range value if unprotected UID is defined for the application and
+# 0x2002CCCF value if protected UID is given to the application
+#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
+
+# Allow network access on Symbian
+symbian:TARGET.CAPABILITY += NetworkServices
+
+# If your application uses the Qt Mobility libraries, uncomment the following
+# lines and add the respective components to the MOBILITY variable.
+# CONFIG += mobility
+# MOBILITY +=
+
+# Speed up launching on MeeGo/Harmattan when using applauncherd daemon
+# CONFIG += qdeclarative-boostable
+
+# Add dependency to Symbian components
+# CONFIG += qt-components
+QT += network
+
+# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += \
gridlayout.cpp \
main.cpp
@@ -12,4 +58,7 @@ HEADERS += \
RESOURCES += \
gridlayout.qrc
+# Please do not modify the following two lines. Required for deployment.
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
+qtcAddDeployment()
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qml/qgraphicsgridlayout/qgraphicsgridlayout.qml
index 6780a5a..6780a5a 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qml/qgraphicsgridlayout/qgraphicsgridlayout.qml
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.qrc b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.qrc
index 93a3533..9686f9b 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.qrc
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.qrc
@@ -1,6 +1,5 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>qgraphicslinearlayout.qml</file>
-</qresource>
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qgraphicslinearlayout/qgraphicslinearlayout.qml</file>
+ </qresource>
</RCC>
-
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/main.cpp
index f8d08c2..3299c70 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/main.cpp
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/main.cpp
@@ -39,10 +39,9 @@
****************************************************************************/
#include "linearlayout.h"
-
+#include "qmlapplicationviewer.h"
#include <qdeclarative.h>
#include <QDeclarativeView>
-
#include <QApplication>
int main(int argc, char* argv[])
@@ -54,11 +53,12 @@ int main(int argc, char* argv[])
qmlRegisterType<GraphicsLinearLayoutStretchItemObject>("LinearLayouts", 4, 7, "GraphicsLinearLayoutStretchItem");
qmlRegisterType<GraphicsLinearLayoutObject>("LinearLayouts", 4, 7, "GraphicsLinearLayout");
- QDeclarativeView view;
- view.setSource(QUrl(":qgraphicslinearlayout.qml"));
- view.show();
+ QmlApplicationViewer viewer;
+ viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
+ viewer.setMainQmlFile("qml/qgraphicslinearlayout/qgraphicslinearlayout.qml");
+ viewer.showExpanded();
return app.exec();
-};
+}
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro
index 79eb6ff..0e83cfa 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro
@@ -1,7 +1,49 @@
-TEMPLATE = app
-TARGET = qgraphicslinearlayout
-QT += declarative
+#TEMPLATE = app
+#TARGET = qgraphicslinearlayout
+#QT += declarative
+#SOURCES += \
+# linearlayout.cpp \
+# main.cpp
+
+#HEADERS += \
+# linearlayout.h
+
+#RESOURCES += \
+# linearlayout.qrc
+
+# Add more folders to ship with the application, here
+folder_01.source = qml/qgraphicslinearlayout
+folder_01.target = qml
+DEPLOYMENTFOLDERS = folder_01
+
+# Additional import path used to resolve QML modules in Creator's code model
+QML_IMPORT_PATH =
+
+symbian:TARGET.UID3 = 0xE7D233DA
+
+# Smart Installer package's UID
+# This UID is from the protected range and therefore the package will
+# fail to install if self-signed. By default qmake uses the unprotected
+# range value if unprotected UID is defined for the application and
+# 0x2002CCCF value if protected UID is given to the application
+#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
+
+# Allow network access on Symbian
+symbian:TARGET.CAPABILITY += NetworkServices
+
+# If your application uses the Qt Mobility libraries, uncomment the following
+# lines and add the respective components to the MOBILITY variable.
+# CONFIG += mobility
+# MOBILITY +=
+
+# Speed up launching on MeeGo/Harmattan when using applauncherd daemon
+# CONFIG += qdeclarative-boostable
+
+# Add dependency to Symbian components
+# CONFIG += qt-components
+
+# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += \
linearlayout.cpp \
main.cpp
@@ -12,4 +54,6 @@ HEADERS += \
RESOURCES += \
linearlayout.qrc
-
+# Please do not modify the following two lines. Required for deployment.
+include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri)
+qtcAddDeployment()
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qml/qgraphicslinearlayout/qgraphicslinearlayout.qml
index a7d79e5..a7d79e5 100644
--- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qml/qgraphicslinearlayout/qgraphicslinearlayout.qml