Skip to content

Commit

Permalink
SensorsAccelGame SensorsCompass SensorsImageRotationSensorsOrientatio…
Browse files Browse the repository at this point in the history
…n SensorsTossGame projecets added
  • Loading branch information
johodgson committed Sep 21, 2012
1 parent 44bf66f commit 398aac8
Show file tree
Hide file tree
Showing 98 changed files with 4,983 additions and 0 deletions.
210 changes: 210 additions & 0 deletions SensorsAccelGame/.cproject

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions SensorsAccelGame/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>accelgame</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>Device-Debug</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>Device-Debug</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.rim.tad.tools.qml.core.qmlFileBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>com.rim.tad.tools.qml.core.qmlNature</nature>
</natures>
</projectDescription>
25 changes: 25 additions & 0 deletions SensorsAccelGame/.settings/org.eclipse.cdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
eclipse.preferences.version=1
environment/project/com.qnx.qcc.toolChain.1459568978/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1459568978/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.1459568978/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.1459568978/EXCLUDE_VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1459568978/EXCLUDE_VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.1459568978/EXCLUDE_VARIANTLIST/value=r
environment/project/com.qnx.qcc.toolChain.1459568978/append=true
environment/project/com.qnx.qcc.toolChain.1459568978/appendContributed=true
environment/project/com.qnx.qcc.toolChain.1602364756/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1602364756/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.1602364756/CPULIST/value=x86
environment/project/com.qnx.qcc.toolChain.1602364756/VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1602364756/VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.1602364756/VARIANTLIST/value=g
environment/project/com.qnx.qcc.toolChain.1602364756/append=true
environment/project/com.qnx.qcc.toolChain.1602364756/appendContributed=true
environment/project/com.qnx.qcc.toolChain.1799526570/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1799526570/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.1799526570/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.1799526570/VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.1799526570/VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.1799526570/VARIANTLIST/value=g
environment/project/com.qnx.qcc.toolChain.1799526570/append=true
environment/project/com.qnx.qcc.toolChain.1799526570/appendContributed=true
34 changes: 34 additions & 0 deletions SensorsAccelGame/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
QMAKE_TARGET = accelgame
QMAKE = $(QNX_HOST)/usr/bin/qmake
TARGET = $(QMAKE_TARGET)


all: Makefile $(QMAKE_TARGET)

clean:
$(MAKE) -C ./arm -f Makefile sureclean
$(MAKE) -C ./x86 -f Makefile sureclean


Makefile: FORCE
$(QMAKE) -spec unsupported/blackberry-armv7le-g++ -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device
$(QMAKE) -spec unsupported/blackberry-x86-g++ -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator

FORCE:

$(QMAKE_TARGET): device simulator

device:
$(MAKE) -C ./arm -f Makefile all

Device-Debug: Makefile
$(MAKE) -C ./arm -f Makefile debug

Device-Release: Makefile
$(MAKE) -C ./arm -f Makefile release

simulator:
$(MAKE) -C ./x86 -f Makefile all

Simulator-Debug: Makefile
$(MAKE) -C ./x86 -f Makefile debug
51 changes: 51 additions & 0 deletions SensorsAccelGame/accelgame.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
TEMPLATE = app
TARGET = accelgame

CONFIG += qt warn_on debug_and_release cascades mobility
MOBILITY += sensors

INCLUDEPATH += ../src
SOURCES += ../src/*.cpp
HEADERS += ../src/*.hpp ../src/*.h

lupdate_inclusion {
SOURCES += ../assets/*.qml
}

device {
CONFIG(release, debug|release) {
DESTDIR = o.le-v7
}
CONFIG(debug, debug|release) {
DESTDIR = o.le-v7-g
}
}

simulator {
CONFIG(release, debug|release) {
DESTDIR = o
}
CONFIG(debug, debug|release) {
DESTDIR = o-g
}
}

OBJECTS_DIR = $${DESTDIR}/.obj
MOC_DIR = $${DESTDIR}/.moc
RCC_DIR = $${DESTDIR}/.rcc
UI_DIR = $${DESTDIR}/.ui

suredelete.target = sureclean
suredelete.commands = $(DEL_FILE) $${MOC_DIR}/*; $(DEL_FILE) $${RCC_DIR}/*; $(DEL_FILE) $${UI_DIR}/*
suredelete.depends = distclean

QMAKE_EXTRA_TARGETS += suredelete

TRANSLATIONS = \
$${TARGET}_en_GB.ts \
$${TARGET}_fr.ts \
$${TARGET}_it.ts \
$${TARGET}_de.ts \
$${TARGET}_es.ts \
$${TARGET}.ts

Empty file added SensorsAccelGame/arm/.gitignore
Empty file.
51 changes: 51 additions & 0 deletions SensorsAccelGame/assets/Maze.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) 2011, 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import bb.cascades 1.0

Container {
// The size is defined by the background image
preferredWidth: 550
preferredHeight: 550

layout: AbsoluteLayout {}

// The background image of the maze
ImageView {
layoutProperties: AbsoluteLayoutProperties {
positionX: 0
positionY: 0
}
imageSource: "asset:///images/maze_background.png"
}

//! [0]
// The board where the player object can be moved
Container {
objectName: "board"

layoutProperties: AbsoluteLayoutProperties {
positionX: 50
positionY: 50
}

layout: AbsoluteLayout {}

preferredWidth: 450
preferredHeight: 450
}
//! [0]
}
Binary file added SensorsAccelGame/assets/images/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SensorsAccelGame/assets/images/block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SensorsAccelGame/assets/images/player.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions SensorsAccelGame/assets/main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright (c) 2011, 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import bb.cascades 1.0

Page {
Container {
layout: DockLayout {}

// The background image
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}

// The top-level Container that contains the Maze and control elements
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}

// The left side of the screen
Container {
preferredWidth: 600
verticalAlignment: VerticalAlignment.Center
layoutProperties: StackLayoutProperties {
spaceQuota: 2
}
layout: DockLayout {}

//! [0]
// The maze board
Maze {
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
}
//! [0]
}

// The right side of the screen
Container {
preferredWidth: 400
verticalAlignment: VerticalAlignment.Center
layoutProperties: StackLayoutProperties {
spaceQuota: 2
}

//! [1]
Button {
horizontalAlignment: HorizontalAlignment.Center
text: qsTr ("New Game")
onClicked: _gameController.newGame()
}

Button {
horizontalAlignment: HorizontalAlignment.Center
text: qsTr ("Quit")
onClicked: _app.quit()
}
//! [1]
}
}
}
}
Loading

0 comments on commit 398aac8

Please sign in to comment.