delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / phonon / tests / guitest / mediaobjectitem.h
blob364f6de8fcb080e09b56510ff431784dd507a538
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>
34 class QPushButton;
36 using Phonon::MediaNode;
37 using Phonon::SeekSlider;
38 using Phonon::MediaObject;
40 class MediaObjectItem : public QWidget
42 Q_OBJECT
43 public:
44 MediaObjectItem();
46 MediaNode *mediaNode() { return &m_media; }
47 const MediaNode *mediaNode() const { return &m_media; }
49 private slots:
50 void loadUrl(const QString &);
51 void updateMetaData();
52 void openCD();
53 void openDVD();
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);
60 void slotFinished();
61 void slotPrefinishMarkReached(qint32 remaining);
62 void tick(qint64 t);
64 private:
65 SeekSlider *m_seekslider;
66 QToolButton *m_play;
67 QToolButton *m_pause;
68 QToolButton *m_stop;
69 QPushButton *m_titleButton;
70 QPushButton *m_chapterButton;
71 QPushButton *m_angleButton;
72 QPushButton *m_navigationButton;
73 QLabel *m_statelabel;
74 QProgressBar *m_bufferProgress;
75 QLabel *m_totaltime;
76 QLabel *m_currenttime;
77 QLabel *m_remainingtime;
78 QLabel *m_metaDataLabel;
79 MediaObject m_media;
80 qint64 m_length;
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