From: Flavio Tordini Date: Thu, 25 Jun 2009 09:31:17 +0000 (+0200) Subject: Commented the progress bar out, since the Phonon backends are broken X-Git-Tag: 0.4~34 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ca78ca9305be0a4b9fb8cd7b081ebdd21b882e18;p=minitube Commented the progress bar out, since the Phonon backends are broken anyway --- diff --git a/src/loadingwidget.cpp b/src/loadingwidget.cpp index bc62500..bf6c3f3 100644 --- a/src/loadingwidget.cpp +++ b/src/loadingwidget.cpp @@ -40,9 +40,11 @@ LoadingWidget::LoadingWidget(QWidget *parent) : QWidget(parent) { descriptionLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layout->addWidget(descriptionLabel); + /* progressBar = new QProgressBar(this); progressBar->hide(); layout->addWidget(progressBar); + */ setLayout(layout); } @@ -52,22 +54,16 @@ void LoadingWidget::setVideo(Video *video) { // enhance legibility by splitting the title title = title.replace(" - ", "

"); title = title.replace("] ", "]

"); + title = title.replace(" [", "

["); titleLabel->setText(title); descriptionLabel->setText(video->description()); - progressBar->hide(); + // progressBar->hide(); } void LoadingWidget::bufferStatus(int percent) { + /* qDebug() << percent; progressBar->setShown(percent > 0); progressBar->setValue(percent); -} - -void LoadingWidget::paintEvent(QPaintEvent *) { - - /* - QPainter painter(this); - painter.fillRect(0, 0, width(), height(), Qt::black); */ - } diff --git a/src/loadingwidget.h b/src/loadingwidget.h index 254717f..ba7ff10 100644 --- a/src/loadingwidget.h +++ b/src/loadingwidget.h @@ -15,13 +15,12 @@ public: public slots: void bufferStatus(int); -protected: - void paintEvent(QPaintEvent *event); - private: QLabel *titleLabel; QLabel *descriptionLabel; - QProgressBar *progressBar; + // TODO uncomment the whole progress bar feature + // when the Phonon backends will correctly emit bufferStatus(int) + // QProgressBar *progressBar; };