diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-02-18 21:44:39 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-02-18 21:44:39 +0000 |
| commit | 09d1eb079182e06e01cc9bea8bf9410e40a189c2 (patch) | |
| tree | ba6228fb3e81cd38e41fcc32e0d89246b357c5f8 /src/ui/balancebar.cpp | |
| parent | 390cf22010e4f10be06010bbaff1dcf388f88c3c (diff) | |
| download | qmmp-09d1eb079182e06e01cc9bea8bf9410e40a189c2.tar.gz qmmp-09d1eb079182e06e01cc9bea8bf9410e40a189c2.tar.bz2 qmmp-09d1eb079182e06e01cc9bea8bf9410e40a189c2.zip | |
improved text scroller, added numerical values for balance and volume
(Closes issue 415)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2057 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/balancebar.cpp')
| -rw-r--r-- | src/ui/balancebar.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/balancebar.cpp b/src/ui/balancebar.cpp index a14f73acc..07a56ce7a 100644 --- a/src/ui/balancebar.cpp +++ b/src/ui/balancebar.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2009 by Ilya Kotov * + * Copyright (C) 2006-2011 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -50,20 +50,22 @@ void BalanceBar::mousePressEvent(QMouseEvent *e) if(e->button() == Qt::MidButton) { m_value = 0; + emit sliderPressed(); emit sliderMoved(m_value); } else if(m_pos<e->x() && e->x()<m_pos+11*m_skin->ratio()) { press_pos = e->x()-m_pos; + emit sliderPressed(); } else { m_value = convert(qMax(qMin(width()-18*m_skin->ratio(),e->x()-6*m_skin->ratio()),0)); press_pos = 6*m_skin->ratio(); - if (m_value!=m_old) + emit sliderPressed(); + if (m_value != m_old) { emit sliderMoved(m_value); - } } draw(); @@ -90,6 +92,7 @@ void BalanceBar::mouseReleaseEvent(QMouseEvent*) m_moving = false; draw(false); m_old = m_value; + emit sliderReleased(); } void BalanceBar::setValue(int v) |
