]>
cloud.milkyroute.net Git - dolphin.git/blob - src/panels/information/phononwidget.h
2 SPDX-FileCopyrightText: 2007 Matthias Kretz <kretz@kde.org>
4 SPDX-License-Identifier: GPL-2.0-or-later
10 #include <Phonon/Global>
24 class EmbeddedVideoPlayer
;
28 class PhononWidget
: public QWidget
38 explicit PhononWidget(QWidget
*parent
= nullptr);
40 void setUrl(const QUrl
&url
, MediaKind kind
);
44 void setVideoSize(const QSize
& size
);
45 QSize
videoSize() const;
46 Phonon::State
state() const;
48 void setAutoPlay(bool autoPlay
);
49 bool eventFilter(QObject
*object
, QEvent
*event
) override
;
53 * Is emitted whenever the video-state
54 * has changed: If true is returned, a video
55 * including control-buttons will be shown.
56 * If false is returned, no video is shown
57 * and the control-buttons are available for
60 void hasVideoChanged(bool hasVideo
);
66 void showEvent(QShowEvent
*event
) override
;
67 void hideEvent(QHideEvent
*event
) override
;
70 void stateChanged(Phonon::State newstate
);
75 void applyVideoSize();
78 void togglePlayback();
83 QToolButton
*m_playButton
;
84 QToolButton
*m_pauseButton
;
86 QVBoxLayout
*m_topLayout
;
87 Phonon::MediaObject
*m_media
;
88 Phonon::SeekSlider
*m_seekSlider
;
89 Phonon::AudioOutput
*m_audioOutput
;
90 EmbeddedVideoPlayer
*m_videoPlayer
;
95 #endif // PHONONWIDGET_H