diff options
author | Alan Alpert <aalpert@blackberry.com> | 2013-07-05 14:31:06 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 01:08:53 +0200 |
commit | 67ee1cd27b5e951e782e49edf382e8e7d8ee431f (patch) | |
tree | ccd28910830fedd30732156d350563c5a29ed762 /examples/quick/demos/samegame | |
parent | a5052ea1e7286aee60e2e138a405d9864750db24 (diff) |
Apply file selectors to QQmlApplicationEngine apps
You can also manually apply them to a QQmlEngine using
setUrlInterceptor(new QQmlFileSelector(parent)), or using
your own QQmlAbstractUrlInterceptor subclass.
Change-Id: I0c0ff8b080c138686b3c03e0bc3b9f25bcd11a85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'examples/quick/demos/samegame')
-rw-r--r-- | examples/quick/demos/samegame/content/+blackberry/settings.js | 56 | ||||
-rw-r--r-- | examples/quick/demos/samegame/content/BlockEmitter.qml | 2 | ||||
-rw-r--r-- | examples/quick/demos/samegame/content/PaintEmitter.qml | 2 | ||||
-rw-r--r-- | examples/quick/demos/samegame/content/SamegameText.qml | 2 | ||||
-rwxr-xr-x | examples/quick/demos/samegame/content/samegame.js | 2 | ||||
-rw-r--r-- | examples/quick/demos/samegame/content/settings.js (renamed from examples/quick/demos/samegame/settings.js) | 0 | ||||
-rw-r--r-- | examples/quick/demos/samegame/samegame.qml | 2 | ||||
-rw-r--r-- | examples/quick/demos/samegame/samegame.qrc | 3 |
8 files changed, 63 insertions, 6 deletions
diff --git a/examples/quick/demos/samegame/content/+blackberry/settings.js b/examples/quick/demos/samegame/content/+blackberry/settings.js new file mode 100644 index 0000000000..a86d2a9a1a --- /dev/null +++ b/examples/quick/demos/samegame/content/+blackberry/settings.js @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2013 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples 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$ +** +****************************************************************************/ + +.pragma library + +//This should be switched over once a proper QML settings API exists + +var menuDelay = 500 + +var headerHeight = 70 +var footerHeight = 100 + +var fontPixelSize = 55 + +var blockSize = 64 + +var toolButtonHeight = 64 + +var menuButtonSpacing = 15 diff --git a/examples/quick/demos/samegame/content/BlockEmitter.qml b/examples/quick/demos/samegame/content/BlockEmitter.qml index ba6261c8e6..49ee38d376 100644 --- a/examples/quick/demos/samegame/content/BlockEmitter.qml +++ b/examples/quick/demos/samegame/content/BlockEmitter.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -import "../settings.js" as Settings +import "settings.js" as Settings Emitter { property Item block: parent diff --git a/examples/quick/demos/samegame/content/PaintEmitter.qml b/examples/quick/demos/samegame/content/PaintEmitter.qml index fe758af181..85d148de92 100644 --- a/examples/quick/demos/samegame/content/PaintEmitter.qml +++ b/examples/quick/demos/samegame/content/PaintEmitter.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -import "../settings.js" as Settings +import "settings.js" as Settings Emitter { property Item block: parent diff --git a/examples/quick/demos/samegame/content/SamegameText.qml b/examples/quick/demos/samegame/content/SamegameText.qml index 28c85f9486..e3bee989fb 100644 --- a/examples/quick/demos/samegame/content/SamegameText.qml +++ b/examples/quick/demos/samegame/content/SamegameText.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import "../settings.js" as Settings +import "settings.js" as Settings Text { font.pixelSize: Settings.fontPixelSize; diff --git a/examples/quick/demos/samegame/content/samegame.js b/examples/quick/demos/samegame/content/samegame.js index 6bf402ed0a..5bb24d70db 100755 --- a/examples/quick/demos/samegame/content/samegame.js +++ b/examples/quick/demos/samegame/content/samegame.js @@ -41,7 +41,7 @@ /* This script file handles the game logic */ .pragma library .import QtQuick.LocalStorage 2.0 as Sql -.import "../settings.js" as Settings +.import "settings.js" as Settings var maxColumn = 10; var maxRow = 13; diff --git a/examples/quick/demos/samegame/settings.js b/examples/quick/demos/samegame/content/settings.js index e09dee9af3..e09dee9af3 100644 --- a/examples/quick/demos/samegame/settings.js +++ b/examples/quick/demos/samegame/content/settings.js diff --git a/examples/quick/demos/samegame/samegame.qml b/examples/quick/demos/samegame/samegame.qml index 8712141509..23cdf94acc 100644 --- a/examples/quick/demos/samegame/samegame.qml +++ b/examples/quick/demos/samegame/samegame.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 import "content/samegame.js" as Logic -import "settings.js" as Settings +import "content/settings.js" as Settings import "content" Rectangle { diff --git a/examples/quick/demos/samegame/samegame.qrc b/examples/quick/demos/samegame/samegame.qrc index 951b9d116c..40b7cb6478 100644 --- a/examples/quick/demos/samegame/samegame.qrc +++ b/examples/quick/demos/samegame/samegame.qrc @@ -1,7 +1,8 @@ <RCC> <qresource prefix="/demos/samegame"> <file>samegame.qml</file> - <file>settings.js</file> + <file>content/settings.js</file> + <file>content/+blackberry/settings.js</file> <file>content/gfx/text-p1-won.png</file> <file>content/gfx/background-puzzle.png</file> <file>content/gfx/background.png</file> |