00001 /* This file is part of the KDE project 00002 Copyright (C) 2006-2007 Matthias Kretz <kretz@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), Nokia Corporation 00010 (or its successors, if any) and the KDE Free Qt Foundation, which shall 00011 act as a proxy defined in Section 6 of version 3 of the license. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #ifndef PHONON_UI_SEEKSLIDER_H 00024 #define PHONON_UI_SEEKSLIDER_H 00025 00026 #include "phonon_export.h" 00027 #include "phonondefs.h" 00028 #include "phononnamespace.h" 00029 #include <QtGui/QWidget> 00030 00031 QT_BEGIN_HEADER 00032 QT_BEGIN_NAMESPACE 00033 00034 #ifndef QT_NO_PHONON_SEEKSLIDER 00035 00036 namespace Phonon 00037 { 00038 class MediaObject; 00039 00040 class SeekSliderPrivate; 00041 00048 class PHONON_EXPORT SeekSlider : public QWidget 00049 { 00050 Q_OBJECT 00051 K_DECLARE_PRIVATE(SeekSlider) 00058 Q_PROPERTY(bool iconVisible READ isIconVisible WRITE setIconVisible) 00059 00068 Q_PROPERTY(bool tracking READ hasTracking WRITE setTracking) 00069 00078 Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep) 00079 00088 Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep) 00089 00095 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) 00096 00102 Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize) 00103 00104 public: 00108 explicit SeekSlider(QWidget *parent = 0); 00109 explicit SeekSlider(MediaObject *media, QWidget *parent = 0); 00110 00114 ~SeekSlider(); 00115 00116 bool hasTracking() const; 00117 void setTracking(bool tracking); 00118 int pageStep() const; 00119 void setPageStep(int milliseconds); 00120 int singleStep() const; 00121 void setSingleStep(int milliseconds); 00122 Qt::Orientation orientation() const; 00123 bool isIconVisible() const; 00124 QSize iconSize() const; 00125 MediaObject *mediaObject() const; 00126 00127 public Q_SLOTS: 00128 void setOrientation(Qt::Orientation); 00129 void setIconVisible(bool); 00130 void setIconSize(const QSize &size); 00131 00135 void setMediaObject(MediaObject *); 00136 00137 protected: 00138 SeekSliderPrivate *const k_ptr; 00139 00140 private: 00141 Q_PRIVATE_SLOT(k_func(), void _k_stateChanged(Phonon::State)) 00142 Q_PRIVATE_SLOT(k_func(), void _k_seek(int)) 00143 Q_PRIVATE_SLOT(k_func(), void _k_tick(qint64)) 00144 Q_PRIVATE_SLOT(k_func(), void _k_length(qint64)) 00145 Q_PRIVATE_SLOT(k_func(), void _k_seekableChanged(bool)) 00146 Q_PRIVATE_SLOT(k_func(), void _k_currentSourceChanged()) 00147 }; 00148 00149 } // namespace Phonon 00150 00151 #endif //QT_NO_PHONON_SEEKSLIDER 00152 00153 QT_END_NAMESPACE 00154 QT_END_HEADER 00155 00156 // vim: sw=4 ts=4 tw=80 00157 #endif // PHONON_UI_SEEKSLIDER_H