+/* $BEGIN_LICENSE
+
+This file is part of Minitube.
+Copyright 2009, Flavio Tordini <flavio.tordini@gmail.com>
+
+Minitube is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Minitube is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Minitube. If not, see <http://www.gnu.org/licenses/>.
+
+$END_LICENSE */
+
#ifndef __MEDIAVIEW_H__
#define __MEDIAVIEW_H__
const QList<VideoSource*> & getHistory() { return history; }
int getHistoryIndex();
PlaylistModel* getPlaylistModel() { return playlistModel; }
- Video* getCurrentVideo();
+ const QString &getCurrentVideoId();
+ void updateSubscriptionAction(Video *video, bool subscribed);
+ VideoAreaWidget* getVideoArea() { return videoAreaWidget; }
public slots:
void search(SearchParams *searchParams);
void openWebPage();
void copyWebPage();
void copyVideoLink();
+ void openInBrowser();
void shareViaTwitter();
void shareViaFacebook();
void shareViaBuffer();
void setPlaylistVisible(bool visible=true);
void saveSplitterState();
void downloadVideo();
- void snapshot();
+ // void snapshot();
void fullscreen();
void findVideoParts();
void relatedVideos();
void goBack();
bool canGoForward();
void goForward();
+ void toggleSubscription();
private slots:
// list/model
void handleError(QString message);
// phonon
void stateChanged(Phonon::State newState, Phonon::State oldState);
- void currentSourceChanged(const Phonon::MediaSource source);
void aboutToFinish();
#ifdef APP_ACTIVATION
void demoMessage();
void playbackResume();
void authorPushed(QModelIndex);
void searchAgain();
-
- /*
- void downloadProgress(int percent);
void sliderMoved(int value);
- void seekTo(int value);
- */
+ qint64 offsetToTime(qint64 offset);
+ void startDownloading();
private:
MediaView(QWidget *parent = 0);
SearchParams* getSearchParams();
+
static QRegExp wordRE(QString s);
QSplitter *splitter;
Phonon::MediaObject *mediaObject;
Phonon::VideoWidget *videoWidget;
- bool reallyStopped;
+ bool stopped;
QTimer *errorTimer;
Video *skippedVideo;
+ QString currentVideoId;
#ifdef APP_ACTIVATION
QTimer *demoTimer;
DownloadItem *downloadItem;
QList<VideoSource*> history;
+ QList<QAction*> currentVideoActions;
+
+ qint64 currentVideoSize;
};
#endif // __MEDIAVIEW_H__