Skip to content

Commit

Permalink
Added 7 samples from Cascades KnowledgeBase
Browse files Browse the repository at this point in the history
(they had been incorrectly pushed to Cascades-Community-Samples; I'll remove them from there next)
  • Loading branch information
pelegri committed Aug 25, 2012
1 parent 6aee0c1 commit c2ef7cf
Show file tree
Hide file tree
Showing 192 changed files with 15,721 additions and 0 deletions.
210 changes: 210 additions & 0 deletions FunWithSensors/.cproject

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions FunWithSensors/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>FunWithSensors</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>Device-Debug</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>Device-Debug</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
</natures>
</projectDescription>
42 changes: 42 additions & 0 deletions FunWithSensors/FunWithSensors.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
TEMPLATE = app
TARGET = FunWithSensors

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

34 changes: 34 additions & 0 deletions FunWithSensors/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
QMAKE_TARGET = FunWithSensors
QMAKE = $(QNX_HOST)/usr/bin/qmake
TARGET = $(QMAKE_TARGET)


all: Makefile $(QMAKE_TARGET)

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


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

FORCE:

$(QMAKE_TARGET): device simulator

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

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

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

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

Simulator-Debug: Makefile
$(MAKE) -C ./x86 -f Makefile debug
40 changes: 40 additions & 0 deletions FunWithSensors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Using Device Sensors

This sample shows how to activate and listen to the sensors provided on the device.

What you will learn from this sample:
* -- Import a C++ object and access it's members
* -- Define custom properties and reuse them
* -- Register C++ classes for use in QML documents
* -- How to interface with BPS (Blackberry Platform Service) to read the following sensors:
* temperature (not supported on Dev Alpha device)
* light
* magnometer
* accelerometer
* gyrometer

========================================================================
Requirements:

BlackBerry 10 Native SDK Beta

========================================================================
Running the example:

1. Download the sample from http://github.com/blackberry.
2. Launch BlackBerry 10 Native SDK Beta, and from the File menu, select Import.
3. Expand General, and select Existing Projects into Workspace. Click Next.
4. Browse to the location where you extracted the sample file, and then click OK.
5. The sample project should display in the the Projects section.
Click Finish to import the project into your workspace.
6. In the Project Explorer pane, Right-click the the project (for example hellocascades)
and select Build Project.
7. In the Project Explorer pane, Right-click the the project (for example hellocascades)
and select Run As > BlackBerry C/C++ Application.
8. The application will now install and launch on your device if not you might
have to set up your environment:
http://developer.blackberry.com/cascades/documentation/getting_started/setting_up.html


Disclaimer
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit c2ef7cf

Please sign in to comment.