]> git.tdb.fi Git - xinema.git/blobdiff - remote/source/streamcontrolitem.h
Display a playback page on the remote after selecting a file
[xinema.git] / remote / source / streamcontrolitem.h
diff --git a/remote/source/streamcontrolitem.h b/remote/source/streamcontrolitem.h
new file mode 100644 (file)
index 0000000..5b9b2bc
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef STREAMCONTROLITEM_H_
+#define STREAMCONTROLITEM_H_
+
+#include <QQuickItem>
+
+class XinemaControlItem;
+
+class StreamControlItem: public QQuickItem
+{
+       Q_OBJECT
+
+       Q_PROPERTY(XinemaControlItem *control READ get_control WRITE set_control NOTIFY control_changed)
+       Q_PROPERTY(QString title READ get_title NOTIFY title_changed)
+       Q_PROPERTY(float duration READ get_duration NOTIFY duration_changed)
+       Q_PROPERTY(float position READ get_position NOTIFY position_changed)
+
+private:
+       XinemaControlItem *control;
+
+public:
+       StreamControlItem();
+
+       void set_control(XinemaControlItem *);
+       XinemaControlItem *get_control() const { return control; }
+
+       QString get_title() const;
+       float get_duration() const;
+       float get_position() const;
+
+signals:
+       void control_changed();
+       void title_changed();
+       void duration_changed();
+       void position_changed();
+};
+
+#endif