1 /* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
20 #ifndef PHONON_MEDIACONTROLS_P_H
21 #define PHONON_MEDIACONTROLS_P_H
23 #include "mediacontrols.h"
26 #include <Phonon/VolumeSlider>
27 #include <Phonon/SeekSlider>
28 #include <QtGui/QToolButton>
29 #include <QtGui/QBoxLayout>
33 class MediaControlsPrivate
35 Q_DECLARE_PUBLIC(MediaControls
)
37 MediaControlsPrivate(MediaControls
*parent
)
48 playButton
.setIconSize(QSize(32, 32));
49 playButton
.setIcon(KIcon("media-playback-start"));
50 playButton
.setToolTip(i18n("start playback"));
51 playButton
.setAutoRaise(true);
53 pauseButton
.setIconSize(QSize(32, 32));
54 pauseButton
.setIcon(KIcon("media-playback-pause"));
55 pauseButton
.setToolTip(i18n("pause playback"));
57 pauseButton
.setAutoRaise(true);
59 stopButton
.setIconSize(QSize(32, 32));
60 stopButton
.setIcon(KIcon("media-playback-stop"));
61 stopButton
.setToolTip(i18n("stop playback"));
62 stopButton
.setAutoRaise(true);
64 loopButton
.setIconSize(QSize(32, 32));
65 loopButton
.setIcon(KIcon("player_loop"));
66 loopButton
.setToolTip(i18n("loop: restarts playback at end"));
67 loopButton
.setAutoRaise(true);
68 loopButton
.setCheckable(true);
70 volumeSlider
.setOrientation(Qt::Horizontal
);
71 volumeSlider
.setFixedWidth(80);
76 layout
.addWidget(&playButton
);
77 layout
.addWidget(&pauseButton
);
78 layout
.addWidget(&stopButton
);
79 layout
.addWidget(&loopButton
);
81 layout
.addWidget(&seekSlider
, 1);
83 layout
.addWidget(&volumeSlider
);
89 QToolButton playButton
;
90 QToolButton pauseButton
;
91 QToolButton stopButton
;
92 QToolButton loopButton
;
93 SeekSlider seekSlider
;
94 VolumeSlider volumeSlider
;
98 void _k_stateChanged(Phonon::State
, Phonon::State
);
99 void _k_mediaDestroyed();
102 } // namespace Phonon
104 #endif // PHONON_MEDIACONTROLS_P_H
105 // vim: sw=4 sts=4 et tw=100