summaryrefslogtreecommitdiffstats
path: root/examples/sensors/grue/lib
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sensors/grue/lib')
-rw-r--r--examples/sensors/grue/lib/gruesensor.cpp12
-rw-r--r--examples/sensors/grue/lib/gruesensor.h1
-rw-r--r--examples/sensors/grue/lib/lib.pro11
3 files changed, 18 insertions, 6 deletions
diff --git a/examples/sensors/grue/lib/gruesensor.cpp b/examples/sensors/grue/lib/gruesensor.cpp
index c1e98e7d..9787dc5b 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
diff --git a/examples/sensors/grue/lib/gruesensor.h b/examples/sensors/grue/lib/gruesensor.h
index c0596ea8..9b9469af 100644
--- a/examples/sensors/grue/lib/gruesensor.h
+++ b/examples/sensors/grue/lib/gruesensor.h
@@ -74,6 +74,7 @@ private:
class Q_GRUE_EXPORT GrueSensor : public QSensor
{
Q_OBJECT
+ Q_PROPERTY(GrueSensorReading* reading READ reading)
public:
explicit GrueSensor(QObject *parent = 0) : QSensor(GrueSensor::type, parent) {}
virtual ~GrueSensor() {}
diff --git a/examples/sensors/grue/lib/lib.pro b/examples/sensors/grue/lib/lib.pro
index 4d12062e..3442abe8 100644
--- a/examples/sensors/grue/lib/lib.pro
+++ b/examples/sensors/grue/lib/lib.pro
@@ -1,16 +1,15 @@
TEMPLATE = lib
TARGET = gruesensor
-# avoid going to release/debug subdirectory
-win32:DESTDIR = $$OUT_PWD
+DESTDIR = $$OUT_PWD/..
DEFINES *= QT_BUILD_GRUE_LIB
QT = core sensors
-HEADERS += gruesensor.h\
- gruesensor_p.h\
+HEADERS += gruesensor.h \
+ gruesensor_p.h
-SOURCES += gruesensor.cpp\
+SOURCES += gruesensor.cpp
-target.path=$$[QT_INSTALL_EXAMPLES]/qtsensors/grue
+target.path=$$[QT_INSTALL_EXAMPLES]/sensors/grue
INSTALLS += target