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

Method openPlugin

plugins/vestige/vestige.cpp:686–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684
685
686void VestigeInstrumentView::openPlugin()
687{
688 FileDialog ofd( NULL, tr( "Open VST-plugin" ) );
689
690 // set filters
691 QStringList types;
692 types << tr( "DLL-files (*.dll)" )
693 << tr( "EXE-files (*.exe)" )
694 ;
695 ofd.setNameFilters( types );
696
697 if( m_vi->m_pluginDLL != "" )
698 {
699 QString f = SampleBuffer::tryToMakeAbsolute( m_vi->m_pluginDLL );
700 ofd.setDirectory( QFileInfo( f ).absolutePath() );
701 ofd.selectFile( QFileInfo( f ).fileName() );
702 }
703 else
704 {
705 ofd.setDirectory( ConfigManager::inst()->vstDir() );
706 }
707
708 if ( ofd.exec () == QDialog::Accepted )
709 {
710 if( ofd.selectedFiles().isEmpty() )
711 {
712 return;
713 }
714 Engine::mixer()->requestChangeInModel();
715
716 if (m_vi->p_subWindow != NULL) {
717 delete m_vi->p_subWindow;
718 m_vi->p_subWindow = NULL;
719 }
720
721 m_vi->loadFile( ofd.selectedFiles()[0] );
722 Engine::mixer()->doneChangeInModel();
723 if( m_vi->m_plugin && m_vi->m_plugin->pluginWidget() )
724 {
725 m_vi->m_plugin->pluginWidget()->setWindowIcon(
726 PLUGIN_NAME::getIconPixmap( "logo" ) );
727 }
728 }
729}
730
731
732

Callers

nothing calls this directly

Calls 8

mixerFunction · 0.85
getIconPixmapFunction · 0.85
requestChangeInModelMethod · 0.80
doneChangeInModelMethod · 0.80
pluginWidgetMethod · 0.80
instFunction · 0.50
isEmptyMethod · 0.45
loadFileMethod · 0.45

Tested by

no test coverage detected