aboutsummaryrefslogtreecommitdiff
path: root/src/textscroller.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-12 14:04:33 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-12 14:04:33 +0000
commiteb25fd643c963cf73bb76bae8c35c0b9ce87888f (patch)
treeddff861fcf9323d762ab9ee369ee3fc19ebb0438 /src/textscroller.cpp
parentb8748180522306de90b6cf1af0efb7fd0a7f6a8a (diff)
downloadqmmp-eb25fd643c963cf73bb76bae8c35c0b9ce87888f.tar.gz
qmmp-eb25fd643c963cf73bb76bae8c35c0b9ce87888f.tar.bz2
qmmp-eb25fd643c963cf73bb76bae8c35c0b9ce87888f.zip
reduced wakeups number
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@83 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/textscroller.cpp')
-rw-r--r--src/textscroller.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/textscroller.cpp b/src/textscroller.cpp
index 98460b62b..35e4ed4eb 100644
--- a/src/textscroller.cpp
+++ b/src/textscroller.cpp
@@ -45,7 +45,8 @@ TextScroller::TextScroller ( QWidget *parent )
readSettings();
m_timer = new QTimer ( this );
connect ( m_timer, SIGNAL ( timeout() ),SLOT ( addOffset() ) );
- m_timer -> start ( 50 );
+ m_timer->setInterval(50);
+ m_timer->start();
updateSkin();
connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin()));
}
@@ -103,3 +104,13 @@ void TextScroller::readSettings()
m_metrics = new QFontMetrics(m_font);
}
}
+
+void TextScroller::hideEvent ( QHideEvent *)
+{
+ m_timer->stop();
+}
+
+void TextScroller::showEvent ( QShowEvent *)
+{
+ m_timer->start();
+}