summaryrefslogtreecommitdiffstats
path: root/examples/widgets/symbianvibration/xqvibra.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/symbianvibration/xqvibra.h')
-rw-r--r--examples/widgets/symbianvibration/xqvibra.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/examples/widgets/symbianvibration/xqvibra.h b/examples/widgets/symbianvibration/xqvibra.h
new file mode 100644
index 0000000000..5520d08a06
--- /dev/null
+++ b/examples/widgets/symbianvibration/xqvibra.h
@@ -0,0 +1,61 @@
+#ifndef XQVIBRA_H
+#define XQVIBRA_H
+
+// INCLUDES
+#include <QObject>
+
+// FORWARD DECLARATIONS
+class XQVibraPrivate;
+
+// CLASS DECLARATION
+//! [0]
+class XQVibra : public QObject
+{
+ Q_OBJECT
+
+public:
+ static const int InfiniteDuration = 0;
+ static const int MaxIntensity = 100;
+ static const int MinIntensity = -100;
+
+ enum Error {
+ NoError = 0,
+ OutOfMemoryError,
+ ArgumentError,
+ VibraInUseError,
+ HardwareError,
+ TimeOutError,
+ VibraLockedError,
+ AccessDeniedError,
+ UnknownError = -1
+ };
+
+ enum Status {
+ StatusNotAllowed = 0,
+ StatusOff,
+ StatusOn
+ };
+
+ XQVibra(QObject *parent = 0);
+ ~XQVibra();
+
+ XQVibra::Status currentStatus() const;
+ XQVibra::Error error() const;
+
+Q_SIGNALS:
+ void statusChanged(XQVibra::Status status);
+
+public Q_SLOTS:
+ bool start(int duration = InfiniteDuration);
+ bool stop();
+ bool setIntensity(int intensity);
+
+private:
+ friend class XQVibraPrivate;
+ XQVibraPrivate *d;
+};
+//! [0]
+
+#endif // XQVIBRA_H
+
+// End of file