diff options
Diffstat (limited to 'src/panels/information/phononwidget.h')
| -rw-r--r-- | src/panels/information/phononwidget.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/panels/information/phononwidget.h b/src/panels/information/phononwidget.h index 971e8c731..b9e7d4f05 100644 --- a/src/panels/information/phononwidget.h +++ b/src/panels/information/phononwidget.h @@ -43,14 +43,22 @@ class PhononWidget : public QWidget { Q_OBJECT public: + + enum MediaKind { + Video, + Audio + }; + explicit PhononWidget(QWidget *parent = nullptr); - void setUrl(const QUrl &url); + void setUrl(const QUrl &url, MediaKind kind); QUrl url() const; void setVideoSize(const QSize& size); QSize videoSize() const; + void setAutoPlay(bool autoPlay); + signals: /** * Is emitted whenever the video-state @@ -62,15 +70,17 @@ class PhononWidget : public QWidget */ void hasVideoChanged(bool hasVideo); + public slots: + void play(); + protected: void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; private slots: - void stateChanged(Phonon::State); - void play(); + void stateChanged(Phonon::State newstate); void stop(); - void slotHasVideoChanged(bool); + void finished(); private: void applyVideoSize(); @@ -87,6 +97,8 @@ class PhononWidget : public QWidget Phonon::SeekSlider *m_seekSlider; Phonon::AudioOutput *m_audioOutput; EmbeddedVideoPlayer *m_videoPlayer; + bool m_autoPlay; + bool m_isVideo; }; #endif // PHONONWIDGET_H |
