summaryrefslogtreecommitdiffstats
path: root/examples/widgets/maemovibration/mcevibrator.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/maemovibration/mcevibrator.h')
-rw-r--r--examples/widgets/maemovibration/mcevibrator.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/widgets/maemovibration/mcevibrator.h b/examples/widgets/maemovibration/mcevibrator.h
new file mode 100644
index 0000000000..5aac87d9c6
--- /dev/null
+++ b/examples/widgets/maemovibration/mcevibrator.h
@@ -0,0 +1,31 @@
+#ifndef MCEVIBRATOR_H
+#define MCEVIBRATOR_H
+
+#include <QObject>
+#include <QTextStream>
+#include <QDBusInterface>
+
+//! [0]
+class MceVibrator : public QObject
+{
+ Q_OBJECT
+public:
+ explicit MceVibrator(QObject *parent = 0);
+ ~MceVibrator();
+
+ static const char defaultMceFilePath[];
+ static QStringList parsePatternNames(QTextStream &stream);
+
+public slots:
+ void vibrate(const QString &patternName);
+
+private:
+ void deactivate(const QString &patternName);
+
+ QDBusInterface mceInterface;
+ QString lastPatternName;
+};
+//! [0]
+
+#endif // MCEVIBRATOR_H
+