Changeset View
Changeset View
Standalone View
Standalone View
src/panels/information/phononwidget.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 47 | enum MediaKind { | |||
---|---|---|---|---|---|
48 | Video, | 48 | Video, | ||
49 | Audio | 49 | Audio | ||
50 | }; | 50 | }; | ||
51 | 51 | | |||
52 | explicit PhononWidget(QWidget *parent = nullptr); | 52 | explicit PhononWidget(QWidget *parent = nullptr); | ||
53 | 53 | | |||
54 | void setUrl(const QUrl &url, MediaKind kind); | 54 | void setUrl(const QUrl &url, MediaKind kind); | ||
55 | QUrl url() const; | 55 | QUrl url() const; | ||
56 | void clearUrl(); | ||||
56 | 57 | | |||
57 | void setVideoSize(const QSize& size); | 58 | void setVideoSize(const QSize& size); | ||
58 | QSize videoSize() const; | 59 | QSize videoSize() const; | ||
60 | Phonon::State state() const; | ||||
59 | 61 | | |||
60 | void setAutoPlay(bool autoPlay); | 62 | void setAutoPlay(bool autoPlay); | ||
63 | bool eventFilter(QObject *object, QEvent *event) override; | ||||
61 | 64 | | |||
62 | signals: | 65 | signals: | ||
63 | /** | 66 | /** | ||
64 | * Is emitted whenever the video-state | 67 | * Is emitted whenever the video-state | ||
65 | * has changed: If true is returned, a video | 68 | * has changed: If true is returned, a video | ||
66 | * including control-buttons will be shown. | 69 | * including control-buttons will be shown. | ||
67 | * If false is returned, no video is shown | 70 | * If false is returned, no video is shown | ||
68 | * and the control-buttons are available for | 71 | * and the control-buttons are available for | ||
69 | * audio only. | 72 | * audio only. | ||
70 | */ | 73 | */ | ||
71 | void hasVideoChanged(bool hasVideo); | 74 | void hasVideoChanged(bool hasVideo); | ||
72 | 75 | | |||
73 | public slots: | 76 | public slots: | ||
74 | void play(); | 77 | void play(); | ||
75 | 78 | | |||
elvisangelaccio: Why a slot? This is just a getter, isn't it? | |||||
76 | protected: | 79 | protected: | ||
77 | void showEvent(QShowEvent *event) override; | 80 | void showEvent(QShowEvent *event) override; | ||
78 | void hideEvent(QHideEvent *event) override; | 81 | void hideEvent(QHideEvent *event) override; | ||
79 | 82 | | |||
80 | private slots: | 83 | private slots: | ||
81 | void stateChanged(Phonon::State newstate); | 84 | void stateChanged(Phonon::State newstate); | ||
82 | void stop(); | 85 | void stop(); | ||
83 | void finished(); | 86 | void finished(); | ||
Show All 21 Lines |
Why a slot? This is just a getter, isn't it?