summaryrefslogtreecommitdiffstats
path: root/examples/mediaplayer/spengine.h
diff options
context:
space:
mode:
authorNoam Rosenthal <nrosenth@nokia.com>2009-06-08 12:27:03 -0700
committerNoam Rosenthal <nrosenth@nokia.com>2009-06-08 12:27:03 -0700
commitd0441f605434a89b53735427e4e81182c65debbd (patch)
treeb96d25dc89cdb523c007a22bc0deed3a5aa5dd56 /examples/mediaplayer/spengine.h
parenta6553f68f17c28adca049857686496a69b4c1e7a (diff)
scxml for 4.6
Diffstat (limited to 'examples/mediaplayer/spengine.h')
-rw-r--r--examples/mediaplayer/spengine.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/examples/mediaplayer/spengine.h b/examples/mediaplayer/spengine.h
new file mode 100644
index 0000000..3134b75
--- /dev/null
+++ b/examples/mediaplayer/spengine.h
@@ -0,0 +1,41 @@
+#ifndef SPENGINE_H
+#define SPENGINE_H
+#include <QObject>
+#include <QUrl>
+class SPEngine : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int totalTime READ totalTime)
+ Q_PROPERTY(int currentTime READ currentTime)
+ Q_PROPERTY(int volume READ volume WRITE setVolume)
+
+ Q_SIGNALS:
+ void aboutToFinish();
+ void tick(qint64);
+ void totalTimeChanged(qint64);
+ void volumeChanged(int);
+
+ public Q_SLOTS:
+ void clearQueue();
+ void enqueue (const QUrl &);
+ void setTrack(const QUrl &);
+ void play();
+ void pause();
+ void seek(qint64);
+ void stop ();
+
+ protected Q_SLOTS:
+ void onVolumeChanged(qreal);
+
+ public:
+ SPEngine(QObject*);
+ virtual ~SPEngine ();
+ int currentTime () const;
+ int totalTime () const;
+ void setVolume(int);
+ int volume () const;
+
+ private:
+ class SPEnginePvt* pvt;
+};
+#endif