X-Git-Url: http://git.tdb.fi/?p=xinema.git;a=blobdiff_plain;f=remote%2Fsource%2Fstreamcontrolitem.h;h=cb08836c69ca0a21327832057069202b5405020d;hp=5b9b2bc0bac7111ce66ef1802468e7edee4e16e4;hb=4dd3070fa50882b7ec7a26f7d0994c064c6b29d6;hpb=a1e6d14ce3a5d5415333a4d3def6c5504f4bc49b diff --git a/remote/source/streamcontrolitem.h b/remote/source/streamcontrolitem.h index 5b9b2bc..cb08836 100644 --- a/remote/source/streamcontrolitem.h +++ b/remote/source/streamcontrolitem.h @@ -2,6 +2,7 @@ #define STREAMCONTROLITEM_H_ #include +#include "xinemacontrol.h" class XinemaControlItem; @@ -10,9 +11,20 @@ class StreamControlItem: public QQuickItem Q_OBJECT Q_PROPERTY(XinemaControlItem *control READ get_control WRITE set_control NOTIFY control_changed) + Q_PROPERTY(PlaybackState playbackState READ get_playback_state WRITE set_playback_state NOTIFY playback_state_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) + Q_PROPERTY(float position READ get_position WRITE set_position NOTIFY position_changed) + + Q_ENUMS(PlaybackState) + +public: + enum PlaybackState + { + Stopped = XinemaControl::STOPPED, + Paused = XinemaControl::PAUSED, + Playing = XinemaControl::PLAYING + }; private: XinemaControlItem *control; @@ -23,12 +35,16 @@ public: void set_control(XinemaControlItem *); XinemaControlItem *get_control() const { return control; } + PlaybackState get_playback_state() const; + void set_playback_state(PlaybackState); QString get_title() const; float get_duration() const; + void set_position(float); float get_position() const; signals: void control_changed(); + void playback_state_changed(); void title_changed(); void duration_changed(); void position_changed();