split off effectControlDialog into effectControlDialog and effectControls, made work with M/V as well as rewritten effect-framework, fixed bug in songEditor-engine

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@664 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-01-14 23:10:53 +00:00
parent add39dffbd
commit 382d7d44b0
17 changed files with 381 additions and 207 deletions

View File

@@ -65,7 +65,7 @@ void effect::saveSettings( QDomDocument & _doc, QDomElement & _this )
_this.setAttribute( "wet", m_wetDryModel.value() );
_this.setAttribute( "autoquit", m_autoQuitModel.value() );
_this.setAttribute( "gate", m_gateModel.value() );
// m_controlView->saveState( _doc, _this );
getControls()->saveState( _doc, _this );
}
@@ -77,20 +77,19 @@ void effect::loadSettings( const QDomElement & _this )
m_wetDryModel.setValue( _this.attribute( "wet" ).toFloat() );
m_autoQuitModel.setValue( _this.attribute( "autoquit" ).toFloat() );
m_gateModel.setValue( _this.attribute( "gate" ).toFloat() );
/*
QDomNode node = _this.firstChild();
while( !node.isNull() )
{
if( node.isElement() )
{
if( m_controlView->nodeName() == node.nodeName() )
if( getControls()->nodeName() == node.nodeName() )
{
m_controlView->restoreState(
node.toElement() );
getControls()->restoreState( node.toElement() );
}
}
node = node.nextSibling();
}*/
}
}

View File

@@ -30,15 +30,16 @@
#include <QtGui/QCloseEvent>
#include "effect_control_dialog.h"
#include "effect_controls.h"
#include "effect.h"
effectControlDialog::effectControlDialog( QWidget * _parent, effect * _eff ) :
QWidget( _parent ),
modelView( _eff ),
m_effect( _eff )
effectControlDialog::effectControlDialog( effectControls * _controls ) :
QWidget( NULL ),
modelView( _controls ),
m_effectControls( _controls )
{
setWindowTitle( m_effect->publicName() );
setWindowTitle( m_effectControls->getEffect()->publicName() );
}

View File

@@ -128,6 +128,8 @@ songEditor::songEditor( void ) :
connect( &m_tempoModel, SIGNAL( dataChanged() ),
this, SLOT( setTempo() ) );
connect( &m_tempoModel, SIGNAL( dataUnchanged() ),
this, SLOT( setTempo() ) );
connect( m_tempoSpinBox, SIGNAL( manualChange() ), this,
SLOT( setModified() ) );

View File

@@ -35,6 +35,7 @@
#include "audio_port.h"
#include "caption_menu.h"
#include "effect_controls.h"
#include "effect_control_dialog.h"
#include "embed.h"
#include "engine.h"
@@ -112,7 +113,7 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
bg.toImage().copy( 5, 44, 195, 10 ) ) );
m_label->setPalette( pal );
m_controlView = getEffect()->createControlDialog( NULL );
m_controlView = getEffect()->getControls()->createView();
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow(
m_controlView );
connect( m_controlView, SIGNAL( closed() ),
@@ -120,7 +121,7 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
m_subWindow->hide();
if( m_controlView->getControlCount() == 0 )
if( getEffect()->getControls()->getControlCount() == 0 )
{
m_editButton->hide();
}