Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

carousel stumper

  • Loading branch information...
commit 64dd274fb3de8aff8b45b647750555020555cf4f 1 parent 9d7ef41
@jlarsby jlarsby authored
Showing with 1,136 additions and 0 deletions.
  1. +210 −0 stumpers/bbjamcarousel/.cproject
  2. +91 −0 stumpers/bbjamcarousel/.project
  3. +35 −0 stumpers/bbjamcarousel/Makefile
  4. +5 −0 stumpers/bbjamcarousel/Notice
  5. +1 −0  stumpers/bbjamcarousel/arm/README.txt
  6. +142 −0 stumpers/bbjamcarousel/assets/Carousel.qml
  7. +70 −0 stumpers/bbjamcarousel/assets/CarouselItem.qml
  8. +85 −0 stumpers/bbjamcarousel/assets/SwipeHandler.qml
  9. BIN  stumpers/bbjamcarousel/assets/images/bg.png
  10. BIN  stumpers/bbjamcarousel/assets/images/bg1.jpg
  11. BIN  stumpers/bbjamcarousel/assets/images/bg1.png
  12. BIN  stumpers/bbjamcarousel/assets/images/bg2.jpg
  13. BIN  stumpers/bbjamcarousel/assets/images/bg2.png
  14. BIN  stumpers/bbjamcarousel/assets/images/bg3.jpg
  15. BIN  stumpers/bbjamcarousel/assets/images/bg3.png
  16. BIN  stumpers/bbjamcarousel/assets/images/bg4.jpg
  17. BIN  stumpers/bbjamcarousel/assets/images/bg4.png
  18. BIN  stumpers/bbjamcarousel/assets/images/bg5.jpg
  19. BIN  stumpers/bbjamcarousel/assets/images/bg5.png
  20. BIN  stumpers/bbjamcarousel/assets/images/hl.png
  21. BIN  stumpers/bbjamcarousel/assets/images/johan.png
  22. BIN  stumpers/bbjamcarousel/assets/images/originals/bg1.jpg
  23. BIN  stumpers/bbjamcarousel/assets/images/originals/bg10.jpg
  24. BIN  stumpers/bbjamcarousel/assets/images/originals/bg11.jpg
  25. BIN  stumpers/bbjamcarousel/assets/images/originals/bg2.jpg
  26. BIN  stumpers/bbjamcarousel/assets/images/originals/bg3.jpg
  27. BIN  stumpers/bbjamcarousel/assets/images/originals/bg4.jpg
  28. BIN  stumpers/bbjamcarousel/assets/images/originals/bg5.jpg
  29. BIN  stumpers/bbjamcarousel/assets/images/originals/bg6.jpg
  30. BIN  stumpers/bbjamcarousel/assets/images/originals/bg7.jpg
  31. BIN  stumpers/bbjamcarousel/assets/images/originals/bg8.jpg
  32. BIN  stumpers/bbjamcarousel/assets/images/originals/bg9.jpg
  33. +64 −0 stumpers/bbjamcarousel/assets/main.qml
  34. +105 −0 stumpers/bbjamcarousel/bar-descriptor.xml
  35. +50 −0 stumpers/bbjamcarousel/carousel.pro
  36. +4 −0 stumpers/bbjamcarousel/device-assets.xml
  37. BIN  stumpers/bbjamcarousel/icon.png
  38. +150 −0 stumpers/bbjamcarousel/src/Carousel.cpp
  39. +44 −0 stumpers/bbjamcarousel/src/Carousel.hpp
  40. +61 −0 stumpers/bbjamcarousel/src/main.cpp
  41. +12 −0 stumpers/bbjamcarousel/translations/Makefile
  42. +1 −0  stumpers/bbjamcarousel/translations/carousel.pro
  43. +1 −0  stumpers/bbjamcarousel/translations/carousel.qm
  44. +4 −0 stumpers/bbjamcarousel/translations/carousel.ts
  45. +1 −0  stumpers/bbjamcarousel/x86/README.txt
View
210 stumpers/bbjamcarousel/.cproject
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.qnx.qcc.toolChain.138286086">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.138286086" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.138286086" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.138286086.749716908" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.617313206" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.159819497" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1882974458" 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.1135858187" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.358612124" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.98755413" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.138286086.1386367168" 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.170437760" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1030140128" 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.822445586" 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.1804537136" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.607912609" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.30088107" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.754061957" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.1243764900" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.94773967">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.94773967" 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"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.94773967" name="Device-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.94773967.751566381" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1676398822" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1714960623" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.253588436" 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.606292645" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.2003587603" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1949427361" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.94773967.442811174" 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.314942287" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1878307607" 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.332227952" 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.74516080" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.624932452" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1252307524" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1449651148" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.876704040" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.110016746">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.110016746" 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"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.110016746" name="Device-Release" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.110016746.1028955913" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1784071911" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.233666467" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.939533896" 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.456584829" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1655315478" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1200337973" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Release" enableAutoBuild="true" id="com.qnx.qcc.toolChain.110016746.1844843372" 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.1827057407" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.2060409516" 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.192531118" 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.808495128" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.755997339" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.2137206018" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.261375505" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.510820240" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.909381674">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.909381674" 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"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.909381674" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.909381674.340203721" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.851800827" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1308243946" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.2004253299" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
+ <option id="com.qnx.qcc.option.compiler.100377343" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.39682861" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1200133771" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.909381674.178222382" 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.1462296228" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1487650956" 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.1717328797" 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.1416140020" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1186766447" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1308899809" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1156027615" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.1917839996" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="carousel.null.771226098" name="carousel"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.94773967">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.110016746">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.909381674">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.138286086">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
+</cproject>
View
91 stumpers/bbjamcarousel/.project
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>carousel</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.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
35 stumpers/bbjamcarousel/Makefile
@@ -0,0 +1,35 @@
+QMAKE_TARGET = carousel
+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-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
View
5 stumpers/bbjamcarousel/Notice
@@ -0,0 +1,5 @@
+Hello Cascades
+Copyright (c) 2011 Research In Motion Limited (http://www.rim.com/)
+
+This product includes software developed at
+Research In Motion Limited (http://www.rim.com/).
View
1  stumpers/bbjamcarousel/arm/README.txt
@@ -0,0 +1 @@
+Empty target directory for building.
View
142 stumpers/bbjamcarousel/assets/Carousel.qml
@@ -0,0 +1,142 @@
+/* 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
+
+Container {
+ id: root
+ property int angle: 0
+ property int baseAngle: 0
+ property double offsetValue: 0
+ property variant centeredControl: 0
+ property double releaseSpeed: 0
+ property double momentumSpeed: 0
+ layout: DockLayout {
+ }
+ horizontalAlignment: HorizontalAlignment.Fill
+ verticalAlignment: VerticalAlignment.Fill
+ Container {
+ horizontalAlignment: HorizontalAlignment.Fill
+ verticalAlignment: VerticalAlignment.Fill
+ id: carouselContainer
+ layout: AbsoluteLayout {
+ }
+ CarouselItem {
+ centered: true
+ angle: root.angle + root.baseAngle
+ imgFileName: "images/bg1.png"
+ // use one item to trigger sort
+ onDepthChanged: {
+ root.sort()
+ }
+ }
+ CarouselItem {
+ angle: root.angle + root.baseAngle
+ imgFileName: "images/bg2.png"
+ }
+ CarouselItem {
+ angle: root.angle + root.baseAngle
+ imgFileName: "images/johan.png"
+ }
+ CarouselItem {
+ angle: root.angle + root.baseAngle
+ imgFileName: "images/bg4.png"
+ }
+ CarouselItem {
+ angle: root.angle + root.baseAngle
+ imgFileName: "images/bg5.png"
+ }
+ }
+ onCreationCompleted: {
+ root.offsetValue = 360 / (carouselContainer.controls.length)
+ var currentOffset = 0
+ for (var i = 0; i < carouselContainer.controls.length; i ++) {
+ carouselContainer.controls[i].angleOffset = currentOffset
+ currentOffset += root.offsetValue;
+ }
+ root.centeredControl = carouselContainer.controls[0]
+ sort();
+ }
+ function sort() {
+ //Bubblesort the carousel items
+ var n = carouselContainer.controls.length
+ var swopped
+ do {
+ swopped = false
+ for (var i = 0; i < n - 1; ++ i) {
+ // a larger depth value means the pic should be on top, i.e. move towards the end of the list of items in the container.
+ if (carouselContainer.controls[i].depth > carouselContainer.controls[i + 1].depth) {
+ carouselContainer.swap(i, i + 1)
+ swopped = true
+ }
+ }
+ } while (swopped)
+ }
+ onAngleChanged: {
+ sort();
+ root.centeredControl.centered = false;
+ }
+ onBaseAngleChanged: {
+ sort();
+ }
+ function snapToItem() {
+ if (root.baseAngle % root.offsetValue != 0) {
+ snapToItemAnimation.startValue = root.baseAngle
+ snapToItemAnimation.duration = 300
+
+ // snap in the directon the user is scrolling to avoid unsmooth snapping
+ if (root.releaseSpeed < 0) {
+ snapToItemAnimation.endValue = Math.floor(root.baseAngle / root.offsetValue) * root.offsetValue
+ } else if (root.releaseSpeed > 0) {
+ snapToItemAnimation.endValue = Math.ceil(root.baseAngle / root.offsetValue) * root.offsetValue
+ } else {
+ snapToItemAnimation.endValue = Math.round(root.baseAngle / root.offsetValue) * root.offsetValue
+ }
+
+ // Calculate the duration of the snap if we are snapping from a momentum scroll
+ if (root.momentumSpeed != 0) {
+ var dist = Math.abs(snapToItemAnimation.endValue - snapToItemAnimation.startValue)
+ snapToItemAnimation.duration = Math.abs(dist / root.momentumSpeed)
+ }
+ snapToItemAnimation.start()
+
+ // Set the new centered object
+ for (var i = 0; i < carouselContainer.controls.length; i ++) {
+ //if (carouselContainer.controls[i].angleOffset == Math.abs(360 - (snapToItemAnimation.endValue)) % 360) {
+ if (carouselContainer.controls[i].angleOffset == Math.abs(360 - snapToItemAnimation.endValue) % 360) {
+ root.centeredControl.centered = false;
+ root.centeredControl = carouselContainer.controls[i];
+ root.centeredControl.centered = true;
+ }
+ }
+ }
+ }
+ attachedObjects: [
+ // QPropertyAnimation should be used with care since it is a client side animation that will
+ // spam the server with messages for every update.
+ QPropertyAnimation {
+ id: snapToItemAnimation
+ startValue: 0
+ endValue: 360
+ duration: 300
+ easingCurve: app.getEase() // TODO:: expose this correctly
+ targetObject: root
+ propertyName: app.getBytes("baseAngle") // TODO:: workaround since we need the QByteArray of the property name
+ onFinished: {
+ root.baseAngle = root.baseAngle % 360
+ }
+ }
+ ]
+}
View
70 stumpers/bbjamcarousel/assets/CarouselItem.qml
@@ -0,0 +1,70 @@
+/* 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
+
+Container {
+ id: itemRoot
+ property int angle: 0
+ property int angleOffset: 0
+ property bool centered: false
+ property alias image: theImage.imageSource
+ property string imgFileName: ""
+ onImgFileNameChanged: {
+ theImage.image = app.createMirrorImage(imgFileName)
+ }
+ preferredWidth: 426
+ preferredHeight: 280 + 280 * 0.25 + 2
+ translationX: 427 + 410 * Math.cos((itemRoot.angle + itemRoot.angleOffset + 90) * (Math.PI / 180))
+ translationY: 130 + 220 * Math.sin((itemRoot.angle + itemRoot.angleOffset + 90) * (Math.PI / 180))
+ attachedObjects: [
+ ImplicitAnimationController {
+ propertyName: "translationX"
+ enabled: false
+ },
+ ImplicitAnimationController {
+ propertyName: "translationY"
+ enabled: false
+ },
+ ImplicitAnimationController {
+ propertyName: "scaleX"
+ enabled: false
+ },
+ ImplicitAnimationController {
+ propertyName: "scaleY"
+ enabled: false
+ }
+ ]
+ property double scaleFactor: 1 - 0.55 * Math.sin((itemRoot.angle + itemRoot.angleOffset + 180 + 90) * (Math.PI / 180))
+ // value pening between 0.0 (background) and 2.0 (foreground)
+ property double depth: 1 + Math.cos((itemRoot.angle + itemRoot.angleOffset) * (Math.PI / 180))
+ scaleX: scaleFactor
+ scaleY: scaleFactor
+ layout: DockLayout {
+ }
+ ImageView {
+ id: theImage
+ horizontalAlignment: HorizontalAlignment.Fill
+ verticalAlignment: VerticalAlignment.Fill
+ scalingMethod: ScalingMethod.AspectFill
+ opacity: (itemRoot.depth * 0.375) + 0.25
+ attachedObjects: [
+ ImplicitAnimationController {
+ propertyName: "opacity"
+ enabled: false
+ }
+ ]
+ }
+}
View
85 stumpers/bbjamcarousel/assets/SwipeHandler.qml
@@ -0,0 +1,85 @@
+/* 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
+import utils 1.0
+
+Container {
+ id: swipeHandler
+ property double dragOffset: 0
+ property double momentumOffset: 0
+ property double speed
+ property double endSpeed
+ property double touchDownX
+ property variant startTime
+ property double timeConstant
+ property bool decelerationStarted
+ signal scrollingStart()
+ signal momentumScrollingEnd()
+ signal dragScrollingEnd()
+ onTouch: {
+ if (event.isDown()) {
+ scrollingStart();
+ touchDownX = event.windowX;
+ startTime = Date.now()
+ dragOffset = 0
+ if (decelerationStarted == true) {
+ timer.stop();
+ decelerationStarted = false
+ }
+ } else if (event.isMove()) {
+ dragOffset = touchDownX - event.windowX
+ } else if (event.isUp()) {
+ dragOffset = touchDownX - event.windowX
+ var diffTime = Date.now() - startTime
+ speed = dragOffset / diffTime;
+ if (Math.abs(dragOffset) > 50 && Math.abs(speed) > 1) {
+ decelerationStarted = true
+ timeConstant = 3000 / 6;
+ timer.t = 0;
+ timer.start()
+ scrollingStart()
+ momentumOffset = 0
+ } else {
+ dragScrollingEnd();
+ }
+ }
+ }
+ attachedObjects: [
+ QTimer {
+ id: timer
+ property double t: 0
+ property double prevOffset: 0
+ interval: 16
+ onTimeout: {
+ var delta = speed * Math.exp(- t / timeConstant);
+ prevOffset = momentumOffset
+ if (t < 1000) {
+ momentumOffset = momentumOffset + 2 * delta;
+ } else {
+ momentumOffset = momentumOffset - delta;
+ }
+ t = t + 16;
+ if (Math.abs(momentumOffset - prevOffset) < 3) {
+ endSpeed = delta / 16
+ speed = 0;
+ timer.stop();
+ decelerationStarted = false
+ momentumScrollingEnd()
+ }
+ }
+ }
+ ]
+}
View
BIN  stumpers/bbjamcarousel/assets/images/bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg4.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg5.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/bg5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/hl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/johan.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg10.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg11.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg4.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg5.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg6.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg7.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg8.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  stumpers/bbjamcarousel/assets/images/originals/bg9.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
64 stumpers/bbjamcarousel/assets/main.qml
@@ -0,0 +1,64 @@
+/* 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: back.imagePaint
+ attachedObjects: [
+ ImagePaintDefinition {
+ id: back
+ repeatPattern: RepeatPattern.Fill
+ imageSource: "asset:///images/bg.png"
+ }
+ ]
+ layout: DockLayout {
+ }
+ Carousel {
+ id: carousel
+ }
+ SwipeHandler {
+ verticalAlignment: VerticalAlignment.Fill
+ horizontalAlignment: HorizontalAlignment.Fill
+ property int dragScrollSpeed: 1200 // Lower value gives higher scroll speed
+ property int momentumScrollSpeed: 300 // Lower value gives higher scroll speed
+ onDragOffsetChanged: {
+ carousel.angle = (dragOffset / dragScrollSpeed) * 180
+ }
+ onMomentumOffsetChanged: {
+ carousel.angle = (momentumOffset / momentumScrollSpeed) * 180
+ }
+ onScrollingStart: {
+ carousel.baseAngle += carousel.angle;
+ carousel.angle = 0;
+ }
+ onDragScrollingEnd: {
+ carousel.releaseSpeed = speed;
+ carousel.momentumSpeed = 0;
+ carousel.baseAngle += carousel.angle;
+ carousel.angle = 0;
+ carousel.snapToItem();
+ }
+ onMomentumScrollingEnd: {
+ carousel.baseAngle += carousel.angle;
+ carousel.angle = 0;
+ carousel.releaseSpeed = endSpeed
+ carousel.momentumSpeed = endSpeed
+ carousel.snapToItem();
+ }
+ }
+ }
+}
View
105 stumpers/bbjamcarousel/bar-descriptor.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
+
+<!-- BlackBerry Tablet OS application descriptor file.
+
+ Specifies parameters for identifying, installing, and launching native applications on BlackBerry Tablet OS.
+
+-->
+
+ <!-- A universally unique application identifier. Must be unique across all BlackBerry Tablet OS applications.
+ Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
+ <id>com.example.carousel</id>
+
+ <!-- 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>carousel</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>1.0.0</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 -->
+ <buildId>1</buildId>
+
+ <!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
+ <!-- <versionLabel></versionLabel> -->
+
+ <!-- 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 carousel 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>me</author>
+ <authorId>gYAAgGQV3qB15gLndrjUWrgTNzw</authorId>
+
+ <!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
+ <!-- <authorId>ABC1234YjsnUk235h</authorId> -->
+
+ <initialWindow>
+ <aspectRatio>landscape</aspectRatio>
+ <autoOrients>false</autoOrients>
+ <systemChrome>none</systemChrome>
+ <transparent>false</transparent>
+ </initialWindow>
+
+ <cascadesTheme>dark</cascadesTheme>
+
+ <!-- The category where the application appears. Either core.games or core.media. -->
+ <configuration id="com.qnx.qcc.toolChain.138286086" name="Default">
+ <platformArchitecture>armle-v7</platformArchitecture>
+ <asset path="arm/o.le-v7-g/carousel" entry="true" type="Qnx/Elf">carousel</asset>
+ </configuration>
+ <configuration id="com.qnx.qcc.toolChain.94773967" name="Device-Debug">
+ <platformArchitecture>armle-v7</platformArchitecture>
+ <asset path="arm/o.le-v7-g/carousel" entry="true" type="Qnx/Elf">carousel</asset>
+ </configuration>
+ <configuration id="com.qnx.qcc.toolChain.110016746" name="Device-Release">
+ <platformArchitecture>armle-v7</platformArchitecture>
+ <asset path="arm/o.le-v7/carousel" entry="true" type="Qnx/Elf">carousel</asset>
+ </configuration>
+ <configuration id="com.qnx.qcc.toolChain.909381674" name="Simulator-Debug">
+ <platformArchitecture>x86</platformArchitecture>
+ <asset path="x86/o-g/carousel" entry="true" type="Qnx/Elf">carousel</asset>
+ </configuration>
+
+ <!-- The icon for the application, which should be 86x86. -->
+ <icon>
+ <image>icon.png</image>
+ </icon>
+
+ <asset path="icon.png">icon.png</asset>
+ <asset path="assets">assets</asset>
+
+ <!-- Locale support -->
+ <asset path="translations" dest="qm">
+ <include name="*.qm"/>
+ </asset>
+
+ <!-- Request permission to execute native code. Required for native applications. -->
+ <permission system="true">run_native</permission>
+ <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
+
+</qnx>
View
50 stumpers/bbjamcarousel/carousel.pro
@@ -0,0 +1,50 @@
+TEMPLATE = app
+TARGET = carousel
+
+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
4 stumpers/bbjamcarousel/device-assets.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<assets>
+ <target-device width="768" height="1280" ppi="356" class="phone"/>
+</assets>
View
BIN  stumpers/bbjamcarousel/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
150 stumpers/bbjamcarousel/src/Carousel.cpp
@@ -0,0 +1,150 @@
+/* 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.
+ */
+
+#include "Carousel.hpp"
+
+#include <bb/cascades/Application>
+#include <bb/cascades/QmlDocument>
+#include <bb/cascades/AbstractPane>
+
+#include <QPropertyAnimation>
+
+#include <bb/ImageData>
+#include <QImage>
+#include <QRgb>
+#include <QImage>
+#include <bb/cascades/Image>
+
+#include <unistd.h>
+
+using namespace bb::cascades;
+
+Carousel::Carousel(bb::cascades::Application *app) :
+ QObject(app)
+{
+ qmlRegisterType<QTimer>("utils", 1, 0, "QTimer");
+ qmlRegisterType<QPropertyAnimation>("bb.cascades", 1, 0,
+ "QPropertyAnimation");
+ // 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("app", this);
+ // create root object for the UI
+ AbstractPane *root = qml->createRootObject<AbstractPane>();
+ // set created root object as a scene
+ app->setScene(root);
+}
+
+// Getting the byte array of the string
+QByteArray Carousel::getBytes(QString str)
+{
+ return str.toAscii();
+}
+
+// We only want the OutCubic easing-curve, try others, dare you!
+QEasingCurve Carousel::getEase()
+{
+ return QEasingCurve::OutCubic;
+}
+
+// This function is needed by the mirroring algo.
+static bb::cascades::Image fromQImage(const QImage &origQImage,
+ const QImage &mirroredQImage)
+{
+
+ bb::ImageData imageData(bb::PixelFormat::RGBA_Premultiplied,
+ origQImage.width(), (origQImage.height() * 1.25) + 2);
+ int y = 0;
+
+ unsigned char *dstLine = imageData.pixels();
+
+ for (y = 0; y < origQImage.height(); y++)
+ {
+ unsigned char * dst = dstLine;
+ for (int x = 0; x < imageData.width(); x++)
+ {
+ QRgb srcPixel = origQImage.pixel(x, y);
+
+ *dst++ = qRed(srcPixel) * qAlpha(srcPixel) / 255;
+ *dst++ = qGreen(srcPixel) * qAlpha(srcPixel) / 255;
+ *dst++ = qBlue(srcPixel) * qAlpha(srcPixel) / 255;
+ *dst++ = qAlpha(srcPixel);
+ }
+ dstLine += imageData.bytesPerLine();
+ }
+
+ for (; y < origQImage.height() + 2; y++)
+ {
+ unsigned char * dst = dstLine;
+ for (int x = 0; x < imageData.width(); x++)
+ {
+ *dst++ = 0;
+ *dst++ = 0;
+ *dst++ = 0;
+ *dst++ = 0;
+ }
+ dstLine += imageData.bytesPerLine();
+ }
+
+ for (; y < imageData.height(); y++)
+ {
+ unsigned char * dst = dstLine;
+ for (int x = 0; x < imageData.width(); x++)
+ {
+ QRgb srcPixel = mirroredQImage.pixel(x, (y - 2 - origQImage.height()));
+ *dst++ = qRed(srcPixel);
+ *dst++ = qGreen(srcPixel);
+ *dst++ = qBlue(srcPixel);
+ *dst++ = qAlpha(srcPixel);
+
+ }
+ dstLine += imageData.bytesPerLine();
+ }
+
+ return Image(imageData);
+
+}
+
+// Let's not have all the images mirrored, let's do that in code, and some alpha on them aswell
+QVariant Carousel::createMirrorImage(QString inputFName)
+{
+
+ if (inputFName.isEmpty())
+ return QVariant::fromValue(0);
+
+ char buff[1024];
+ QString prefix = QString(getcwd(buff, 1024));
+ inputFName = prefix + "/app/native/assets/" + inputFName;
+
+ QImage inputQImage(inputFName);
+ QImage mirrored_part = inputQImage.mirrored(false, true);
+ QPoint start(0, 0);
+ QPoint end(0, mirrored_part.height());
+ QLinearGradient gradient(start, end);
+
+ gradient.setColorAt(0.0, Qt::gray);
+ gradient.setColorAt(0.22, Qt::black);
+ gradient.setColorAt(1.0, Qt::black);
+ QImage mask = mirrored_part;
+ QPainter painter(&mask);
+ painter.fillRect(mirrored_part.rect(), gradient);
+ painter.end();
+
+ mirrored_part.setAlphaChannel(mask);
+ bb::cascades::Image mirrored_image = fromQImage(inputQImage, mirrored_part);
+ return QVariant::fromValue(mirrored_image);
+
+}
View
44 stumpers/bbjamcarousel/src/Carousel.hpp
@@ -0,0 +1,44 @@
+/* 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.
+ */
+
+#ifndef Carousel_HPP_
+#define Carousel_HPP_
+
+#include <QObject>
+#include <QEasingCurve>
+#include <QVariant>
+
+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 Carousel : public QObject
+{
+ Q_OBJECT
+public:
+ Carousel(bb::cascades::Application *app);
+ virtual ~Carousel() {}
+
+ Q_INVOKABLE QByteArray getBytes(QString str);
+ Q_INVOKABLE QEasingCurve getEase();
+ Q_INVOKABLE QVariant createMirrorImage(QString inputFName);
+
+};
+
+
+#endif /* Carousel_HPP_ */
View
61 stumpers/bbjamcarousel/src/main.cpp
@@ -0,0 +1,61 @@
+/* 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.
+ */
+
+#include <bb/cascades/Application>
+#include <bb/cascades/QmlDocument>
+#include <bb/cascades/AbstractPane>
+
+#include <QLocale>
+#include <QTranslator>
+#include "Carousel.hpp"
+
+using namespace bb::cascades;
+void myMessageOutput(QtMsgType type, const char *msg)
+ {
+ //in this function, you can write the message to any stream!
+ switch (type) {
+ case QtDebugMsg:
+ fprintf(stderr, "Debug: %s\n", msg);
+ break;
+ case QtWarningMsg:
+ fprintf(stderr, "Warning: %s\n", msg);
+ break;
+ case QtCriticalMsg:
+ fprintf(stderr, "Critical: %s\n", msg);
+ break;
+ case QtFatalMsg:
+ fprintf(stderr, "Fatal: %s\n", msg);
+ abort();
+ }
+ }
+
+int main(int argc, char **argv)
+{
+ qInstallMsgHandler(myMessageOutput);
+ // this is where the server is started etc
+ Application app(argc, argv);
+
+ // localization support
+ QTranslator translator;
+ QString locale_string = QLocale().name();
+ QString filename = QString( "carousel_%1" ).arg( locale_string );
+ if (translator.load(filename, "app/native/qm")) {
+ app.installTranslator( &translator );
+ }
+
+ new Carousel(&app);
+
+ return Application::exec();
+ }
View
12 stumpers/bbjamcarousel/translations/Makefile
@@ -0,0 +1,12 @@
+QMAKE_TARGET = carousel
+LUPDATE = $(QNX_HOST)/usr/bin/lupdate
+LRELEASE = $(QNX_HOST)/usr/bin/lrelease
+
+update: $(QMAKE_TARGET).pro FORCE
+ $(LUPDATE) $(QMAKE_TARGET).pro
+
+release: $(QMAKE_TARGET).pro $(QMAKE_TARGET).ts
+ $(LRELEASE) $(QMAKE_TARGET).pro
+
+FORCE:
+
View
1  stumpers/bbjamcarousel/translations/carousel.pro
@@ -0,0 +1 @@
+include (../carousel.pro)
View
1  stumpers/bbjamcarousel/translations/carousel.qm
@@ -0,0 +1 @@
+<�d��!�`���
View
4 stumpers/bbjamcarousel/translations/carousel.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+</TS>
View
1  stumpers/bbjamcarousel/x86/README.txt
@@ -0,0 +1 @@
+Empty target directory for building.
Please sign in to comment.
Something went wrong with that request. Please try again.