phonon/volumeslider.h Source File

volumeslider.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2006-2007 Matthias Kretz <kretz@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), Nokia Corporation
10  (or its successors, if any) and the KDE Free Qt Foundation, which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef PHONON_UI_VOLUMESLIDER_H
24 #define PHONON_UI_VOLUMESLIDER_H
25 
26 #include "phonon_export.h"
27 #include "phonondefs.h"
28 #include <QtGui/QWidget>
29 
32 
33 #ifndef QT_NO_PHONON_VOLUMESLIDER
34 
35 namespace Phonon
36 {
37 class AudioOutput;
38 class VolumeSliderPrivate;
39 
47 {
48  Q_OBJECT
55  Q_PROPERTY(qreal maximumVolume READ maximumVolume WRITE setMaximumVolume)
61  Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
62 
71  Q_PROPERTY(bool tracking READ hasTracking WRITE setTracking)
72 
81  Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
82 
91  Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
92 
98  Q_PROPERTY(bool muteVisible READ isMuteVisible WRITE setMuteVisible)
99 
105  Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
106  public:
110  explicit VolumeSlider(QWidget *parent = 0);
111  explicit VolumeSlider(AudioOutput *, QWidget *parent = 0);
112  ~VolumeSlider();
113 
114  bool hasTracking() const;
115  void setTracking(bool tracking);
116  int pageStep() const;
117  void setPageStep(int milliseconds);
118  int singleStep() const;
119  void setSingleStep(int milliseconds);
120  bool isMuteVisible() const;
121  QSize iconSize() const;
122  qreal maximumVolume() const;
123  Qt::Orientation orientation() const;
124  AudioOutput *audioOutput() const;
125 
126  public Q_SLOTS:
127  void setMaximumVolume(qreal);
128  void setOrientation(Qt::Orientation);
129  void setMuteVisible(bool);
130  void setIconSize(const QSize &size);
131 
135  void setAudioOutput(Phonon::AudioOutput *);
136 
137  protected:
138  VolumeSliderPrivate *const k_ptr;
139 
140  private:
141  Q_PRIVATE_SLOT(k_ptr, void _k_sliderChanged(int))
142  Q_PRIVATE_SLOT(k_ptr, void _k_volumeChanged(qreal))
143  Q_PRIVATE_SLOT(k_ptr, void _k_mutedChanged(bool))
144  Q_PRIVATE_SLOT(k_ptr, void _k_buttonClicked())
145 };
146 
147 } // namespace Phonon
148 
149 #endif //QT_NO_PHONON_VOLUMESLIDER
150 
153 
154 // vim: sw=4 ts=4 et
155 #endif // PHONON_UI_VOLUMESLIDER_H
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define Q_PROPERTY(text)
Definition: qobjectdefs.h:80
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
Definition: qnamespace.h:54
#define Q_PRIVATE_SLOT(d, signature)
Definition: qobjectdefs.h:73
#define Q_SLOTS
Definition: qobjectdefs.h:71
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
Widget providing a slider to control the volume of an AudioOutput.
Definition: volumeslider.h:46
Orientation
Definition: qnamespace.h:174
#define Q_OBJECT
Definition: qobjectdefs.h:157
Definition: qsize.h:53
The KDE Multimedia classes.
Class for audio output to the soundcard.
Definition: audiooutput.h:50
#define K_DECLARE_PRIVATE(Class)
Definition: phonondefs.h:46
#define PHONON_EXPORT
Definition: phonon_export.h:38
#define QT_END_HEADER
Definition: qglobal.h:142
GLsizeiptr size
Definition: GLee.h:1561