1 #ifndef __MEDIAVIEW_H__
2 #define __MEDIAVIEW_H__
6 #include <phonon/mediaobject.h>
7 #include <phonon/videowidget.h>
10 #include "thlibrary/thblackbar.h"
11 #include "searchparams.h"
12 #include "playlistwidget.h"
13 #include "loadingwidget.h"
14 #include "videoareawidget.h"
17 QMap<QString, QAction*>* globalActions();
20 class MediaView : public QWidget, public View {
24 MediaView(QWidget *parent);
32 QMap<QString, QVariant> metadata() {
33 QMap<QString, QVariant> metadata;
35 metadata.insert("title", searchParams->keywords());
36 metadata.insert("description", tr("You're watching \"%1\"").arg(searchParams->keywords()));
41 void setMediaObject(Phonon::MediaObject *mediaObject);
44 void search(SearchParams *searchParams);
52 void removeSelected();
53 void moveUpSelected();
54 void moveDownSelected();
55 void setPlaylistVisible(bool visible=true);
56 void saveSplitterState();
62 void itemActivated(const QModelIndex &index);
63 void selectionChanged (const QItemSelection & selected, const QItemSelection & deselected);
64 void activeRowChanged(int);
65 void selectVideos(QList<Video*> videos);
66 void gotStreamUrl(QUrl streamUrl);
67 void handleError(QString message);
69 void stateChanged(Phonon::State newState, Phonon::State oldState);
70 void currentSourceChanged(const Phonon::MediaSource source);
71 void showVideoContextMenu(QPoint point);
73 void searchMostRelevant();
74 void searchMostRecent();
75 void searchMostViewed();
84 SearchParams *searchParams;
88 PlaylistWidget *playlistWidget;
94 QAction *mostRelevantAction;
95 QAction *mostRecentAction;
96 QAction *mostViewedAction;
99 Phonon::MediaObject *mediaObject;
100 Phonon::VideoWidget *videoWidget;
103 VideoAreaWidget *videoAreaWidget;
104 LoadingWidget *loadingWidget;
110 QTimer *workaroundTimer;
119 #endif // __MEDIAVIEW_H__