summaryrefslogtreecommitdiffstats
path: root/examples/mobile/quickhit/plugins/LevelTemplate
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mobile/quickhit/plugins/LevelTemplate')
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/changelog11
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/compat1
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/control11
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/copyright8
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/dirs2
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist41
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/postinst5
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/debian/rules91
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.pngbin0 -> 38263 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.pngbin0 -> 4508 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.pngbin0 -> 4344 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.pngbin0 -> 452 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.pngbin0 -> 392 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/ship.pngbin0 -> 5408 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.pngbin0 -> 1000 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp124
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h100
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro100
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml62
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.js42
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml104
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/crash.wavbin0 -> 963020 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wavbin0 -> 78380 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wavbin0 -> 219642 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/laser.wavbin0 -> 46764 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/level2.wavbin0 -> 84034 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wavbin0 -> 120474 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wavbin0 -> 41336 bytes
-rw-r--r--examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wavbin0 -> 289420 bytes
29 files changed, 702 insertions, 0 deletions
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/changelog b/examples/mobile/quickhit/plugins/LevelTemplate/debian/changelog
new file mode 100644
index 00000000..a5e0a1bd
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/changelog
@@ -0,0 +1,11 @@
+leveltemplate (1.1.0) unstable; urgency=low
+
+ * Final graphics
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Wed, 5 Jan 2011 10:05:04 +0200
+
+leveltemplate (1.0.0) unstable; urgency=low
+
+ * First version
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 19 Oct 2010 10:05:04 +0200
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/compat b/examples/mobile/quickhit/plugins/LevelTemplate/debian/compat
new file mode 100644
index 00000000..7f8f011e
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/control b/examples/mobile/quickhit/plugins/LevelTemplate/debian/control
new file mode 100644
index 00000000..68742fdf
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/control
@@ -0,0 +1,11 @@
+Source: leveltemplate
+Section: user/games
+Priority: extra
+Maintainer: Antonio Aloisio <antonio.aloisio@nokia.com>
+Standards-Version: 3.7.2
+
+Package: leveltemplate
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: QuickHit - Level Template
+ QuickHit - Level Template
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/copyright b/examples/mobile/quickhit/plugins/LevelTemplate/debian/copyright
new file mode 100644
index 00000000..f9ee8e22
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/copyright
@@ -0,0 +1,8 @@
+This is leveltemplate, written and maintained by Forum Nokia Antonio Aloisio <antonio.aloisio@nokia.com>
+on Tue, 19 Oct 2010 10:05:04 +0200
+
+
+Copyright Holder: Nokia (c) 2010
+
+License:
+
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/dirs b/examples/mobile/quickhit/plugins/LevelTemplate/debian/dirs
new file mode 100644
index 00000000..80507f10
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications/hildon
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist b/examples/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist
new file mode 100644
index 00000000..f3146fa1
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist
@@ -0,0 +1,41 @@
+755 root root . home /
+755 root root . home/maemo /
+755 root root . home/maemo/quickhitdata /
+755 root root . home/maemo/quickhitdata/levelone /
+644 root root . home/maemo/quickhitdata/levelone/Level.qml debian/levelone/home/maemo/quickhitdata/levelone/Level.qml
+755 root root . home/maemo/quickhitdata/leveltwo /
+755 root root . home/maemo/quickhitdata/leveltwo/gfx /
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/background3.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/background3.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/blue_fire.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/blue_fire.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy1.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy1.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy_missile2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy_missile2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/fire.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/fire.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/fire2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/fire2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/missile.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/missile.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/missile2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/missile2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/moon.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/moon.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/ship.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/ship.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/star3.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/star3.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/transparent.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/transparent.png
+755 root root . home/maemo/quickhitdata/leveltwo/sound /
+644 root root . home/maemo/quickhitdata/leveltwo/sound/crash.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/crash.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/enemy_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/enemy_explosion.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/laser.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/laser.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/myship_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/myship_explosion.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/rocket.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/rocket.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/rocket_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/rocket_explosion.wav
+755 root root . usr /
+755 root root . usr/bin /
+755 root root . usr/lib /
+755 root root . usr/lib/qt4 /
+755 root root . usr/lib/qt4/plugins /
+755 root root . usr/lib/qt4/plugins/quickhitlevels /
+644 root root . usr/lib/qt4/plugins/quickhitlevels/libleveltwo.so debian/levelone/usr/lib/qt4/plugins/quickhitlevels/libleveltwo.so
+755 root root . usr/share /
+755 root root . usr/share/applications /
+755 root root . usr/share/applications/hildon /
+755 root root . usr/share/doc /
+755 root root . usr/share/doc/levelone /
+644 root root . usr/share/doc/levelone/changelog.gz debian/levelone/usr/share/doc/levelone/changelog.gz
+644 root root . usr/share/doc/levelone/copyright debian/levelone/usr/share/doc/levelone/copyright
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/postinst b/examples/mobile/quickhit/plugins/LevelTemplate/debian/postinst
new file mode 100644
index 00000000..79fb6ddd
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/debian/rules b/examples/mobile/quickhit/plugins/LevelTemplate/debian/rules
new file mode 100644
index 00000000..7f30ca37
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+APPNAME := leveltemplate
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/$(APPNAME).
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/$(APPNAME) install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ # dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.png
new file mode 100644
index 00000000..8667a397
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.png
new file mode 100644
index 00000000..94f149bd
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.png
new file mode 100644
index 00000000..448f8ca6
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.png
new file mode 100644
index 00000000..c0b28d86
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.png
new file mode 100644
index 00000000..dacd6106
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/ship.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/ship.png
new file mode 100644
index 00000000..cb7851c4
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/ship.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.png b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.png
new file mode 100644
index 00000000..3aa1e413
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.png
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp b/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp
new file mode 100644
index 00000000..47598c89
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "leveltemplate.h"
+#include <QtCore/qplugin.h>
+
+
+LevelTemplate::LevelTemplate()
+{
+}
+
+LevelTemplate::~LevelTemplate()
+{
+}
+
+QString LevelTemplate::pathPrefix()
+{
+/*
+QDir::rootPath()
+For Unix operating systems this returns "/".
+For Windows file systems this normally returns "c:/".
+On Symbian this typically returns "c:/data",
+*/
+
+#ifdef Q_WS_MAEMO_5
+ return "/home/user/.";
+#elif defined Q_OS_WIN32
+ return QDir::rootPath();
+#else
+ //return QDir::rootPath()+"/";
+ return "c:/System/";
+#endif
+}
+
+QStringList LevelTemplate::levelSounds()
+{
+ QStringList list;
+
+
+ // NOTE: Mandatory sounds/indexs for the all levels
+ // 0 = Enemy explode
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/enemy_explosion.wav");
+ // 1 = You explode
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/myship_explosion.wav");
+ // 2 = Missile fires
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/laser.wav");
+ // 3 = Emeny Missile fires
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/rocket.wav");
+
+ // Additional sounds
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/enableship.wav");
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/level2.wav");
+
+
+ return list;
+}
+
+QVariant LevelTemplate::getData(QVariant key)
+{
+ QVariant ret;
+ switch (key.toInt()) {
+ case 1: {
+ // Any data what you need for this key
+ // Set your data into QVariant (ret)
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ return ret;
+}
+
+QVariant LevelTemplate::graphSize(QVariant pathToGraph)
+{
+ QVariant ret;
+ m_imageReader.setFileName(pathToGraph.toString());
+ QSize imageSize = m_imageReader.size();
+ ret.setValue(imageSize);
+ return ret;
+}
+
+
+
+
+
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h b/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h
new file mode 100644
index 00000000..55019036
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LevelTemplate_H
+#define LevelTemplate_H
+
+#include <QObject>
+#include <QDir>
+#include <QImageReader>
+
+// Common interface header for all level plugins
+#include "levelplugininterface.h"
+
+// Level name
+#define LEVEL_NAME "leveltemplate"
+
+class LevelTemplate : public LevelPluginInterface
+{
+ Q_OBJECT
+
+ // This Qt macro exports the plugin.
+ // There should be exactly one occurrence of this macro in a Qt plugin's source code.
+ Q_PLUGIN_METADATA(IID "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0")
+
+ // This macro tells Qt which interfaces the class implements.
+ // This is used when implementing plugins.
+ Q_INTERFACES(LevelPluginInterface)
+
+public:
+ LevelTemplate();
+ ~LevelTemplate();
+
+ static QString pathPrefix();
+
+public: // From LevelPluginInterface
+
+ QStringList levelSounds();
+
+ Q_INVOKABLE QVariant getData(QVariant key);
+
+ Q_INVOKABLE QVariant graphSize(QVariant pathToGraph);
+
+ Q_INVOKABLE QVariant enemyCount() { return QVariant(1); }
+ Q_INVOKABLE QVariant enemyRowCount() { return QVariant(0); }
+ Q_INVOKABLE QVariant enemySpeed() { return QVariant(20000); }
+ Q_INVOKABLE QVariant enemyFireSpeed() { return QVariant(2000); }
+
+ // Root paths for the QML, Pictures and Sounds
+ Q_INVOKABLE QVariant qmlRootPath() { return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/"); }
+ Q_INVOKABLE QVariant pictureRootPath() { return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/"); }
+
+ // Full paths
+ Q_INVOKABLE QVariant pathToTransparentEnemyPic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/transparent.png");}
+ Q_INVOKABLE QVariant pathToMissilePic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/missile2.png");}
+ Q_INVOKABLE QVariant pathToEnemyMissilePic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/enemy_missile2.png");}
+ Q_INVOKABLE QVariant pathToMyShipPic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/ship.png");}
+
+protected:
+ QImageReader m_imageReader;
+};
+
+#endif // LevelTemplate_H
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro b/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro
new file mode 100644
index 00000000..0eecca7e
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro
@@ -0,0 +1,100 @@
+TEMPLATE = lib
+
+#VERSION = 1.1.0
+
+CONFIG += plugin
+
+INCLUDEPATH += ../
+
+HEADERS = leveltemplate.h
+
+SOURCES = leveltemplate.cpp
+
+TARGET = $$qtLibraryTarget(leveltemplate)
+
+OTHER_FILES += qml/Level.qml \
+ qml/Enemy.qml \
+ qml/Level.js
+
+
+# SYMBIAN ---------------------------
+symbian: {
+# Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files
+load(data_caging_paths)
+
+# EPOCALLOWDLLDATA have to set true because Qt macros has initialised global data
+TARGET.EPOCALLOWDLLDATA=1
+TARGET.UID3 = 0xE07dfb68
+
+TARGET.CAPABILITY = NetworkServices \
+ Location \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment
+
+# Defines plugin stub file into Symbian .pkg package
+pluginDep.sources = leveltemplate.dll
+pluginDep.path = $$QT_PLUGINS_BASE_DIR/quickhitlevels
+DEPLOYMENT += pluginDep
+
+# Graphics and Sounds for the plugin
+BLD_INF_RULES.prj_exports += "gfx/enemy1.png ../winscw/c/Data/gfx/enemy1.png" \
+"gfx/enemy2.png ../winscw/c/Data/gfx/enemy2.png" \
+"gfx/missile2.png ../winscw/c/Data/gfx/missile2.png" \
+"gfx/enemy_missile2.png ../winscw/c/Data/gfx/enemy_missile2.png" \
+"gfx/ship.png ../winscw/c/Data/gfx/ship.png" \
+"gfx/transparent.png ../winscw/c/Data/gfx/transparent.png" \
+"gfx/blue_fire.png ../winscw/c/Data/gfx/blue_fire.png" \
+"sound/enemy_explosion.wav ../winscw/c/Data/sound/enemy_explosion.wav" \
+"sound/myship_explosion.wav ../winscw/c/Data/sound/myship_explosion.wav" \
+"sound/enableship.wav ../winscw/c/Data/sound/enableship.wav" \
+"sound/laser.wav ../winscw/c/Data/sound/laser.wav" \
+"sound/level2.wav ../winscw/c/Data/sound/level2.wav" \
+"qml/Level.qml ../winscw/c/Data/Level.qml" \
+"qml/Level.js ../winscw/c/Data/Level.js" \
+"qml/Enemy.qml ../winscw/c/Data/Enemy.qml"
+
+
+myQml.sources = qml/*
+myQml.path = c:/system/quickhitdata/leveltemplate
+myGraphic.sources = gfx/*
+myGraphic.path = c:/system/quickhitdata/leveltemplate/gfx
+mySound.sources = sound/*
+mySound.path = c:/system/quickhitdata/leveltemplate/sound
+# Takes qml, graphics and sounds into Symbian SIS package file (.pkg)
+DEPLOYMENT += myQml myGraphic mySound
+
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+# Installs binaries
+INSTALLS += target
+}
+
+# WINDOWS ---------------------------
+win32: {
+# Copy level sounds and graphics into right destination
+system(mkdir c:\quickhitdata\leveltemplate)
+system(mkdir c:\quickhitdata\leveltemplate\gfx)
+system(mkdir c:\quickhitdata\leveltemplate\sound)
+system(copy qml\*.* c:\quickhitdata\leveltemplate)
+system(copy gfx\*.* c:\quickhitdata\leveltemplate\gfx)
+system(copy sound\*.* c:\quickhitdata\leveltemplate\sound)
+
+# Installs binaries
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+INSTALLS += target
+}
+
+# MAEMO_5 ---------------------------
+maemo5: {
+myQml.path = /home/user/.quickhitdata/leveltemplate/
+myQml.files += qml/*
+myGraphic.path = /home/user/.quickhitdata/leveltemplate/gfx/
+myGraphic.files += gfx/*
+mySound.path = /home/user/.quickhitdata/leveltemplate/sound/
+mySound.files += sound/*
+
+target.path += /usr/lib/qt4/plugins/quickhitlevels
+# Installs qml, binaries, sounds and graphics
+INSTALLS += target myGraphic mySound myQml
+}
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml b/examples/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml
new file mode 100644
index 00000000..96d13222
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Image {
+ id: enemy
+
+ // ***************************************************
+ // *** NOTE: This "enemy "is mandatory enemy object name for all enemy QML files
+ objectName: "enemy"
+
+ smooth:true
+ opacity: 0 // 0=hidden by default
+ fillMode:Image.PreserveAspectFit
+ source:"file:/"+LevelPlugin.pictureRootPath()+"enemy1.png"
+
+ property int enemySpeed: LevelPlugin.enemySpeed()
+
+ // ***************************************************
+ // *** NOTE: This "pause(bool)" function is mandatory for all enemies QML files
+ function pause(doPause) {
+ }
+}
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.js b/examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.js
new file mode 100644
index 00000000..9529d4af
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.js
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** 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 Nokia Corporation 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$
+**
+****************************************************************************/
+
+var hiddenEnemies = new Array()
+
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml b/examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml
new file mode 100644
index 00000000..6a5d25a1
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import Qt.labs.particles 1.0
+
+// Level own JavaScript file
+import "Level.js" as LevelScript
+
+Rectangle {
+ id: enemies
+ anchors.fill: parent
+ property int enemiesCreated: 0
+ property int enemiesEnabled: 0
+ color: "black"
+
+ // ***************************************************
+ // *** NOTE: This "pause(bool)" function is mandatory for all level QML files
+ function pause(doPause) {
+ }
+
+ // ***************************************************
+ // *** NOTE: Level object name "level" is mandatory for all level QML files
+ objectName: "level"
+
+ // Enemy placeholder. Have to exist at least one enemy for prevent to level be stopped
+ Enemy {
+ x: parent.width / 2
+ y: parent.height / 2
+ opacity: 1
+ }
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Execute explode particle effect
+ function explode(x,y) {
+ explodeParticles.x = x
+ explodeParticles.y = y
+ explodeParticles.burst(20)
+ explodeParticles.opacity = 1
+ }
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Explode particle effect
+ Particles {
+ id: explodeParticles
+ opacity: 0
+ width: 1
+ height: 1
+ emissionRate: 0
+ source: "file:/"+LevelPlugin.pictureRootPath()+"blue_fire.png"
+ lifeSpan: 500
+ lifeSpanDeviation: 2000
+ count: -1
+ angle: 270
+ angleDeviation: 65
+ velocity: 100
+ velocityDeviation: 100
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 300
+ acceleration: 50
+ }
+ }
+}
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/crash.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/crash.wav
new file mode 100644
index 00000000..8076f0f6
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/crash.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wav
new file mode 100644
index 00000000..6fe5fe84
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wav
new file mode 100644
index 00000000..fd338e6b
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/laser.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/laser.wav
new file mode 100644
index 00000000..c3b58b20
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/laser.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/level2.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/level2.wav
new file mode 100644
index 00000000..24d39174
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/level2.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wav
new file mode 100644
index 00000000..e22d030e
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wav
new file mode 100644
index 00000000..8c0dee9a
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wav
Binary files differ
diff --git a/examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wav b/examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wav
new file mode 100644
index 00000000..d2b451cc
--- /dev/null
+++ b/examples/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wav
Binary files differ