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/volumebar.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/volumebar.cpp')
| -rw-r--r-- | src/ui/volumebar.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/volumebar.cpp b/src/ui/volumebar.cpp index 6a4169dae..e0829e659 100644 --- a/src/ui/volumebar.cpp +++ b/src/ui/volumebar.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 * @@ -21,11 +21,9 @@ #include <QMouseEvent> #include <QPainter> #include <math.h> - #include "skin.h" #include "button.h" #include "mainwindow.h" - #include "volumebar.h" @@ -42,7 +40,6 @@ VolumeBar::VolumeBar(QWidget *parent) : PixmapWidget(parent) draw(false); } - VolumeBar::~VolumeBar() {} @@ -53,11 +50,13 @@ void VolumeBar::mousePressEvent(QMouseEvent *e) 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(); + emit sliderPressed(); if (m_value != m_old) emit sliderMoved(m_value); } @@ -85,6 +84,7 @@ void VolumeBar::mouseReleaseEvent(QMouseEvent*) m_moving = false; draw(false); m_old = m_value; + emit sliderReleased(); } void VolumeBar::setValue(int v) |
