MCPcopy Create free account
hub / github.com/LMMS/lmms / loadFile

Method loadFile

plugins/zynaddsubfx/ZynAddSubFx.cpp:304–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302
303
304void ZynAddSubFxInstrument::loadFile( const QString & _file )
305{
306 const std::string fn = QSTR_TO_STDSTR( _file );
307 if( m_remotePlugin )
308 {
309 m_remotePlugin->lock();
310 m_remotePlugin->sendMessage( RemotePlugin::message( IdLoadPresetFile ).addString( fn ) );
311 m_remotePlugin->waitForMessage( IdLoadPresetFile );
312 m_remotePlugin->unlock();
313 }
314 else
315 {
316 m_pluginMutex.lock();
317 m_plugin->loadPreset( fn );
318 m_pluginMutex.unlock();
319 }
320
321 instrumentTrack()->setName( QFileInfo( _file ).baseName().replace( QRegExp( "^[0-9]{4}-" ), QString() ) );
322
323 m_modifiedControllers.clear();
324
325 emit settingsChanged();
326}
327
328
329

Callers 1

dropEventMethod · 0.45

Calls 11

sendMessageMethod · 0.80
addStringMethod · 0.80
loadPresetMethod · 0.80
messageFunction · 0.50
instrumentTrackFunction · 0.50
QStringClass · 0.50
lockMethod · 0.45
waitForMessageMethod · 0.45
unlockMethod · 0.45
setNameMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected