1 #ifndef STREAMCONTROLITEM_H_
2 #define STREAMCONTROLITEM_H_
5 #include "xinemacontrol.h"
7 class XinemaControlItem;
9 class StreamControlItem: public QQuickItem
13 Q_PROPERTY(XinemaControlItem *control READ get_control WRITE set_control NOTIFY control_changed)
14 Q_PROPERTY(PlaybackState playbackState READ get_playback_state WRITE set_playback_state NOTIFY playback_state_changed)
15 Q_PROPERTY(QString title READ get_title NOTIFY title_changed)
16 Q_PROPERTY(float duration READ get_duration NOTIFY duration_changed)
17 Q_PROPERTY(float position READ get_position WRITE set_position NOTIFY position_changed)
19 Q_ENUMS(PlaybackState)
24 Stopped = XinemaControl::STOPPED,
25 Paused = XinemaControl::PAUSED,
26 Playing = XinemaControl::PLAYING
30 XinemaControlItem *control;
35 void set_control(XinemaControlItem *);
36 XinemaControlItem *get_control() const { return control; }
38 PlaybackState get_playback_state() const;
39 void set_playback_state(PlaybackState);
40 QString get_title() const;
41 float get_duration() const;
42 void set_position(float);
43 float get_position() const;
46 void control_changed();
47 void playback_state_changed();
49 void duration_changed();
50 void position_changed();