Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Gold SDK Update

New project (project named RPSLite instead of RockPaperScissors) for
Gold SDK update, bug fixes, and cleaned up code.
  • Loading branch information...
commit 586aa3b8ef9b6cd1afd87afff4ce30d093d1b31e 1 parent 110f0df
@bcs925 bcs925 authored
Showing with 554 additions and 537 deletions.
  1. +77 −109 RockPaperScissors/.cproject
  2. +13 −1 RockPaperScissors/.project
  3. +32 −24 RockPaperScissors/.settings/org.eclipse.cdt.core.prefs
  4. +4 −33 RockPaperScissors/Makefile
  5. +22 −0 RockPaperScissors/RPSLite.pro
  6. +0 −66 RockPaperScissors/RockPaperScissors.pro
  7. +0 −1  RockPaperScissors/arm/README.txt
  8. +172 −158 RockPaperScissors/assets/gameScreen.qml
  9. BIN  RockPaperScissors/assets/images/RPSicon.png
  10. +94 −6 RockPaperScissors/assets/main.qml
  11. +1 −1  RockPaperScissors/assets/stagingpage.qml
  12. +1 −1  RockPaperScissors/assets/tempmain.qml
  13. +20 −31 RockPaperScissors/bar-descriptor.xml
  14. +26 −0 RockPaperScissors/config.pri
  15. +0 −4 RockPaperScissors/device-assets.xml
  16. +2 −0  RockPaperScissors/precompiled.h
  17. +6 −11 RockPaperScissors/readme.md
  18. +18 −14 RockPaperScissors/src/{app.cpp → RPSLite.cpp}
  19. +45 −0 RockPaperScissors/src/RPSLite.hpp
  20. +0 −39 RockPaperScissors/src/app.hpp
  21. +19 −14 RockPaperScissors/src/main.cpp
  22. +1 −1  RockPaperScissors/translations/Makefile
  23. +1 −0  RockPaperScissors/translations/RPSLite.pro
  24. 0  RockPaperScissors/translations/{RockPaperScissors.ts → RPSLite.ts}
  25. +0 −1  RockPaperScissors/translations/RockPaperScissors.pro
  26. +0 −1  RockPaperScissors/translations/RockPaperScissors.qm
  27. BIN  RockPaperScissors/translations/RockPaperScissors_de.qm
  28. +0 −4 RockPaperScissors/translations/RockPaperScissors_de.ts
  29. BIN  RockPaperScissors/translations/RockPaperScissors_en_GB.qm
  30. +0 −4 RockPaperScissors/translations/RockPaperScissors_en_GB.ts
  31. BIN  RockPaperScissors/translations/RockPaperScissors_es.qm
  32. +0 −4 RockPaperScissors/translations/RockPaperScissors_es.ts
  33. BIN  RockPaperScissors/translations/RockPaperScissors_fr.qm
  34. +0 −4 RockPaperScissors/translations/RockPaperScissors_fr.ts
  35. BIN  RockPaperScissors/translations/RockPaperScissors_it.qm
  36. +0 −4 RockPaperScissors/translations/RockPaperScissors_it.ts
  37. +0 −1  RockPaperScissors/x86/README.txt
View
186 RockPaperScissors/.cproject
@@ -3,8 +3,8 @@
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="com.qnx.qcc.toolChain.21402956">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.21402956" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <cconfiguration id="com.qnx.qcc.toolChain.1046877586">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1046877586" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -14,32 +14,24 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.21402956" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.21402956.1606718809" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.1902441211" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.714792992" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.735521674" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.739558029" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.1035087305" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1236832251" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.21402956.2005021935" incrementalBuildTarget="Device-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1673489625" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.1638795334" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.535959158" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.1360642900" superClass="com.qnx.qcc.inputType.compiler"/>
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1046877586" name="Device-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1046877586.1401367131" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1628865870" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1777655298" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.935430237" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.259698465" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.47794449" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1372581117" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1046877586.621649007" incrementalBuildTarget="Device-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.1200421800" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.377579193" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.1704949411" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
- <tool id="com.qnx.qcc.tool.assembler.1694560427" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.114700519" superClass="com.qnx.qcc.inputType.assembler"/>
+ <tool id="com.qnx.qcc.tool.assembler.1067622728" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.2079513014" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
- <tool id="com.qnx.qcc.tool.linker.449081303" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
- <tool id="com.qnx.qcc.tool.archiver.918980226" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ <tool id="com.qnx.qcc.tool.linker.590875551" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.422724605" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<sourceEntries>
@@ -49,8 +41,8 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
- <cconfiguration id="com.qnx.qcc.toolChain.26921787">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.26921787" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
+ <cconfiguration id="com.qnx.qcc.toolChain.1089434158">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1089434158" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -60,32 +52,24 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.26921787" name="Device-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.26921787.256146149" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.444164294" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.1128603155" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.1297649643" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.2046752886" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.548622738" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.474596665" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.26921787.1812213758" incrementalBuildTarget="Device-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1588075067" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.1719407235" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.1798004541" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.364864623" superClass="com.qnx.qcc.inputType.compiler"/>
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1089434158" name="Device-Release" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1089434158.358188850" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.2147234488" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.313436573" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1259073235" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.407807924" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1461482850" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.916304626" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Release" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1089434158.947384852" incrementalBuildTarget="Device-Release" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.1954112655" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1523576588" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.965077508" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
- <tool id="com.qnx.qcc.tool.assembler.965301129" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.1219507016" superClass="com.qnx.qcc.inputType.assembler"/>
+ <tool id="com.qnx.qcc.tool.assembler.1991816636" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.2049313567" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
- <tool id="com.qnx.qcc.tool.linker.424738874" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
- <tool id="com.qnx.qcc.tool.archiver.1597178340" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ <tool id="com.qnx.qcc.tool.linker.1923066022" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.923349319" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<sourceEntries>
@@ -95,8 +79,8 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
- <cconfiguration id="com.qnx.qcc.toolChain.599479158">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.599479158" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
+ <cconfiguration id="com.qnx.qcc.toolChain.711086013">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.711086013" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -106,32 +90,24 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.599479158" name="Device-Release" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.599479158.1669702465" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.1170853676" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.1999656867" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.838656400" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.278671593" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.1667297446" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.500888366" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Device-Release" enableAutoBuild="true" id="com.qnx.qcc.toolChain.599479158.212718684" incrementalBuildTarget="Device-Release" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.535726491" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.1116477806" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.622762379" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.136959434" superClass="com.qnx.qcc.inputType.compiler"/>
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.711086013" name="Device-Profile" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.711086013.1389874002" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1534586512" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.480819154" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1148954030" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.1385638631" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.917305931" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.243103261" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Profile" enableAutoBuild="true" id="com.qnx.qcc.toolChain.711086013.1136511232" incrementalBuildTarget="Device-Profile" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.1876398087" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.931512948" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.1603393023" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
- <tool id="com.qnx.qcc.tool.assembler.1442094661" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.1132258975" superClass="com.qnx.qcc.inputType.assembler"/>
+ <tool id="com.qnx.qcc.tool.assembler.589900939" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.387394074" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
- <tool id="com.qnx.qcc.tool.linker.1578560822" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
- <tool id="com.qnx.qcc.tool.archiver.163668423" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ <tool id="com.qnx.qcc.tool.linker.1609707143" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.842266024" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<sourceEntries>
@@ -141,8 +117,8 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
- <cconfiguration id="com.qnx.qcc.toolChain.1429475263">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1429475263" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
+ <cconfiguration id="com.qnx.qcc.toolChain.1011248528">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1011248528" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
<externalSettings/>
<extensions>
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
@@ -152,32 +128,24 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1429475263" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.1429475263.1246536484" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.1600498833" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.1969318976" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.2100070800" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
- <option id="com.qnx.qcc.option.compiler.201178404" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.1255167679" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1952615941" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1429475263.291275528" incrementalBuildTarget="Simulator-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1254548784" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.2042154759" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.138035912" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.1988175707" superClass="com.qnx.qcc.inputType.compiler"/>
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1011248528" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1011248528.918029073" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1346588479" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1355526165" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1887115161" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
+ <option id="com.qnx.qcc.option.compiler.1778085831" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.390685041" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2109129320" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1011248528.73401644" incrementalBuildTarget="Simulator-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.340585510" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1820595778" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.1183535201" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
- <tool id="com.qnx.qcc.tool.assembler.2108755773" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.1930219428" superClass="com.qnx.qcc.inputType.assembler"/>
+ <tool id="com.qnx.qcc.tool.assembler.387242717" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.117786632" superClass="com.qnx.qcc.inputType.assembler"/>
</tool>
- <tool id="com.qnx.qcc.tool.linker.411424488" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
- <tool id="com.qnx.qcc.tool.archiver.1824272514" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ <tool id="com.qnx.qcc.tool.linker.1104746176" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.1917158917" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
</toolChain>
</folderInfo>
<sourceEntries>
@@ -189,20 +157,20 @@
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="RockPaperScissors.null.1111475963" name="RockPaperScissors"/>
+ <project id="RPSLite.null.2075541822" name="RPSLite"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.21402956">
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1011248528">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.599479158">
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.711086013">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1429475263">
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1089434158">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.26921787">
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1046877586">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
</scannerConfigBuildInfo>
</storageModule>
View
14 RockPaperScissors/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>RockPaperScissors</name>
+ <name>RPSLite</name>
<comment></comment>
<projects>
</projects>
@@ -63,22 +63,34 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>com.rim.tad.tools.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
+ <name>com.rim.tad.tools.qml.core.qmlFileBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
+ <nature>com.rim.tad.tools.wst.jsdt.core.jsNature</nature>
<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>
View
56 RockPaperScissors/.settings/org.eclipse.cdt.core.prefs
@@ -1,25 +1,33 @@
eclipse.preferences.version=1
-environment/project/com.qnx.qcc.toolChain.1429475263/CPULIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.1429475263/CPULIST/operation=append
-environment/project/com.qnx.qcc.toolChain.1429475263/CPULIST/value=x86
-environment/project/com.qnx.qcc.toolChain.1429475263/VARIANTLIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.1429475263/VARIANTLIST/operation=append
-environment/project/com.qnx.qcc.toolChain.1429475263/VARIANTLIST/value=g
-environment/project/com.qnx.qcc.toolChain.1429475263/append=true
-environment/project/com.qnx.qcc.toolChain.1429475263/appendContributed=true
-environment/project/com.qnx.qcc.toolChain.26921787/CPULIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.26921787/CPULIST/operation=append
-environment/project/com.qnx.qcc.toolChain.26921787/CPULIST/value=arm
-environment/project/com.qnx.qcc.toolChain.26921787/VARIANTLIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.26921787/VARIANTLIST/operation=append
-environment/project/com.qnx.qcc.toolChain.26921787/VARIANTLIST/value=g
-environment/project/com.qnx.qcc.toolChain.26921787/append=true
-environment/project/com.qnx.qcc.toolChain.26921787/appendContributed=true
-environment/project/com.qnx.qcc.toolChain.599479158/CPULIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.599479158/CPULIST/operation=append
-environment/project/com.qnx.qcc.toolChain.599479158/CPULIST/value=arm
-environment/project/com.qnx.qcc.toolChain.599479158/EXCLUDE_VARIANTLIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.599479158/EXCLUDE_VARIANTLIST/operation=append
-environment/project/com.qnx.qcc.toolChain.599479158/EXCLUDE_VARIANTLIST/value=r
-environment/project/com.qnx.qcc.toolChain.599479158/append=true
-environment/project/com.qnx.qcc.toolChain.599479158/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.1011248528/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1011248528/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1011248528/CPULIST/value=x86
+environment/project/com.qnx.qcc.toolChain.1011248528/VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1011248528/VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1011248528/VARIANTLIST/value=g
+environment/project/com.qnx.qcc.toolChain.1011248528/append=true
+environment/project/com.qnx.qcc.toolChain.1011248528/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.1046877586/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1046877586/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1046877586/CPULIST/value=arm
+environment/project/com.qnx.qcc.toolChain.1046877586/VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1046877586/VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1046877586/VARIANTLIST/value=g
+environment/project/com.qnx.qcc.toolChain.1046877586/append=true
+environment/project/com.qnx.qcc.toolChain.1046877586/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.1089434158/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1089434158/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1089434158/CPULIST/value=arm
+environment/project/com.qnx.qcc.toolChain.1089434158/EXCLUDE_VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1089434158/EXCLUDE_VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1089434158/EXCLUDE_VARIANTLIST/value=r
+environment/project/com.qnx.qcc.toolChain.1089434158/append=true
+environment/project/com.qnx.qcc.toolChain.1089434158/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.711086013/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.711086013/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.711086013/CPULIST/value=arm
+environment/project/com.qnx.qcc.toolChain.711086013/EXCLUDE_VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.711086013/EXCLUDE_VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.711086013/EXCLUDE_VARIANTLIST/value=p
+environment/project/com.qnx.qcc.toolChain.711086013/append=true
+environment/project/com.qnx.qcc.toolChain.711086013/appendContributed=true
View
37 RockPaperScissors/Makefile
@@ -1,35 +1,6 @@
-QMAKE_TARGET = RockPaperScissors
-QMAKE = $(QNX_HOST)/usr/bin/qmake
-TARGET = $(QMAKE_TARGET)
+QMAKE_TARGET = RPSLite
+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-g++ -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device
- $(QMAKE) -spec unsupported/blackberry-x86-g++ -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
View
22 RockPaperScissors/RPSLite.pro
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2012, 2013 Brian Scheirer
+#
+# 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.
+#
+
+APP_NAME = RPSLite
+
+CONFIG += qt warn_on cascades10
+LIBS += -lbbcascadesadvertisement
+
+include(config.pri)
View
66 RockPaperScissors/RockPaperScissors.pro
@@ -1,66 +0,0 @@
-#
-# Copyright (c) 2012 Brian Scheirer
-#
-# 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.
-#
-
-TEMPLATE = app
-TARGET = RockPaperScissors
-
-CONFIG += qt warn_on debug_and_release cascades
-
-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
-
View
1  RockPaperScissors/arm/README.txt
@@ -1 +0,0 @@
-Empty directory.
View
330 RockPaperScissors/assets/gameScreen.qml
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 Brian Scheirer
+ * Copyright (c) 2012, 2013 Brian Scheirer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,9 +12,21 @@
* 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
+ */
+
+ import bb.cascades 1.0
+ import bb.cascades.advertisement 1.0
Page {
+ //create aliases to expose item id to the main.qml file
+ property alias win: win
+ property alias lose: lose
+ property alias tie: tie
+ property alias winnerlabel: winnerlabel
+ property alias backgroundPaint: backgroundPaint
+ property alias player: player
+ property alias computer: computer
+ property alias playerGroup: playerGroup
//main content container
content: Container {
background: backgroundPaint.imagePaint
@@ -23,90 +35,85 @@ Page {
id: backgroundPaint
imageSource: "asset:///images/RPSbkgrdD.png"
},
- Dialog {
- id: helpdialog
- Container {
- preferredWidth: 768
- preferredHeight: 1280
- background: Color.create(0.0, 0.0, 0.0, 0.5)
+
+ Sheet {
+ id: charSelectSheet
+ Page {
Container {
- maxHeight: 875.0
- maxWidth: 700.0
background: Color.create("#DEB887")
- horizontalAlignment: HorizontalAlignment.Center
- TextArea {
- text: "The evil dragon has taken the princess hostage. The only way to save her is to defeat him in an epic battle of ROCK, PAPER, SCISSORS!
-
- The Rules are simple:
- Rock defeats Scissors.
- Paper defeats Rock.
- Scissors defeats Paper."
- editable: false
- textStyle.fontWeight: FontWeight.Bold
- }
Container {
horizontalAlignment: HorizontalAlignment.Center
- Button {
- text: "Ok, Let's Battle!"
- onClicked: {
- helpdialog.close();
- }
- }
- Button {
- id: menubutton
- text: "Main Menu"
- onClicked: {
- helpdialog.close();
- navigationPane.pop();
- }
+ Label {
+ text: "Preview"
+ textStyle.fontSize: FontSize.XLarge
}
}
- }
- }
- },
- Sheet {
- id: charSelectSheet
- Page {
- Container {
- RadioGroup {
- id: playerGroup
- dividersVisible: false
- Option {
- text: "Knight"
- selected: true
- }
- Option {
- text: "Ninja"
+ Container {
+ background: Color.create(1, 1, 1)
+ minHeight: 550.0
+ minWidth: 700.0
+ horizontalAlignment: HorizontalAlignment.Center
+ ImageView {
+ id: previewChar
+ imageSource: "asset:///images/Knight.png"
+ horizontalAlignment: HorizontalAlignment.Center
}
- Option {
- text: "King"
+ }
+ Container {
+ horizontalAlignment: HorizontalAlignment.Center
+ Label {
+ text: "Character Selector"
+ verticalAlignment: VerticalAlignment.Center
+ textStyle.fontSize: FontSize.XLarge
}
- onSelectedIndexChanged: {
- if (playerGroup.selectedIndex == 0) {
- playerbody.imageSource = "asset:///images/Knight.png";
- previewChar.imageSource = "asset:///images/Knight.png";
- player.imageSource = "asset:///images/KRock.png";
- } else if (playerGroup.selectedIndex == 1) {
- playerbody.imageSource = "asset:///images/Ninja.png";
- previewChar.imageSource = "asset:///images/Ninja.png";
- player.imageSource = "asset:///images/NRock.png";
- } else if (playerGroup.selectedIndex == 2) {
- playerbody.imageSource = "asset:///images/King.png";
- previewChar.imageSource = "asset:///images/King.png";
- player.imageSource = "asset:///images/KiRock.png";
+ }
+ Container {
+ background: Color.create(1, 1, 1)
+ maxHeight: 400.0
+ maxWidth: 700.0
+ horizontalAlignment: HorizontalAlignment.Center
+ ScrollView {
+ RadioGroup {
+ id: playerGroup
+ dividersVisible: false
+ Option {
+ text: "Knight"
+ selected: true
+ }
+ Option {
+ text: "Ninja"
+ }
+ Option {
+ text: "King"
+ }
+ onSelectedIndexChanged: {
+ if (playerGroup.selectedIndex == 0) {
+ playerbody.imageSource = "asset:///images/Knight.png";
+ previewChar.imageSource = "asset:///images/Knight.png";
+ player.imageSource = "asset:///images/KRock.png";
+ } else if (playerGroup.selectedIndex == 1) {
+ playerbody.imageSource = "asset:///images/Ninja.png";
+ previewChar.imageSource = "asset:///images/Ninja.png";
+ player.imageSource = "asset:///images/NRock.png";
+ } else if (playerGroup.selectedIndex == 2) {
+ playerbody.imageSource = "asset:///images/King.png";
+ previewChar.imageSource = "asset:///images/King.png";
+ player.imageSource = "asset:///images/KiRock.png";
+ }
+ backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
+ winnerlabel.text = "";
+ computer.imageSource = "asset:///images/DRock.png";
+ }
}
- backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
- winnerlabel.text = "";
- computer.imageSource = "asset:///images/DRock.png";
}
}
- Button {
- text: "Back to the Battle"
- onClicked: charSelectSheet.close()
- }
- ImageView {
- id: previewChar
- imageSource: "asset:///images/Knight.png"
+ Container {
+ horizontalAlignment: HorizontalAlignment.Center
+ topPadding: 20.0
+ Button {
+ text: "Back to the Battle"
+ onClicked: charSelectSheet.close()
+ }
}
}
}
@@ -118,6 +125,29 @@ Page {
layout: StackLayout {
}
minHeight: 1280.0
+ Container {
+ background: Color.create("#DEB887")
+ preferredWidth: 768.0
+ horizontalAlignment: HorizontalAlignment.Center
+ minHeight: 110.0
+ topPadding: 20.0
+ Banner {
+ // replace zoneId with your own from your Ad Services account
+ zoneId: 117145
+ refreshRate: 60
+ preferredWidth: 320
+ preferredHeight: 50
+ transitionsEnabled: true
+ // placeHolderURL: "asset:///placeholder_728x90.png"
+ backgroundColor: Color.White
+ borderColor: Color.White
+ borderWidth: 2
+ horizontalAlignment: HorizontalAlignment.Center
+ scaleX: 2.0
+ scaleY: 2.0
+
+ }
+ }
Container {
background: Color.create("#DEB887")
//subcontainer of scoreboard for top row
@@ -126,94 +156,60 @@ Page {
orientation: LayoutOrientation.LeftToRight
}
minWidth: 768.0
- Label {
- text: " Scoreboard"
- textStyle.fontSizeValue: 10.0
- }
- Button {
- id: resetbutton
- text: "Reset"
- onClicked: {
- win.text = "0";
- lose.text = "0";
- tie.text = "0";
- backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
- winnerlabel.text = "";
- if (playerGroup.selectedIndex == 0) {
- player.imageSource = "asset:///images/KRock.png";
- } else if (playerGroup.selectedIndex == 1) {
- player.imageSource = "asset:///images/NRock.png";
- } else if (playerGroup.selectedIndex == 2) {
- player.imageSource = "asset:///images/KiRock.png";
- }
- computer.imageSource = "asset:///images/DRock.png";
- }
- preferredWidth: 140.0
- leftMargin: 358.0
- }
- }
- //main subcontainer of scoreboard for botttom row **1**
- Container {
- layout: StackLayout {
- orientation: LayoutOrientation.LeftToRight
- }
-
- //container with win,lose,tie tallies
Container {
- layout: StackLayout {
- orientation: LayoutOrientation.LeftToRight
- }
- minWidth: 590.0
- Label {
- text: " Win: "
- textStyle.fontSizeValue: 10.0
- }
- Label {
- id: win
- text: "0"
- textStyle.fontSizeValue: 10.0
- }
- Label {
- text: " Loss: "
- textStyle.fontSizeValue: 10.0
- }
- Label {
- id: lose
- text: "0"
- textStyle.fontSizeValue: 10.0
- }
- Label {
- text: " Tie: "
- textStyle.fontSizeValue: 10.0
- }
Label {
- id: tie
- text: "0"
+ text: " Scoreboard"
textStyle.fontSizeValue: 10.0
}
- }
- Button {
- id: helpbutton
- text: "Help"
- preferredWidth: 140.0
- onClicked: {
- helpdialog.open();
+ Container {
+ layout: StackLayout {
+ orientation: LayoutOrientation.LeftToRight
+ }
+ minWidth: 590.0
+ Label {
+ text: " Win: "
+ textStyle.fontSizeValue: 10.0
+ }
+ Label {
+ id: win
+ text: "0"
+ textStyle.fontSizeValue: 10.0
+ }
+ Label {
+ text: " Loss: "
+ textStyle.fontSizeValue: 10.0
+ }
+ Label {
+ id: lose
+ text: "0"
+ textStyle.fontSizeValue: 10.0
+ }
+ Label {
+ text: " Tie: "
+ textStyle.fontSizeValue: 10.0
+ }
+ Label {
+ id: tie
+ text: "0"
+ textStyle.fontSizeValue: 10.0
+ }
}
}
+
}
}
//winner label container
Container {
layoutProperties: StackLayoutProperties {
}
- topMargin: 50.0
- preferredHeight: 300.0
+ topMargin: 75.0
+ preferredHeight: 225.0
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
Label {
id: winnerlabel
text: ""
- textStyle.fontSizeValue: 15.0
+ textStyle.fontSize: FontSize.XXLarge
}
}
//character image container **2**
@@ -281,7 +277,7 @@ Page {
var losing = lose.text;
var ties = tie.text;
var number = Math.floor((Math.random() * 3) + 1);
- var gameoutcome = app.clickedRock(1, number);
+ var gameoutcome = rpscp.clickedRock(1, number);
if (number == 1) {
computer.imageSource = "asset:///images/DRock.png";
} else if (number == 2) {
@@ -300,12 +296,15 @@ Page {
backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
}
if (gameoutcome == 1) {
- win.text = app.codeWinning(winning);
+ win.text = rpscp.codeWinning(winning);
} else if (gameoutcome == 2) {
- lose.text = app.codeWinning(losing);
+ lose.text = rpscp.codeWinning(losing);
} else {
- tie.text = app.codeWinning(ties);
+ tie.text = rpscp.codeWinning(ties);
}
+ rockbutton.enabled = true;
+ paperbutton.enabled = true;
+ scissorsbutton.enabled = true;
}
},
SequentialAnimation {
@@ -352,7 +351,7 @@ Page {
var losing = lose.text;
var ties = tie.text;
var number = Math.floor((Math.random() * 3) + 1);
- var gameoutcome = app.clickedPaper(2, number);
+ var gameoutcome = rpscp.clickedPaper(2, number);
if (number == 1) {
computer.imageSource = "asset:///images/DRock.png";
} else if (number == 2) {
@@ -371,12 +370,15 @@ Page {
backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
}
if (gameoutcome == 1) {
- win.text = app.codeWinning(winning);
+ win.text = rpscp.codeWinning(winning);
} else if (gameoutcome == 2) {
- lose.text = app.codeWinning(losing);
+ lose.text = rpscp.codeWinning(losing);
} else {
- tie.text = app.codeWinning(ties);
+ tie.text = rpscp.codeWinning(ties);
}
+ rockbutton.enabled = true;
+ paperbutton.enabled = true;
+ scissorsbutton.enabled = true;
}
},
SequentialAnimation {
@@ -425,7 +427,7 @@ Page {
var losing = lose.text;
var ties = tie.text;
var number = Math.floor((Math.random() * 3) + 1);
- var gameoutcome = app.clickedScissors(3, number);
+ var gameoutcome = rpscp.clickedScissors(3, number);
if (number == 1) {
computer.imageSource = "asset:///images/DRock.png";
} else if (number == 2) {
@@ -444,12 +446,15 @@ Page {
backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
}
if (gameoutcome == 1) {
- win.text = app.codeWinning(winning);
+ win.text = rpscp.codeWinning(winning);
} else if (gameoutcome == 2) {
- lose.text = app.codeWinning(losing);
+ lose.text = rpscp.codeWinning(losing);
} else {
- tie.text = app.codeWinning(ties);
+ tie.text = rpscp.codeWinning(ties);
}
+ rockbutton.enabled = true;
+ paperbutton.enabled = true;
+ scissorsbutton.enabled = true;
}
}
]
@@ -534,6 +539,9 @@ Page {
objectName: "rockbutton"
text: "ROCK!"
onClicked: {
+ rockbutton.enabled = false;
+ paperbutton.enabled = false;
+ scissorsbutton.enabled = false;
backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
winnerlabel.text = "";
if (playerGroup.selectedIndex == 0) {
@@ -553,6 +561,9 @@ Page {
objectName: "paperbutton"
text: "PAPER!"
onClicked: {
+ rockbutton.enabled = false;
+ paperbutton.enabled = false;
+ scissorsbutton.enabled = false;
backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
winnerlabel.text = "";
if (playerGroup.selectedIndex == 0) {
@@ -572,6 +583,9 @@ Page {
objectName: "scissorsbutton"
text: "SCISSORS!"
onClicked: {
+ rockbutton.enabled = false;
+ paperbutton.enabled = false;
+ scissorsbutton.enabled = false;
backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
winnerlabel.text = "";
if (playerGroup.selectedIndex == 0) {
View
BIN  RockPaperScissors/assets/images/RPSicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
100 RockPaperScissors/assets/main.qml
@@ -1,8 +1,55 @@
+/*
+ * Copyright (c) 2012, 2013 Brian Scheirer
+ *
+ * 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
NavigationPane {
id: navigationPane
backButtonsVisible: false
+ Menu.definition: MenuDefinition {
+
+ // Specify the actions that should be included in the menu
+ actions: [
+ ActionItem {
+ title: "Help"
+ //imageSource: "images/actionOneIcon.png"
+ onTriggered: {
+ helpdialog.open();
+ }
+ },
+ ActionItem {
+ title: "Reset"
+ onTriggered: {
+ pageDefinition.win.text = "0";
+ pageDefinition.lose.text = "0";
+ pageDefinition.tie.text = "0";
+ pageDefinition.backgroundPaint.imageSource = "asset:///images/RPSbkgrdD.png";
+ pageDefinition.winnerlabel.text = "";
+ if (pageDefinition.playerGroup.selectedIndex == 0) {
+ pageDefinition.player.imageSource = "asset:///images/KRock.png";
+ } else if (pageDefinition.playerGroup.selectedIndex == 1) {
+ pageDefinition.player.imageSource = "asset:///images/NRock.png";
+ } else if (pageDefinition.playerGroup.selectedIndex == 2) {
+ pageDefinition.player.imageSource = "asset:///images/KiRock.png";
+ }
+ pageDefinition.computer.imageSource = "asset:///images/DRock.png";
+ }
+ }
+ ] // end of actions list
+ }
Page {
content: Container {
background: backgroundPaint.imagePaint
@@ -38,6 +85,7 @@ 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."
editable: false
+ inputMode: TextAreaInputMode.Text
textStyle {
fontWeight: FontWeight.Bold
color: Color.Black
@@ -68,13 +116,11 @@ Unless required by applicable law or agreed to in writing, software distributed
id: one
text: "Play"
onClicked: {
- var page = pageDefinition.createObject();
- navigationPane.push(page);
- }
- attachedObjects: ComponentDefinition {
- id: pageDefinition
- source: "gameScreen.qml"
+ // var page = pageDefinition.createObject();
+ navigationPane.push(pageDefinition);
}
+
+
horizontalAlignment: HorizontalAlignment.Center
}
Button {
@@ -88,4 +134,46 @@ Unless required by applicable law or agreed to in writing, software distributed
}
}
}
+ attachedObjects: [
+ Gamescreen {
+ id: pageDefinition
+ // source: "Gamescreen.qml"
+ },
+ Dialog {
+ id: helpdialog
+ Container {
+ preferredWidth: 768
+ preferredHeight: 1280
+ background: Color.create(0.0, 0.0, 0.0, 0.5)
+ Container {
+ maxHeight: 875.0
+ maxWidth: 700.0
+ background: Color.create("#DEB887")
+ horizontalAlignment: HorizontalAlignment.Center
+ TextArea {
+ text: "The evil dragon has taken the princess hostage. The only way to save her is to defeat him in an epic battle of ROCK, PAPER, SCISSORS!
+
+The Rules are simple:
+Rock defeats Scissors.
+Paper defeats Rock.
+Scissors defeats Paper.
+
+To change characters during the battle, double tap your character to bring up the character list."
+ editable: false
+ textStyle.fontWeight: FontWeight.Bold
+ }
+ Container {
+ horizontalAlignment: HorizontalAlignment.Center
+ Button {
+ text: "Ok, Let's Battle!"
+ onClicked: {
+ helpdialog.close();
+ }
+ }
+
+ }
+ }
+ }
+ }
+ ]
}
View
2  RockPaperScissors/assets/stagingpage.qml
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2012 Brian Scheirer
+* Copyright (c) 2012, 2013 Brian Scheirer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
2  RockPaperScissors/assets/tempmain.qml
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2012 Brian Scheirer
+* Copyright (c) 2012, 2013 Brian Scheirer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
51 RockPaperScissors/bar-descriptor.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
- Copyright (c) 2011, 2012 Research In Motion Limited.
+ Copyright (c) 2012, 2013 Brian Scheirer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -30,12 +30,11 @@
<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
- <name>RockPaperScissors</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required. -->
- <versionNumber>0.9.1</versionNumber>
+ <versionNumber>1.2.2</versionNumber>
<!-- Fourth digit segment of the package version. First three segments are taken from the
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
@@ -46,14 +45,13 @@
<!-- Description, displayed in the BlackBerry Tablet OS application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
- <description>The RockPaperScissors application</description>
+ <description>The Epic Battle of RPS application</description>
<!-- Copyright information. Optional. -->
<!-- <copyright></copyright> -->
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
- <author>BS</author>
- <authorId>gYAAgEKJMyHFDoIPnkWzP44HwBE</authorId>
+ <author>Brian Scheirer</author>
<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->
@@ -65,32 +63,32 @@
<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
- <configuration id="com.qnx.qcc.toolChain.21402956" name="Default">
+ <name>Epic Battle of RPS</name>
+ <icon>
+ <image>RPSicon.png</image>
+ </icon>
+ <configuration name="Device-Debug">
<platformArchitecture>armle-v7</platformArchitecture>
- <asset path="arm/o.le-v7-g/RockPaperScissors" entry="true" type="Qnx/Elf">RockPaperScissors</asset>
+ <asset path="arm/o.le-v7-g/RPSLite" entry="true" type="Qnx/Elf">RPSLite</asset>
</configuration>
- <configuration id="com.qnx.qcc.toolChain.26921787" name="Device-Debug">
+ <configuration name="Device-Release">
+ <entryPointType>Qnx/Cascades</entryPointType>
<platformArchitecture>armle-v7</platformArchitecture>
- <asset path="arm/o.le-v7-g/RockPaperScissors" entry="true" type="Qnx/Elf">RockPaperScissors</asset>
+ <asset path="arm/o.le-v7/RPSLite.so" entry="true" type="Qnx/Elf">RPSLite.so</asset>
</configuration>
- <configuration id="com.qnx.qcc.toolChain.599479158" name="Device-Release">
+ <configuration name="Device-Profile">
<platformArchitecture>armle-v7</platformArchitecture>
- <asset path="arm/o.le-v7/RockPaperScissors" entry="true" type="Qnx/Elf">RockPaperScissors</asset>
+ <asset path="arm-p/o.le-v7-g/RPSLite" entry="true" type="Qnx/Elf">RPSLite</asset>
</configuration>
- <configuration id="com.qnx.qcc.toolChain.1429475263" name="Simulator-Debug">
+ <configuration name="Simulator-Debug">
<platformArchitecture>x86</platformArchitecture>
- <asset path="x86/o-g/RockPaperScissors" entry="true" type="Qnx/Elf">RockPaperScissors</asset>
+ <asset path="x86/o-g/RPSLite" entry="true" type="Qnx/Elf">RPSLite</asset>
</configuration>
<!-- The icon for the application, which should be 86x86. -->
- <icon>
- <image>RPSicon.png</image>
- </icon>
<asset path="icon.png">icon.png</asset>
<asset path="assets">assets</asset>
- <!-- The splash screen that will appear when your application is launching. Should be 1024x600. -->
- <!-- <splashscreen></splashscreen> -->
<!-- Locale support -->
<asset path="translations" dest="qm">
@@ -99,18 +97,9 @@
<asset path="assets/images/RPSicon.png">RPSicon.png</asset>
<!-- Request permission to execute native code. Required for native applications. -->
- <action system="true">run_native</action>
+ <permission system="true">run_native</permission>
+ <permission>read_geolocation</permission>
+ <permission>read_device_identifying_information</permission>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
- <!-- The permissions requested by your application. -->
- <!-- <action>access_shared</action> -->
- <!-- <action>record_audio</action> -->
- <!-- <action>read_geolocation</action> -->
- <!-- <action>use_camera</action> -->
- <!-- <action>access_internet</action> -->
- <!-- <action>play_audio</action> -->
- <!-- <action>post_notification</action> -->
- <!-- <action>set_audio_volume</action> -->
- <!-- <action>read_device_identifying_information</action> -->
-
</qnx>
View
26 RockPaperScissors/config.pri
@@ -0,0 +1,26 @@
+# Auto-generated by IDE. All changes by user will be lost!
+# Created at 12/19/12 10:59 PM
+
+BASEDIR = $$_PRO_FILE_PWD_
+
+INCLUDEPATH += \
+ $$BASEDIR/src
+
+SOURCES += \
+ $$BASEDIR/src/RPSLite.cpp \
+ $$BASEDIR/src/main.cpp
+
+HEADERS += \
+ $$BASEDIR/src/RPSLite.hpp
+
+CONFIG += precompile_header
+PRECOMPILED_HEADER = $$BASEDIR/precompiled.h
+
+lupdate_inclusion {
+ SOURCES += \
+ $$BASEDIR/../assets/*.qml
+}
+
+TRANSLATIONS = \
+ $${TARGET}.ts
+
View
4 RockPaperScissors/device-assets.xml
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<assets>
- <target-device width="768" height="1280" ppi="356" class="phone"/>
-</assets>
View
2  RockPaperScissors/precompiled.h
@@ -0,0 +1,2 @@
+// This file is used to store precompiled headers.
+// It is intentionally left blank. It is up to you to decide which headers should be included here.
View
17 RockPaperScissors/readme.md
@@ -3,25 +3,20 @@
Rock, Paper, Scissors is an an opensource app to show off various features of Cascades in a fun way using QML
as well as calling C++ functions for some logic. QML objects/features used:
-StackLayout, DockLayout, AbsoluteLayout, Background, CustomDialog, Animations, Button, Label, TextField, ImageView, Sheets, RadioGroup, Signals/Slots, In-line JavaScript
+NavigationPane (with peak), StackLayout, DockLayout, AbsoluteLayout, Background (image and color), CustomDialog, Animations, Button, Label, TextField, ImageView, Sheet, Dialog, RadioGroup, Gesture Handler, System Menu, Signals/Slots, In-line JavaScript, and Advertisment Service
-
-Only main.qml and gamescreen.qml shown in actual app. stagingpage.qml and tempmain.qml left in source code to show proression of UI. tempmain.qml
-very basic UI, stagingpage.qml creates general layout and main.qml has final layout as well as all necessary code for final app.
+Only main.qml and Gamescreen.qml shown in actual app. stagingpage.qml and tempmain.qml left in source code to show proression of UI. tempmain.qml very basic UI, stagingpage.qml creates general layout and Gamescreen.qml has final layout as well as all necessary code for final app.
Explanations of the code can be found at: <br />
-http://bbcascadescode.tumblr.com/post/30503808682/rock-paper-scissors-pt-1 <br />
-http://bbcascadescode.tumblr.com/post/31427173614/rock-paper-scissors-pt-2 <br />
-http://bbcascadescode.tumblr.com/post/31539351569/rock-paper-scissors-pt-3 <br />
-or <br />
-http://opensourcebb.com/osbbx/index.php/tutorials/23-native-tutorials/cascades-tutorials/35-rock-paper-scissors-full-tutorial
+http://bbcascadescode.tumblr.com/<br />
+
The sample code for this application is Open Source under the Apache 2.0 License.
Applies To
BlackBerry 10
- BlackBerry Cascades Native SDK (Beta2) for BlackBerry 10
+ BlackBerry Cascades Native SDK for BlackBerry 10
Author(s)
@@ -40,7 +35,7 @@ To build the Rock Paper Scissors sample application:
************************************************************************
-Copyright (c) 2012 Brian Scheirer
+Copyright (c) 2012, 2013 Brian Scheirer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
32 RockPaperScissors/src/app.cpp → RockPaperScissors/src/RPSLite.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2012 Brian Scheirer
+* Copyright (c) 2012, 2013 Brian Scheirer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,8 @@
* limitations under the License.
*/
-#include "app.hpp"
+// Default empty project template
+#include "RPSLite.hpp"
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
@@ -22,16 +23,21 @@
using namespace bb::cascades;
-App::App()
+RPSLite::RPSLite(bb::cascades::Application *app)
+: QObject(app)
{
- QmlDocument *qml = QmlDocument::create("main.qml");
- qml->setContextProperty("app", this);
-
- AbstractPane *root = qml->createRootNode<AbstractPane>();
- Application::setScene(root);
+ // create scene document from main.qml asset
+ // set parent to created document to ensure it exists for the whole application lifetime
+ QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
+ qml->setContextProperty("rpscp", this);
+
+ // create root object for the UI
+ AbstractPane *root = qml->createRootObject<AbstractPane>();
+ // set created root object as a scene
+ app->setScene(root);
}
-int App::clickedRock(int user1, int user2)
+int RPSLite::clickedRock(int user1, int user2)
{
int winner;
@@ -46,7 +52,7 @@ int App::clickedRock(int user1, int user2)
}
-int App::clickedPaper(int user1, int user2)
+int RPSLite::clickedPaper(int user1, int user2)
{
int winner;
@@ -61,7 +67,7 @@ int App::clickedPaper(int user1, int user2)
}
-int App::clickedScissors(int user1, int user2)
+int RPSLite::clickedScissors(int user1, int user2)
{
int winner;
@@ -76,11 +82,9 @@ int App::clickedScissors(int user1, int user2)
}
-int App::codeWinning(int record)
+int RPSLite::codeWinning(int record)
{
int add1;
add1 = record+1;
return add1;
}
-
-
View
45 RockPaperScissors/src/RPSLite.hpp
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2012, 2013 Brian Scheirer
+*
+* 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.
+*/
+
+// Default empty project template
+#ifndef RPSLite_HPP_
+#define RPSLite_HPP_
+
+#include <QObject>
+
+namespace bb { namespace cascades { class Application; }}
+
+/*!
+ * @brief Application pane object
+ *
+ *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
+ */
+class RPSLite : public QObject
+{
+ Q_OBJECT
+public:
+ RPSLite(bb::cascades::Application *app);
+
+ Q_INVOKABLE int clickedRock(int user1, int user2);
+ Q_INVOKABLE int clickedPaper(int user1, int user2);
+ Q_INVOKABLE int clickedScissors(int user1, int user2);
+ Q_INVOKABLE int codeWinning(int record);
+
+ virtual ~RPSLite() {}
+};
+
+
+#endif /* RPSLite_HPP_ */
View
39 RockPaperScissors/src/app.hpp
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2012 Brian Scheirer
-*
-* 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.
-*/
-
-
-#ifndef APP_H
-#define APP_H
-
-#include <QObject>
-
-
-class App : public QObject
-{
- Q_OBJECT
-
-public:
- App();
-
-Q_INVOKABLE int clickedRock(int user1, int user2);
-Q_INVOKABLE int clickedPaper(int user1, int user2);
-Q_INVOKABLE int clickedScissors(int user1, int user2);
-Q_INVOKABLE int codeWinning(int record);
-
-
-};
-
-#endif // ifndef APP_H
View
33 RockPaperScissors/src/main.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2012 Brian Scheirer
+* Copyright (c) 2012, 2013 Brian Scheirer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,31 +14,36 @@
* limitations under the License.
*/
-#include "app.hpp"
-
+// Default empty project template
#include <bb/cascades/Application>
+#include <bb/cascades/QmlDocument>
+#include <bb/cascades/AbstractPane>
+#include <bb/cascades/advertisement/Banner>
#include <QLocale>
#include <QTranslator>
+#include <Qt/qdeclarativedebug.h>
+#include "RPSLite.hpp"
-using ::bb::cascades::Application;
+using namespace bb::cascades;
-int main(int argc, char **argv)
+Q_DECL_EXPORT int main(int argc, char **argv)
{
- //-- this is where the server is started etc
+ // this is where the server is started etc
+ qmlRegisterType<bb::cascades::advertisement::Banner>("bb.cascades.advertisement", 1, 0, "Banner");
Application app(argc, argv);
-
- //-- localization support
+
+ // localization support
QTranslator translator;
QString locale_string = QLocale().name();
- QString filename = QString( "RockPaperScissors_%1" ).arg( locale_string );
+ QString filename = QString( "RPSLite_%1" ).arg( locale_string );
if (translator.load(filename, "app/native/qm")) {
app.installTranslator( &translator );
}
-
- App mainApp;
-
- //-- we complete the transaction started in the app constructor and start the client event loop here
+
+ new RPSLite(&app);
+
+ // we complete the transaction started in the app constructor and start the client event loop here
return Application::exec();
- //-- when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
+ // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
}
View
2  RockPaperScissors/translations/Makefile
@@ -1,4 +1,4 @@
-QMAKE_TARGET = RockPaperScissors
+QMAKE_TARGET = RPSLite
LUPDATE = $(QNX_HOST)/usr/bin/lupdate
LRELEASE = $(QNX_HOST)/usr/bin/lrelease
View
1  RockPaperScissors/translations/RPSLite.pro
@@ -0,0 +1 @@
+include (../RPSLite.pro)
View
0  ...cissors/translations/RockPaperScissors.ts → RockPaperScissors/translations/RPSLite.ts
File renamed without changes
View
1  RockPaperScissors/translations/RockPaperScissors.pro
@@ -1 +0,0 @@
-include (../RockPaperScissors.pro)
View
1  RockPaperScissors/translations/RockPaperScissors.qm
@@ -1 +0,0 @@
-<�d��!�`���
View
BIN  RockPaperScissors/translations/RockPaperScissors_de.qm
Binary file not shown
View
4 RockPaperScissors/translations/RockPaperScissors_de.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="de_DE">
-</TS>
View
BIN  RockPaperScissors/translations/RockPaperScissors_en_GB.qm
Binary file not shown
View
4 RockPaperScissors/translations/RockPaperScissors_en_GB.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="en_GB">
-</TS>
View
BIN  RockPaperScissors/translations/RockPaperScissors_es.qm
Binary file not shown
View
4 RockPaperScissors/translations/RockPaperScissors_es.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="es_ES">
-</TS>
View
BIN  RockPaperScissors/translations/RockPaperScissors_fr.qm
Binary file not shown
View
4 RockPaperScissors/translations/RockPaperScissors_fr.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="fr_FR">
-</TS>
View
BIN  RockPaperScissors/translations/RockPaperScissors_it.qm
Binary file not shown
View
4 RockPaperScissors/translations/RockPaperScissors_it.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="it_IT">
-</TS>
View
1  RockPaperScissors/x86/README.txt
@@ -1 +0,0 @@
-Empty directory.
Please sign in to comment.
Something went wrong with that request. Please try again.