summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/sensors/mybackend.h
diff options
context:
space:
mode:
authorLincoln Ramsay <lincoln.ramsay@nokia.com>2010-03-08 13:42:18 +1000
committerLincoln Ramsay <lincoln.ramsay@nokia.com>2010-03-08 13:42:56 +1000
commit98a5e032e94ba77bb67a615e2042462b5e6f2923 (patch)
tree2a344b2d3d08bbc77d4b5ac3228b7c65a89bb1d3 /doc/src/snippets/sensors/mybackend.h
parentac758f6ec4667e22e62be4dd6a25975112abc972 (diff)
replace \code blocks with \snippet statements.
This will let the compiler notify us when our example snippets are no longer valid.
Diffstat (limited to 'doc/src/snippets/sensors/mybackend.h')
-rw-r--r--doc/src/snippets/sensors/mybackend.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/snippets/sensors/mybackend.h b/doc/src/snippets/sensors/mybackend.h
new file mode 100644
index 0000000000..ea726aecf6
--- /dev/null
+++ b/doc/src/snippets/sensors/mybackend.h
@@ -0,0 +1,20 @@
+#ifndef MYBACKEND_H
+#define MYBACKEND_H
+
+#include <qaccelerometer.h>
+#include <qsensorbackend.h>
+
+QTM_USE_NAMESPACE
+
+class MyBackend : public QSensorBackend
+{
+public:
+ MyBackend(QSensor *sensor) : QSensorBackend(sensor) {}
+ void stop() {}
+ void start() {}
+ void poll() {}
+
+ static const char *id;
+};
+
+#endif