summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2011-03-10 12:52:50 (GMT)
committerJerome Pasion <jerome.pasion@nokia.com>2011-03-10 12:52:50 (GMT)
commita097f71eb136b0196191bf783691e4dc0c2e9df1 (patch)
treeb4a5a51ed09174b865fccd70f90b530fc4a2b1d8 /doc/src
parentbf59a63b0c5ceb9b0b014d879c30ce62cfcfc24f (diff)
downloadQt-a097f71eb136b0196191bf783691e4dc0c2e9df1.zip
Qt-a097f71eb136b0196191bf783691e4dc0c2e9df1.tar.gz
Qt-a097f71eb136b0196191bf783691e4dc0c2e9df1.tar.bz2
Whitespace fixes.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/demos/guitartuner.qdoc4
-rw-r--r--doc/src/demos/mobiledemos.qdoc4
-rw-r--r--doc/src/demos/qcamera.qdoc22
-rw-r--r--doc/src/demos/qml-qtbubblelevel.qdoc64
-rw-r--r--doc/src/getting-started/demos.qdoc16
5 files changed, 55 insertions, 55 deletions
diff --git a/doc/src/demos/guitartuner.qdoc b/doc/src/demos/guitartuner.qdoc
index 91937fe..c669765 100644
--- a/doc/src/demos/guitartuner.qdoc
+++ b/doc/src/demos/guitartuner.qdoc
@@ -34,8 +34,8 @@ The Guitar Tuner application can be used to tune guitar strings by analyzing the
audio recorded by the device microphone. Guitar Tuner can be also used in the
listening mode. It will then play the audio by the corresponding frequency, and
the user can tune the guitar by ear. The application demonstrates the audio-in
-and the audio-out interfaces of
-\l{external: Mobility Multimedia}{Qt Mobility Multimedia} and integrating Qt
+and the audio-out interfaces of
+\l{external: Mobility Multimedia}{Qt Mobility Multimedia} and integrating Qt
code to the Qt Quick UI.
The example is hosted in Projects Forum Nokia: https://projects.forum.nokia.com/guitartuner
diff --git a/doc/src/demos/mobiledemos.qdoc b/doc/src/demos/mobiledemos.qdoc
index 4a146d5..47241a6 100644
--- a/doc/src/demos/mobiledemos.qdoc
+++ b/doc/src/demos/mobiledemos.qdoc
@@ -30,8 +30,8 @@
\example demos/mobile/quickhit
\title Quick Hit Demo
- This demo shows how to use Mobility APIs to access device audio
- capabilities. Uses the multimedia and systeminfo modules of
+ This demo shows how to use Mobility APIs to access device audio
+ capabilities. Uses the multimedia and systeminfo modules of
\l{external: Qt Mobility Manual}{Qt Mobility}.
*/
diff --git a/doc/src/demos/qcamera.qdoc b/doc/src/demos/qcamera.qdoc
index cb717d5..315e82a6 100644
--- a/doc/src/demos/qcamera.qdoc
+++ b/doc/src/demos/qcamera.qdoc
@@ -33,35 +33,35 @@
This Qt C++ application demonstrates how to use Multimedia, Messaging and Contacts modules from \l{external: Qt Mobility Manual}{Qt Mobility}.
\image qcameraexample.png
-
+
The application shows the viewfinder picture from the device camera and allows the user to capture images. Captured images are stored into the gallery and can be sent as an MMS message to a friend. Application listens for incoming MMS messages in the Inbox folder. If the MMS message contains a picture, the application asks the user whether he or she wants to add the picture as an avatar of the sender. The person's general contact information has to exist in the device phonebook in order to store the avatar in it.
-
+
The application uses own MyVideoSurface video surface derived from QAbstractVideoSurface for showing camera view finder pictures. A video surface presents a continuous stream of identically formatted frames.
\snippet demos/mobile/qcamera/cameraexample.cpp 0
-
+
The application handles Graphics Out Of Memory (GOOM) events in it's QApplication::symbianEventFilter() method.
\snippet demos/mobile/qcamera/main.cpp 0
-
+
\section1 Required capabilities
Application can be self-signed.
- After enabling Qt Mobility Messaging module (MESSAGING_ENABLED flag in .pro file)
- from the project file is ReadDeviceData WriteDeviceData capabilities also needed and
- application have to be Developer Signed. Enabling Messaging adds MMS sending feature for the application.
+ After enabling Qt Mobility Messaging module (MESSAGING_ENABLED flag in .pro file)
+ from the project file is ReadDeviceData WriteDeviceData capabilities also needed and
+ application have to be Developer Signed. Enabling Messaging adds MMS sending feature for the application.
\section1 Compatibility
Qt SDK 1.1
-
+
Qt 4.7.2 for Symbian
-
+
QtMobility 1.1.1
-
+
Tested on: Nokia N8, Nokia E7
-
+
Developed with: Qt SDK 1.1
diff --git a/doc/src/demos/qml-qtbubblelevel.qdoc b/doc/src/demos/qml-qtbubblelevel.qdoc
index e965026..63ac286 100644
--- a/doc/src/demos/qml-qtbubblelevel.qdoc
+++ b/doc/src/demos/qml-qtbubblelevel.qdoc
@@ -30,51 +30,51 @@
\title Qt Bubble Level Example
\example demos/mobile/qtbubblelevel
-Qt Bubble Level is a simple application that uses
-\l{external: Qt Mobility Manual}{Qt Mobility's} accelerometer APIs and hardware
+Qt Bubble Level is a simple application that uses
+\l{external: Qt Mobility Manual}{Qt Mobility's} accelerometer APIs and hardware
sensor information to calculate the inclination of the device and presents this
as atraditional bubble level. The application provides a calibration feature to
handle any possible errors in accelerometer readings. The example is hosted in
Projects Forum Nokia: https://projects.forum.nokia.com/qtbubblelevel
-
+
\image qml-qtbubblelevel-demo.png
-
+
\section1 Initialising the application
-
- All of the initialisations are done in the main function.
-
+
+ All of the initialisations are done in the main function.
+
First, QDeclarativeView is created to intepret the QML files. The QML file given is found in the Qt resource. The root QML element is set to resize to the view whenever the view is resized.
\snippet demos/mobile/qtbubblelevel/main.cpp 0
-
+
The Settings object will handle the loading or storing of the calibration value. Next, we create instances from QAccelerometer and AccelerometerFilter and attach the filter to the sensor.
-
+
\snippet demos/mobile/qtbubblelevel/main.cpp 1
The Qt code is then connected to QML code by using Qt Signals and Slots connections. First, the root object is retrieved from QDeclarativeView. The root object now represents the Qt object of the QML root element.
-
+
The saveCorrectionAngle signal of the QML root element is connected to the Qt slot saveCorrectionAngle. The rotationChanged and correctionAngle Qt signals are connected to the handleRotation and setCorrectionAngle slot of the QML root element. Finally, the quit signal of QDeclarativeEngine is connected to QApplication's quit slot.
-
+
\snippet demos/mobile/qtbubblelevel/main.cpp 2
-
+
On the Maemo target, the application needs a minimise button, so we connect one additional QML signal to the Qt slot. The minimise button is made visible by setting the value of the QML root element's taskSwitcherVisible property to true.
-
+
\snippet demos/mobile/qtbubblelevel/main.cpp 3
-
+
The correction factor of the accelerometer is retrieved from persistent storage by using QSettings. The correction factor is signalled to the QML side by using the function setCorrectionAngle. The accelerometer sensor is started and it will eventually begin to signal the changes in accelerometer readings.
-
+
\snippet demos/mobile/qtbubblelevel/main.cpp 4
-
+
Finally, in the end of the function the view is shown in full screen on mobile devices. On other targets, the application is shown as 800 x 480 resolution in the 100, 100 position from the top-left corner of the desktop.
-
+
\snippet demos/mobile/qtbubblelevel/main.cpp 5
-
+
\section1 Accessing the accelerometer information
-
+
The inclination of the device is resolved by using the QAccelerometer sensor of QtMobility. We already created the sensor in the main function and attached our self-derived AccelerometerFilter object to it. Here is the definition of the AccelerometerFilter class:
-
+
\snippet demos/mobile/qtbubblelevel/accelerometerfilter.h 0
-
+
The class is multiderived from QObject and QAccelerometerFilter classes. The QAccelerometerFilter class is derived from QObject because we want to use Qt Signals and Slots to signal changes in accelerometer readings.
The members x, y, and z store the previous values of the sensor reading in order to implement a low pass filter to the values.
@@ -82,26 +82,26 @@ Projects Forum Nokia: https://projects.forum.nokia.com/qtbubblelevel
In the implementation of the AccelerometerFilter class, we first read the value of each axis from the QAccelerometerReading object. The values are then converted from radians to degrees and applied the low pass filter to reduce noise in the sensor readings. Different low pass factors are used depending on the platform (these were determined to be good via experimenting). Finally, the calculated value is emitted.
Note that the accelerometer sensors are oriented differently in Symbian and Maemo devices, and we must account for this by using platform-specific code.
-
+
\snippet demos/mobile/qtbubblelevel/accelerometerfilter.cpp 0
-
+
\section1 The Qt Quick UI
-
+
BubbleLevel.qml is the main QML element. It represents the wooden board of the bubble level, and it also acts as a connection point between the QML and the Qt side. In the beginning of the element, there are two signals, two functions, and one property. All of these define the interface between Qt and QML.
-
+
On the Maemo platform, when the application is to be minimised, minimizeApplication is signalled. When a new calibration factor is to be stored in the device's memory, saveCorrectionAngle is signalled.
-
+
The handleRotation function acts as a Qt slot to which the AccelerometerFilters signal rotationChanged is connected. Similarly, the setCorrectionAngle function also acts as a Qt slot to which the Settings object's signal, correctionAngle, is connected.
-
+
The property alias taskSwitcherVisible is provided to allow the Qt model to show or hide the task switcher button which minimises the application. This is only meaningful on Maemo platforms, where every application normally has a task switcher button.
-
+
\snippet demos/mobile/qtbubblelevel/qml/BubbleLevel.qml 0
-
+
The Tube element represents the the glass tube of the bubble level. It is anchored to the centre of the wooden board. The width and height are calculated with specific factors to make the glass tube scale to different resolutions.
-
+
\snippet demos/mobile/qtbubblelevel/qml/BubbleLevel.qml 1
-
+
In the implementation of Tube.qml, the property deg represents the current inclination. The x-position of the bubble is bound to the JavaScript function calX which is called every time the property deg, center, or bubblCenter is changed. The function places the bubble in the corresponding place on its parent.
-
+
\snippet demos/mobile/qtbubblelevel/qml/Tube.qml 0
*/
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 111b405..9366259 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -39,7 +39,7 @@
\l{Qt Examples} and are used to highlight certain features of
Qt.
- \table
+ \table
\header
\o {2,1} Getting an Overview
\row
@@ -56,7 +56,7 @@
\keyword qt-mobile-demos
\section1 Mobile Applications
- These are demonstrations of some of the capabilities of \l{Qt Quick} and
+ These are demonstrations of some of the capabilities of \l{Qt Quick} and
\l{external: Qt Mobility Manual}{Mobility} to create feature rich mobile
applications.
\list
@@ -116,19 +116,19 @@
\list
\o \l{demos/mainwindow}{Main Window} shows Qt's extensive support for main window
features, such as tool bars, dock windows, and menus.
- \o \l{demos/macmainwindow}{Mac Main Window} shows how to create main window applications that has
+ \o \l{demos/macmainwindow}{Mac Main Window} shows how to create main window applications that has
the same appearance as other Mac OS X applications.
\endlist
\section1 Graphics View
\list
- \o \l{demos/chip}{40000 Chips} uses the \l{Graphics View Framework} to
- efficiently display a large number of individual graphical items on
- a scrolling canvas and highlighting features including rotation,
+ \o \l{demos/chip}{40000 Chips} uses the \l{Graphics View Framework} to
+ efficiently display a large number of individual graphical items on
+ a scrolling canvas and highlighting features including rotation,
zooming, level of detail control, and item selection.
- \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's
- \e{Widgets on the Canvas} feature by embedding several
+ \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's
+ \e{Widgets on the Canvas} feature by embedding several
fully-functional dialogs in a scene.
\o \l{demos/boxes}{Boxes} showcases Qt's OpenGL support and the
integration with the \l{Graphics View Framework}.