| 684 | |
| 685 | |
| 686 | void 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 |
nothing calls this directly
no test coverage detected