diff options
author | Antti Piira <apiira@blackberry.com> | 2013-10-23 17:34:18 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-29 19:18:46 +0100 |
commit | 77faf3f2c79d3d914e03ba9fc152c6b6054037ba (patch) | |
tree | 5c6b64920ee64e082f260a4194b30f38dd1e0f27 /examples/quick/demos/samegame/content/BBSettings.qml | |
parent | d232fa7c8cd01364d32a95eef7e711f3ae857d2c (diff) |
Modify SameGame to use QML Singleton
Converts SameGame to use QML Singleton for storing global settings
data that was previously stored in javascript files. In addition
adds a BlackBerry specific selector to load a different singleton
settings instance.
Change-Id: If511e5efd0e539c764ab70eca4fb0f2874b6240e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'examples/quick/demos/samegame/content/BBSettings.qml')
-rw-r--r-- | examples/quick/demos/samegame/content/BBSettings.qml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/examples/quick/demos/samegame/content/BBSettings.qml b/examples/quick/demos/samegame/content/BBSettings.qml new file mode 100644 index 0000000000..ea1c70e50d --- /dev/null +++ b/examples/quick/demos/samegame/content/BBSettings.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +import QtQml 2.0 + +QtObject { + // This height/width is here for desktop testing, otherwise + // we could just use Screen.width/Screen.height. + property int screenHeight: 1280 + property int screenWidth: 768 + + property int menuDelay: 500 + + property int headerHeight: 70 + property int footerHeight: 100 + + property int fontPixelSize: 55 + + property int blockSize: 64 + + property int toolButtonHeight: 64 + + property int menuButtonSpacing: 15 +} |