Skip to content

Commit

Permalink
Merge pull request #65 from CodeHoarder/master
Browse files Browse the repository at this point in the history
Two new samples - barcodescanner/barcodeinvoker; the rest were fixes and tweaks.
  • Loading branch information
pelegri committed Jan 16, 2013
2 parents 22b6d4d + 10074d0 commit c940f6f
Show file tree
Hide file tree
Showing 67 changed files with 2,748 additions and 756 deletions.
2 changes: 1 addition & 1 deletion SensorDemo/assets/compass.qml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Container {

ImageView {
imageSource: "images/MID-Dial-reverse.png"
rotationZ: - compass.azimuth
rotationZ: 360 + compass.azimuth
maxWidth: 500.0
maxHeight: 500.0

Expand Down
209 changes: 209 additions & 0 deletions barcodeinvoker/.cproject

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions barcodeinvoker/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>barcodeinvoker</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>
25 changes: 25 additions & 0 deletions barcodeinvoker/.settings/org.eclipse.cdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
eclipse.preferences.version=1
environment/project/com.qnx.qcc.toolChain.2105851718/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.2105851718/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.2105851718/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.2105851718/EXCLUDE_VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.2105851718/EXCLUDE_VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.2105851718/EXCLUDE_VARIANTLIST/value=r
environment/project/com.qnx.qcc.toolChain.2105851718/append=true
environment/project/com.qnx.qcc.toolChain.2105851718/appendContributed=true
environment/project/com.qnx.qcc.toolChain.72645602/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.72645602/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.72645602/CPULIST/value=x86
environment/project/com.qnx.qcc.toolChain.72645602/VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.72645602/VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.72645602/VARIANTLIST/value=g
environment/project/com.qnx.qcc.toolChain.72645602/append=true
environment/project/com.qnx.qcc.toolChain.72645602/appendContributed=true
environment/project/com.qnx.qcc.toolChain.969774234/CPULIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.969774234/CPULIST/operation=append
environment/project/com.qnx.qcc.toolChain.969774234/CPULIST/value=arm
environment/project/com.qnx.qcc.toolChain.969774234/VARIANTLIST/delimiter=,
environment/project/com.qnx.qcc.toolChain.969774234/VARIANTLIST/operation=append
environment/project/com.qnx.qcc.toolChain.969774234/VARIANTLIST/value=g
environment/project/com.qnx.qcc.toolChain.969774234/append=true
environment/project/com.qnx.qcc.toolChain.969774234/appendContributed=true
35 changes: 35 additions & 0 deletions barcodeinvoker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
QMAKE_TARGET = barcodeinvoker
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 blackberry-armv7le-qcc -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device
$(QMAKE) -spec 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
Empty file added barcodeinvoker/arm/.gitignore
Empty file.
Binary file added barcodeinvoker/assets/images/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions barcodeinvoker/assets/main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* 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

// creates one page with a label and button to invoke barcodescanner

Page {
titleBar: TitleBar {
title: qsTr("Barcode Invoker")
appearance: TitleBarAppearance.Branded
}
Container {
layout: DockLayout {
}
// The background image
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
//Button to invoke the barcodescanner card - for this to work
//you have to have barcodescanner sample on device
Button {
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Top

text: qsTr("Scan Barcode")
onClicked: {
barcodeInvoker.onInvokeButtonClicked()
}
}
//displays barcode data
Label {
horizontalAlignment: HorizontalAlignment.Left
verticalAlignment: VerticalAlignment.Bottom

text: qsTr("Barcode: " + barcodeInvoker.barcode)
textStyle.color: Color.White
}
}
}
103 changes: 103 additions & 0 deletions barcodeinvoker/bar-descriptor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?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.bb10samples.barcodeinvoker</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>barcodeinvoker</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 BarcodeInvoker 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>RIM</author>

<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->

<initialWindow>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>

<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
<configuration id="com.qnx.qcc.toolChain.1094190268" name="Default">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7-g/barcodeinvoker" entry="true" type="Qnx/Elf">barcodeinvoker</asset>
</configuration>
<configuration id="com.qnx.qcc.toolChain.969774234" name="Device-Debug">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7-g/barcodeinvoker" entry="true" type="Qnx/Elf">barcodeinvoker</asset>
<entryPointType>Qnx/Elf</entryPointType>
</configuration>
<configuration id="com.qnx.qcc.toolChain.2105851718" name="Device-Release">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7/barcodeinvoker.so.1.0.0" entry="true" type="Qnx/Elf">barcodeinvoker.so</asset>
<entryPointType>Qnx/Cascades</entryPointType>
</configuration>
<configuration id="com.qnx.qcc.toolChain.72645602" name="Simulator-Debug">
<platformArchitecture>x86</platformArchitecture>
<asset path="x86/o-g/barcodeinvoker" entry="true" type="Qnx/Elf">barcodeinvoker</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>
53 changes: 53 additions & 0 deletions barcodeinvoker/barcodeinvoker.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
TEMPLATE = app
TARGET = barcodeinvoker

CONFIG += qt warn_on debug_and_release cascades
LIBS += -lbbsystem

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

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

device {
CONFIG(release, debug|release) {
DESTDIR = o.le-v7
TEMPLATE = lib
QMAKE_CXXFLAGS_RELEASE += -fvisibility=hidden -mthumb
}
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

Loading

0 comments on commit c940f6f

Please sign in to comment.