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 MEDIAOBJECTITEM_H
21 #define MEDIAOBJECTITEM_H
23 #include "titlewidget.h"
24 #include "chapterwidget.h"
25 #include "anglewidget.h"
26 #include "navigationwidget.h"
27 #include <Phonon/Global>
28 #include <Phonon/MediaObject>
29 #include <Phonon/SeekSlider>
30 #include <QtCore/QPointer>
31 #include <QtGui/QLabel>
32 #include <QtGui/QProgressBar>
33 #include <QtGui/QToolButton>
36 using Phonon::MediaNode
;
37 using Phonon::SeekSlider
;
38 using Phonon::MediaObject
;
40 class MediaObjectItem
: public QWidget
46 MediaNode
*mediaNode() { return &m_media
; }
47 const MediaNode
*mediaNode() const { return &m_media
; }
50 void loadUrl(const QString
&);
51 void updateMetaData();
54 void showTitleWidget(bool);
55 void showChapterWidget(bool);
56 void showAngleWidget(bool);
57 void showNavigationWidget(bool);
58 void stateChanged(Phonon::State newstate
, Phonon::State oldstate
);
59 void length(qint64 ms
);
61 void slotPrefinishMarkReached(qint32 remaining
);
65 SeekSlider
*m_seekslider
;
69 QPushButton
*m_titleButton
;
70 QPushButton
*m_chapterButton
;
71 QPushButton
*m_angleButton
;
72 QPushButton
*m_navigationButton
;
74 QProgressBar
*m_bufferProgress
;
76 QLabel
*m_currenttime
;
77 QLabel
*m_remainingtime
;
78 QLabel
*m_metaDataLabel
;
81 TitleWidget
*m_titleWidget
;
82 ChapterWidget
*m_chapterWidget
;
83 AngleWidget
*m_angleWidget
;
84 NavigationWidget
*m_navigationWidget
;
85 QPointer
<MediaController
> m_mediaController
;
88 #endif // MEDIAOBJECTITEM_H