summaryrefslogtreecommitdiff
path: root/examples/sensors/grue/lib/gruesensor.cpp
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2013-08-13 14:40:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-14 21:03:53 +0200
commit52c831db165f5068826dddef4d41427a98a42dfd (patch)
tree6d79c1c09ca5894fc3beb3f9627047f9cff6e435 /examples/sensors/grue/lib/gruesensor.cpp
parent6dd954f2b9ce1f241d968d201183f8a80d729e57 (diff)
downloadqtsensors-52c831db165f5068826dddef4d41427a98a42dfd.tar.gz
Doc: Update Grue Sensor example
Fix a number of issues with the example: - Add \omit to generated doc sections, we don't want qdoc to process these (not part of Qt docs) - Combine the 5 separate examples into a single \example and discuss each subproject in a subsection - Add example image to doc - Fix deployment/build target directories and import paths - Define a 'reading' property for the sensor to make it work on QtSensors 5.1 - Fix the Grue QML application to avoid flicker from frequent updates. Task-number: QTBUG-32881 Change-Id: I2785faead1baaf5b1ae9d05df3398e018e945418 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'examples/sensors/grue/lib/gruesensor.cpp')
-rw-r--r--examples/sensors/grue/lib/gruesensor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/sensors/grue/lib/gruesensor.cpp b/examples/sensors/grue/lib/gruesensor.cpp
index c1e98e7..9787dc5 100644
--- a/examples/sensors/grue/lib/gruesensor.cpp
+++ b/examples/sensors/grue/lib/gruesensor.cpp
@@ -44,6 +44,7 @@
IMPLEMENT_READING(GrueSensorReading)
/*
+ \omit
\class GrueSensorReading
\brief The GrueSensorReading class holds readings from the Grue sensor.
@@ -64,6 +65,7 @@ IMPLEMENT_READING(GrueSensorReading)
it is, the more likely you are to be eaten by a Grue. The longer you
stay in a dark area, the more likely you are to be eaten by a Grue.
If you are in a lit room, the probability will be 0 as Grues fear light.
+ \endomit
*/
int GrueSensorReading::chanceOfBeingEaten() const
@@ -81,25 +83,30 @@ void GrueSensorReading::setChanceOfBeingEaten(int chanceOfBeingEaten)
// begin generated code
/*
+ \omit
\class GrueFilter
\brief The GrueFilter class is a convenience wrapper around QSensorFilter.
The only difference is that the filter() method features a pointer to GrueSensorReading
instead of QSensorReading.
+ \endomit
*/
/*
+ \omit
\fn GrueFilter::filter(GrueSensorReading *reading)
Called when \a reading changes. Returns false to prevent the reading from propagating.
\sa QSensorFilter::filter()
+ \endomit
*/
char const * const GrueSensor::type("GrueSensor");
/*
+ \omit
\class GrueSensor
\brief The GrueSensor class is a convenience wrapper around QSensor.
@@ -111,12 +118,15 @@ char const * const GrueSensor::type("GrueSensor");
For details about how the sensor works, see \l GrueSensorReading.
\sa GrueSensorReading
+ \endomit
*/
/*
+ \omit
\fn GrueSensor::GrueSensor(QObject *parent)
Construct the sensor as a child of \a parent.
+ \endomit
*/
/*
@@ -126,11 +136,13 @@ char const * const GrueSensor::type("GrueSensor");
*/
/*
+ \omit
\fn GrueSensor::reading() const
Returns the reading class for this sensor.
\sa QSensor::reading()
+ \endomit
*/
// end generated code