forked from blackberry/Cascades-Community-Samples
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'touchTicTacTenPrepGitHub'
- Loading branch information
Showing
15 changed files
with
301 additions
and
207 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
eclipse.preferences.version=1 | ||
environment/project/com.qnx.qcc.toolChain.1734555494/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.1734555494/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.1734555494/CPULIST/value=x86 | ||
environment/project/com.qnx.qcc.toolChain.1734555494/VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.1734555494/VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.1734555494/VARIANTLIST/value=g | ||
environment/project/com.qnx.qcc.toolChain.1734555494/append=true | ||
environment/project/com.qnx.qcc.toolChain.1734555494/appendContributed=true | ||
environment/project/com.qnx.qcc.toolChain.438719540/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.438719540/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.438719540/CPULIST/value=arm | ||
environment/project/com.qnx.qcc.toolChain.438719540/EXCLUDE_VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.438719540/EXCLUDE_VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.438719540/EXCLUDE_VARIANTLIST/value=r | ||
environment/project/com.qnx.qcc.toolChain.438719540/append=true | ||
environment/project/com.qnx.qcc.toolChain.438719540/appendContributed=true | ||
environment/project/com.qnx.qcc.toolChain.681787606/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.681787606/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.681787606/CPULIST/value=arm | ||
environment/project/com.qnx.qcc.toolChain.681787606/VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.681787606/VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.681787606/VARIANTLIST/value=g | ||
environment/project/com.qnx.qcc.toolChain.681787606/append=true | ||
environment/project/com.qnx.qcc.toolChain.681787606/appendContributed=true | ||
environment/project/com.qnx.qcc.toolChain.768170920/CPULIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.768170920/CPULIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.768170920/CPULIST/value=arm | ||
environment/project/com.qnx.qcc.toolChain.768170920/EXCLUDE_VARIANTLIST/delimiter=, | ||
environment/project/com.qnx.qcc.toolChain.768170920/EXCLUDE_VARIANTLIST/operation=append | ||
environment/project/com.qnx.qcc.toolChain.768170920/EXCLUDE_VARIANTLIST/value=p | ||
environment/project/com.qnx.qcc.toolChain.768170920/append=true | ||
environment/project/com.qnx.qcc.toolChain.768170920/appendContributed=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,6 @@ | ||
QMAKE_TARGET = TouchTicTacTen | ||
QMAKE = $(QNX_HOST)/usr/bin/qmake | ||
TARGET = $(QMAKE_TARGET) | ||
PROJECT_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) | ||
I18N_DIR := $(PROJECT_DIR)/translations | ||
|
||
include mk/cs-base.mk | ||
|
||
all: Makefile $(QMAKE_TARGET) | ||
|
||
clean: | ||
$(MAKE) -C ./arm -f Makefile sureclean | ||
$(MAKE) -C ./x86 -f Makefile sureclean | ||
|
||
|
||
Makefile: FORCE | ||
$(QMAKE) -spec unsupported/blackberry-armv7le-qcc -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device | ||
$(QMAKE) -spec unsupported/blackberry-x86-qcc -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator | ||
$(MAKE) -C ./translations -f Makefile update release | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,6 @@ | ||
TEMPLATE = app | ||
TARGET = TouchTicTacTen | ||
APP_NAME = TouchTicTacTen | ||
|
||
CONFIG += qt warn_on debug_and_release cascades | ||
|
||
INCLUDEPATH += ../src | ||
SOURCES += ../src/*.cpp | ||
HEADERS += ../src/*.hpp ../src/*.h | ||
CONFIG += qt warn_on cascades10 | ||
LIBS += -lnfc -lnfc_bps | ||
|
||
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 | ||
|
||
include(config.pri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
/* Copyright (c) 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 { | ||
background: backgroundPaint.imagePaint | ||
attachedObjects: [ | ||
ImagePaintDefinition { | ||
id: backgroundPaint | ||
imageSource: "asset:///images/background.png" | ||
} | ||
] | ||
layout: StackLayout { | ||
} | ||
Container { | ||
layout: StackLayout { | ||
orientation: LayoutOrientation.LeftToRight | ||
} | ||
horizontalAlignment: HorizontalAlignment.Center | ||
Label { | ||
text: "Touch Tic Tac Toe:" | ||
textStyle { | ||
base: SystemDefaults.TextStyles.TitleText | ||
fontWeight: FontWeight.Bold | ||
color: Color.create("#E6E9F8") | ||
} | ||
layoutProperties: StackLayoutProperties { | ||
} | ||
} | ||
Label { | ||
id: propertytime | ||
|
||
// ttt.numMoves is a property that we keep track on in cpp code | ||
// every time it's changed the text will be updated. | ||
text: " Moves: " + ttt.numMoves | ||
textStyle { | ||
base: SystemDefaults.TextStyles.TitleText | ||
fontWeight: FontWeight.Bold | ||
color: Color.create("#E6E9F8") | ||
} | ||
} | ||
} | ||
Label { | ||
id: message | ||
|
||
// ttt.message is a property that we keep track on in cpp code | ||
// every time it's changed the text will be updated. | ||
text: ttt.message | ||
textStyle { | ||
base: SystemDefaults.TextStyles.SubtitleText | ||
fontWeight: FontWeight.Bold | ||
color: Color.Yellow | ||
} | ||
layoutProperties: StackLayoutProperties { | ||
} | ||
horizontalAlignment: HorizontalAlignment.Center | ||
} | ||
|
||
// Here we group the containers player area, a background and a nice flare on top | ||
Container { | ||
layout: DockLayout { | ||
} | ||
layoutProperties: StackLayoutProperties { | ||
} | ||
horizontalAlignment: HorizontalAlignment.Center | ||
//This container is the one we find from CPP and add all the tiles to | ||
// It's so much easier to do that from C++. | ||
Container { | ||
objectName: "playArea" | ||
//The dark gray is an average trick, we can use it to see where we put our player area when layouting. | ||
background: Color.DarkGray | ||
preferredWidth: 600 | ||
preferredHeight: preferredWidth | ||
layout: StackLayout { | ||
orientation: LayoutOrientation.LeftToRight | ||
} | ||
layoutProperties: StackLayoutProperties { | ||
} | ||
horizontalAlignment: HorizontalAlignment.Center | ||
verticalAlignment: VerticalAlignment.Center | ||
} | ||
} | ||
Container { | ||
layout: StackLayout { | ||
orientation: LayoutOrientation.LeftToRight | ||
} | ||
layoutProperties: StackLayoutProperties { | ||
} | ||
horizontalAlignment: HorizontalAlignment.Center | ||
Button { | ||
text: "Reset" | ||
onClicked: { | ||
ttt.resetTiles(); | ||
} | ||
} | ||
} | ||
Label { | ||
id: about1 | ||
text: "Martin Woolley (@mdwrim) and John Murray (@jcmrim) V1.02" | ||
textStyle { | ||
base: SystemDefaults.TextStyles.SmallText | ||
fontWeight: FontWeight.Bold | ||
color: Color.create("#E6E9F8") | ||
} | ||
layoutProperties: StackLayoutProperties { | ||
} | ||
horizontalAlignment: HorizontalAlignment.Center | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
19 |
Oops, something went wrong.