diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-05-08 11:49:29 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-05-08 11:49:29 +0000 |
| commit | 23c468df495bc146b78c1faca4fa5792d3cbd727 (patch) | |
| tree | 9d7745118bd2efe7cbef20fd6deaf9fc46af95db /src/ui/textscroller.cpp | |
| parent | ea7b638267352050e162334212344efe2fc8baec (diff) | |
| download | qmmp-23c468df495bc146b78c1faca4fa5792d3cbd727.tar.gz qmmp-23c468df495bc146b78c1faca4fa5792d3cbd727.tar.bz2 qmmp-23c468df495bc146b78c1faca4fa5792d3cbd727.zip | |
display buffering progress
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@366 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/textscroller.cpp')
| -rw-r--r-- | src/ui/textscroller.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/textscroller.cpp b/src/ui/textscroller.cpp index 4f3e3be80..fc12ebf12 100644 --- a/src/ui/textscroller.cpp +++ b/src/ui/textscroller.cpp @@ -73,6 +73,8 @@ void TextScroller::addOffset() void TextScroller::setText(const QString& text) { + if(isVisible()) + m_timer->start(); if (m_text != text) { m_text = text; @@ -103,6 +105,18 @@ void TextScroller::readSettings() } } +void TextScroller::setProgress(int progress) +{ + m_timer->stop(); + x = 0; + m_pixmap.fill ( Qt::transparent ); + QPainter paint ( &m_pixmap ); + paint.setPen(m_color); + paint.setFont(m_font); + paint.drawText (4,12, tr("Buffering:") + QString(" %1\%").arg(progress)); + setPixmap(m_pixmap); +} + void TextScroller::hideEvent ( QHideEvent *) { m_timer->stop(); |
