added knob id

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@145 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2006-06-05 18:06:20 +00:00
parent 004a73fc09
commit 49506696a9
4 changed files with 18 additions and 7 deletions

View File

@@ -86,7 +86,8 @@ textFloat * knob::s_textFloat = NULL;
knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
engine * _engine ) :
engine * _engine,
const int _knob_id ) :
QWidget( _parent
#ifndef QT4
, _name.ascii()
@@ -100,7 +101,8 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name,
m_hintTextBeforeValue( "" ),
m_hintTextAfterValue( "" ),
m_label( "" ),
m_initValue( 0.0f )
m_initValue( 0.0f ),
m_knobId( _knob_id )
{
if( s_textFloat == NULL )
{
@@ -246,6 +248,7 @@ void knob::valueChange( void )
recalcAngle();
update();
emit valueChanged( value() );
emit idKnobChanged( m_knobId );
}
@@ -458,6 +461,7 @@ void knob::mouseMoveEvent( QMouseEvent * _me )
{
setPosition( _me->pos() );
emit sliderMoved( value() );
emit idKnobChanged( m_knobId );
if( !configManager::inst()->value( "knobs",
"classicalusability").toInt() )
{
@@ -572,6 +576,7 @@ void knob::wheelEvent( QWheelEvent * _we )
s_textFloat->setVisibilityTimeOut( 1000 );
emit sliderMoved( value() );
emit idKnobChanged( m_knobId );
}
@@ -580,6 +585,7 @@ void knob::wheelEvent( QWheelEvent * _we )
void knob::buttonReleased( void )
{
emit valueChanged( value() );
emit idKnobChanged( m_knobId );
}

View File

@@ -48,8 +48,8 @@
volumeKnob::volumeKnob( int _knob_num, QWidget * _parent, const QString & _name,
engine * _engine ):
knob( _knob_num, _parent, _name, _engine )
engine * _engine, const int _knob_id ):
knob( _knob_num, _parent, _name, _engine, _knob_id )
{
}
@@ -129,6 +129,7 @@ void volumeKnob::mouseMoveEvent( QMouseEvent * _me )
{
setPosition( _me->pos() );
emit sliderMoved( value() );
emit idKnobChanged( m_knobId );
if( !configManager::inst()->value( "knobs",
"classicalusability").toInt() )
{
@@ -180,6 +181,7 @@ void volumeKnob::wheelEvent( QWheelEvent * _we )
s_textFloat->setVisibilityTimeOut( 1000 );
emit sliderMoved( value() );
emit idKnobChanged( m_knobId );
}