Changeset View
Changeset View
Standalone View
Standalone View
src/panels/information/phononwidget.h
Show All 39 Lines | |||||
40 | class QVBoxLayout; | 40 | class QVBoxLayout; | ||
41 | 41 | | |||
42 | class PhononWidget : public QWidget | 42 | class PhononWidget : public QWidget | ||
43 | { | 43 | { | ||
44 | Q_OBJECT | 44 | Q_OBJECT | ||
45 | public: | 45 | public: | ||
46 | explicit PhononWidget(QWidget *parent = nullptr); | 46 | explicit PhononWidget(QWidget *parent = nullptr); | ||
47 | 47 | | |||
48 | void setUrl(const QUrl &url); | 48 | void setUrl(const QUrl &url); | ||
elvisangelaccio: bool arguments in API should be avoided in favor of enums. | |||||
49 | QUrl url() const; | 49 | QUrl url() const; | ||
50 | 50 | | |||
51 | void setVideoSize(const QSize& size); | 51 | void setVideoSize(const QSize& size); | ||
52 | QSize videoSize() const; | 52 | QSize videoSize() const; | ||
53 | 53 | | |||
54 | void setAutoPlay(bool autoPlay); | ||||
55 | | ||||
54 | signals: | 56 | signals: | ||
55 | /** | 57 | /** | ||
56 | * Is emitted whenever the video-state | 58 | * Is emitted whenever the video-state | ||
57 | * has changed: If true is returned, a video | 59 | * has changed: If true is returned, a video | ||
58 | * including control-buttons will be shown. | 60 | * including control-buttons will be shown. | ||
59 | * If false is returned, no video is shown | 61 | * If false is returned, no video is shown | ||
60 | * and the control-buttons are available for | 62 | * and the control-buttons are available for | ||
61 | * audio only. | 63 | * audio only. | ||
Show All 20 Lines | 80 | private: | |||
82 | QToolButton *m_playButton; | 84 | QToolButton *m_playButton; | ||
83 | QToolButton *m_stopButton; | 85 | QToolButton *m_stopButton; | ||
84 | 86 | | |||
85 | QVBoxLayout *m_topLayout; | 87 | QVBoxLayout *m_topLayout; | ||
86 | Phonon::MediaObject *m_media; | 88 | Phonon::MediaObject *m_media; | ||
87 | Phonon::SeekSlider *m_seekSlider; | 89 | Phonon::SeekSlider *m_seekSlider; | ||
88 | Phonon::AudioOutput *m_audioOutput; | 90 | Phonon::AudioOutput *m_audioOutput; | ||
89 | EmbeddedVideoPlayer *m_videoPlayer; | 91 | EmbeddedVideoPlayer *m_videoPlayer; | ||
92 | bool m_autoPlay; | ||||
90 | }; | 93 | }; | ||
91 | 94 | | |||
92 | #endif // PHONONWIDGET_H | 95 | #endif // PHONONWIDGET_H |
bool arguments in API should be avoided in favor of enums.