phonon/seekslider.h Source File

seekslider.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_SEEKSLIDER_H
24 #define PHONON_UI_SEEKSLIDER_H
25 
26 #include "phonon_export.h"
27 #include "phonondefs.h"
28 #include "phononnamespace.h"
29 #include <QtGui/QWidget>
30 
33 
34 #ifndef QT_NO_PHONON_SEEKSLIDER
35 
36 namespace Phonon
37 {
38 class MediaObject;
39 
40 class SeekSliderPrivate;
41 
49 {
50  Q_OBJECT
58  Q_PROPERTY(bool iconVisible READ isIconVisible WRITE setIconVisible)
59 
68  Q_PROPERTY(bool tracking READ hasTracking WRITE setTracking)
69 
78  Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
79 
88  Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
89 
95  Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
96 
102  Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
103 
104  public:
108  explicit SeekSlider(QWidget *parent = 0);
109  explicit SeekSlider(MediaObject *media, QWidget *parent = 0);
110 
114  ~SeekSlider();
115 
116  bool hasTracking() const;
117  void setTracking(bool tracking);
118  int pageStep() const;
119  void setPageStep(int milliseconds);
120  int singleStep() const;
121  void setSingleStep(int milliseconds);
122  Qt::Orientation orientation() const;
123  bool isIconVisible() const;
124  QSize iconSize() const;
125  MediaObject *mediaObject() const;
126 
127  public Q_SLOTS:
128  void setOrientation(Qt::Orientation);
129  void setIconVisible(bool);
130  void setIconSize(const QSize &size);
131 
135  void setMediaObject(MediaObject *);
136 
137  protected:
138  SeekSliderPrivate *const k_ptr;
139 
140  private:
141  Q_PRIVATE_SLOT(k_func(), void _k_stateChanged(Phonon::State))
142  Q_PRIVATE_SLOT(k_func(), void _k_seek(int))
143  Q_PRIVATE_SLOT(k_func(), void _k_tick(qint64))
144  Q_PRIVATE_SLOT(k_func(), void _k_length(qint64))
145  Q_PRIVATE_SLOT(k_func(), void _k_seekableChanged(bool))
146  Q_PRIVATE_SLOT(k_func(), void _k_currentSourceChanged())
147 };
148 
149 } // namespace Phonon
150 
151 #endif //QT_NO_PHONON_SEEKSLIDER
152 
155 
156 // vim: sw=4 ts=4 tw=80
157 #endif // PHONON_UI_SEEKSLIDER_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
State
The state the media producing object is in at the moment.
long long qint64
Definition: qglobal.h:947
Definition: qnamespace.h:54
#define Q_PRIVATE_SLOT(d, signature)
Definition: qobjectdefs.h:73
#define Q_SLOTS
Definition: qobjectdefs.h:71
Widget providing a slider for seeking in MediaObject objects.
Definition: seekslider.h:48
Interface for media playback of a given URL.
Definition: mediaobject.h:84
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
Orientation
Definition: qnamespace.h:174
#define Q_OBJECT
Definition: qobjectdefs.h:157
Definition: qsize.h:53
The KDE Multimedia classes.
#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