Minor improvements to effect rack and controls

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@944 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-04-29 03:53:21 +00:00
parent 21049cf3d0
commit 96ba8ef3e6
5 changed files with 47 additions and 2 deletions

View File

@@ -8,6 +8,13 @@
* src/core/instrument_functions.cpp:
Fixed arpeggio direction loading
* src/gui/widgets/effect_rack_view.cpp:
Display effect window and enable fx-chain when adding an effect
* src/gui/widgets/effect_view.cpp:
Make effect controls window non-resizeable and remove maximize button
2008-04-26 Tobias Dorffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/stereo_enhancer/stereo_enhancer.cpp:

View File

@@ -108,6 +108,9 @@ public:
{
if( m_controller != NULL )
{
/*return minValue() + castValue( m_range *
m_equation->evaluate();*/
return minValue() + castValue( m_range *
m_controller->currentValue( _frameOffset ) );
}
@@ -115,6 +118,17 @@ public:
return m_value;
}
// TODO: Combine factory and equation?
/*
setMappingEquation( string eq )
{
modelSymbolFactory factory( this );
equationCompiler cmp( factory );
m_equation = cmp.compile( eq );
}
*/
inline controller * getController( void ) const
{

View File

@@ -219,8 +219,26 @@ void effectRackView::addEffect( void )
return;
}
fxChain()->appendEffect( esd.instantiateSelectedPlugin( fxChain() ) );
effect * fx = esd.instantiateSelectedPlugin( fxChain() );
fxChain()->m_enabledModel.setValue( TRUE );
fxChain()->appendEffect( fx );
update();
// Find the effectView, and show the controls
for( QVector<effectView *>::iterator vit =
m_effectViews.begin();
vit != m_effectViews.end(); ++vit )
{
if( ( *vit )->getEffect() == fx )
{
( *vit )->editControls();
break;
}
}
}

View File

@@ -104,7 +104,12 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
m_controlView = getEffect()->getControls()->createView();
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow(
m_controlView );
m_controlView,
Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint );
m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
m_subWindow->setFixedSize( m_subWindow->size() );
connect( m_controlView, SIGNAL( closed() ),
this, SLOT( closeEffects() ) );

View File

@@ -597,6 +597,7 @@ void knob::connectToController( void )
void knob::friendlyUpdate( void )
{
//printf("%d v\n", controller::runningFrames() );
if( model()->getController() == NULL || controller::runningFrames() % (256*4) == 0 )
{
update();