From 09d1eb079182e06e01cc9bea8bf9410e40a189c2 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 18 Feb 2011 21:44:39 +0000 Subject: 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 --- src/ui/balancebar.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/ui/balancebar.cpp') 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_posx() && e->x()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) -- cgit v1.2.3-13-gbd6f