DataFile: renamed from old multimediaProject class + coding style fixes

This commit is contained in:
Tobias Doerffel
2014-02-03 21:20:10 +01:00
parent 3837ea0087
commit 2e7733eaa1
18 changed files with 268 additions and 165 deletions

View File

@@ -39,7 +39,7 @@
#include "gui_templates.h"
#include "tooltip.h"
#include "string_pair_drag.h"
#include "mmp.h"
#include "DataFile.h"
#include "embed.cpp"
@@ -515,9 +515,8 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de )
}
else if( type == QString( "tco_%1" ).arg( track::SampleTrack ) )
{
multimediaProject mmp( value.toUtf8() );
castModel<audioFileProcessor>()->setAudioFile( mmp.content().
firstChild().toElement().attribute( "src" ) );
DataFile dataFile( value.toUtf8() );
castModel<audioFileProcessor>()->setAudioFile( dataFile.content().firstChild().toElement().attribute( "src" ) );
_de->accept();
return;
}

View File

@@ -2,7 +2,7 @@
* LadspaEffect.cpp - class for processing LADSPA effects
*
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2009-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2009-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -27,7 +27,7 @@
#include <QtGui/QMessageBox>
#include "LadspaEffect.h"
#include "mmp.h"
#include "DataFile.h"
#include "AudioDevice.h"
#include "config_mgr.h"
#include "ladspa_2_lmms.h"
@@ -104,8 +104,8 @@ LadspaEffect::~LadspaEffect()
void LadspaEffect::changeSampleRate()
{
multimediaProject mmp( multimediaProject::EffectSettings );
m_controls->saveState( mmp, mmp.content() );
DataFile dataFile( DataFile::EffectSettings );
m_controls->saveState( dataFile, dataFile.content() );
LadspaControls * controls = m_controls;
m_controls = NULL;
@@ -118,7 +118,7 @@ void LadspaEffect::changeSampleRate()
controls->effectModelChanged( m_controls );
delete controls;
m_controls->restoreState( mmp.content().firstChild().toElement() );
m_controls->restoreState( dataFile.content().firstChild().toElement() );
// the IDs of re-created controls have been saved and now need to be
// resolved again

View File

@@ -34,7 +34,7 @@
#include "engine.h"
#include "knob.h"
#include "led_checkbox.h"
#include "mmp.h"
#include "DataFile.h"
#include "InstrumentPlayHandle.h"
#include "InstrumentTrack.h"
#include "gui_templates.h"
@@ -371,7 +371,7 @@ bool ZynAddSubFxInstrument::handleMidiEvent( const MidiEvent& event, const MidiT
void ZynAddSubFxInstrument::reloadPlugin()
{
// save state of current plugin instance
multimediaProject m( multimediaProject::InstrumentTrackSettings );
DataFile m( DataFile::InstrumentTrackSettings );
saveSettings( m, m.content() );
// init plugin (will delete current one and create a new instance)