From ca78ca9305be0a4b9fb8cd7b081ebdd21b882e18 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Thu, 25 Jun 2009 11:31:17 +0200 Subject: [PATCH] Commented the progress bar out, since the Phonon backends are broken anyway --- src/loadingwidget.cpp | 14 +++++--------- src/loadingwidget.h | 7 +++---- 2 files changed, 8 insertions(+), 13 deletions(-) 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; }; -- 2.39.5