]> cloud.milkyroute.net Git - dolphin.git/blob - src/panels/information/phononwidget.h
Postpone the creating of the media object until the play- or stop-button has been...
[dolphin.git] / src / panels / information / phononwidget.h
1 /* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
3
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.
8
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.
13
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
17 02110-1301, USA.
18
19 */
20
21 #ifndef PHONONWIDGET_H
22 #define PHONONWIDGET_H
23
24 #include <kurl.h>
25
26 #include <QtGui/QWidget>
27
28 #include <Phonon/Global>
29
30 namespace Phonon
31 {
32 class MediaObject;
33 class SeekSlider;
34 } // namespace Phonon
35
36 class QToolButton;
37
38 class PhononWidget : public QWidget
39 {
40 Q_OBJECT
41 public:
42 PhononWidget(QWidget *parent = 0);
43 void setUrl(const KUrl &url);
44
45 private slots:
46 void stateChanged(Phonon::State);
47 void play();
48 void stop();
49
50 private:
51 void requestMedia();
52
53 private:
54 KUrl m_url;
55 QToolButton *m_playButton;
56 QToolButton *m_stopButton;
57 Phonon::MediaObject *m_media;
58 Phonon::SeekSlider *m_seekSlider;
59 };
60
61 #endif // PHONONWIDGET_H