]>
cloud.milkyroute.net Git - dolphin.git/blob - src/panels/information/phononwidget.h
1 /* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #ifndef PHONONWIDGET_H
22 #define PHONONWIDGET_H
24 #include <Phonon/Global>
38 class EmbeddedVideoPlayer
;
42 class PhononWidget
: public QWidget
52 explicit PhononWidget(QWidget
*parent
= nullptr);
54 void setUrl(const QUrl
&url
, MediaKind kind
);
58 void setVideoSize(const QSize
& size
);
59 QSize
videoSize() const;
60 Phonon::State
state() const;
62 void setAutoPlay(bool autoPlay
);
63 bool eventFilter(QObject
*object
, QEvent
*event
) override
;
67 * Is emitted whenever the video-state
68 * has changed: If true is returned, a video
69 * including control-buttons will be shown.
70 * If false is returned, no video is shown
71 * and the control-buttons are available for
74 void hasVideoChanged(bool hasVideo
);
80 void showEvent(QShowEvent
*event
) override
;
81 void hideEvent(QHideEvent
*event
) override
;
84 void stateChanged(Phonon::State newstate
);
89 void applyVideoSize();
95 QToolButton
*m_playButton
;
96 QToolButton
*m_stopButton
;
98 QVBoxLayout
*m_topLayout
;
99 Phonon::MediaObject
*m_media
;
100 Phonon::SeekSlider
*m_seekSlider
;
101 Phonon::AudioOutput
*m_audioOutput
;
102 EmbeddedVideoPlayer
*m_videoPlayer
;
107 #endif // PHONONWIDGET_H