]>
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
32 enum MediaKind
{ Video
, Audio
};
34 explicit PhononWidget(QWidget
*parent
= nullptr);
36 void setUrl(const QUrl
&url
, MediaKind kind
);
40 void setVideoSize(const QSize
&size
);
41 QSize
videoSize() const;
42 Phonon::State
state() const;
44 void setAutoPlay(bool autoPlay
);
45 bool eventFilter(QObject
*object
, QEvent
*event
) override
;
49 * Is emitted whenever the video-state
50 * has changed: If true is returned, a video
51 * including control-buttons will be shown.
52 * If false is returned, no video is shown
53 * and the control-buttons are available for
56 void hasVideoChanged(bool hasVideo
);
62 void showEvent(QShowEvent
*event
) override
;
63 void hideEvent(QHideEvent
*event
) override
;
66 void stateChanged(Phonon::State newstate
);
71 void applyVideoSize();
74 void togglePlayback();
79 QToolButton
*m_playButton
;
80 QToolButton
*m_pauseButton
;
82 QVBoxLayout
*m_topLayout
;
83 Phonon::MediaObject
*m_media
;
84 Phonon::SeekSlider
*m_seekSlider
;
85 Phonon::AudioOutput
*m_audioOutput
;
86 EmbeddedVideoPlayer
*m_videoPlayer
;
91 #endif // PHONONWIDGET_H