actions->insert("compactView", compactViewAct);
connect(compactViewAct, SIGNAL(toggled(bool)), this, SLOT(compactView(bool)));
+ /*
// icon should be document-save but it is ugly
downloadAct = new QAction(QtIconLoader::icon("go-down", QIcon(":/images/go-down.png")), tr("&Download"), this);
downloadAct->setStatusTip(tr("Download this video"));
downloadAct->setEnabled(false);
actions->insert("download", downloadAct);
connect(downloadAct, SIGNAL(triggered()), this, SLOT(download()));
+ */
webPageAct = new QAction(QtIconLoader::icon("internet-web-browser", QIcon(":/images/internet-web-browser.png")), tr("&YouTube"), this);
webPageAct->setStatusTip(tr("Open the YouTube video page"));
fileMenu = menuBar()->addMenu(tr("&Application"));
// menus->insert("file", fileMenu);
- /*
- fileMenu->addAction(settingsAct);
+ // fileMenu->addAction(settingsAct);
fileMenu->addSeparator();
- */
fileMenu->addAction(quitAct);
playlistMenu = menuBar()->addMenu(tr("&Playlist"));
viewMenu->addSeparator();
viewMenu->addAction(webPageAct);
viewMenu->addSeparator();
- viewMenu->addAction(downloadAct);
+ // viewMenu->addAction(downloadAct);
viewMenu->addAction(compactViewAct);
viewMenu->addAction(fullscreenAct);
compactViewAct->setEnabled(widget == mediaView);
webPageAct->setEnabled(widget == mediaView);
aboutAct->setEnabled(widget != aboutView);
+
+ /*
// this is not the best place to enable downloads, but the user is informed
// if there really is no video is playing
downloadAct->setEnabled(widget == mediaView);
+ */
// cool toolbar on the Mac
// setUnifiedTitleAndToolBarOnMac(widget == mediaView);
void MainWindow::tick(qint64 time) {
if (time <= 0) {
- totalTime->clear();
+ currentTime->clear();
return;
}
QTime displayTime(0, (time / 60000) % 60, (time / 1000) % 60);
statusBar()->showMessage(tr("Volume is unmuted"));
}
+/*
void MainWindow::abortDownload() {
QProgressDialog* dlg = dynamic_cast<QProgressDialog*>(this->sender());
QMap<QNetworkReply*, DownloadResource>::iterator cur;
m_downloads.remove(r);
}
}
+
+*/
#include "SettingsView.h"
#include "AboutView.h"
-#include <QProgressDialog>
+// #include <QProgressDialog>
class MainWindow : public QMainWindow {
protected:
void closeEvent(QCloseEvent *);
+ /*
struct DownloadResource
{
QProgressDialog* dialog;
QFile* file;
- };
+ };*/
private slots:
void fadeInWidget(QWidget *oldWidget, QWidget *newWidget);
void volumeChanged(qreal newVolume);
void volumeMutedChanged(bool muted);
+ /*
// download related stuff
void abortDownload();
void download();
void replyError(QNetworkReply::NetworkError code);
void replyFinished();
void replyMetaDataChanged();
+ */
private:
void initPhonon();
bool m_fullscreen;
bool m_maximized;
- QMap<QNetworkReply*, DownloadResource> m_downloads;
+ // QMap<QNetworkReply*, DownloadResource> m_downloads;
};
#endif