| 38 | |
| 39 | |
| 40 | ladspaDescription::ladspaDescription( QWidget * _parent, |
| 41 | ladspaPluginType _type ) : |
| 42 | QWidget( _parent ) |
| 43 | { |
| 44 | Ladspa2LMMS * manager = Engine::getLADSPAManager(); |
| 45 | |
| 46 | l_sortable_plugin_t plugins; |
| 47 | switch( _type ) |
| 48 | { |
| 49 | case SOURCE: |
| 50 | plugins = manager->getInstruments(); |
| 51 | break; |
| 52 | case TRANSFER: |
| 53 | plugins = manager->getValidEffects(); |
| 54 | break; |
| 55 | case VALID: |
| 56 | plugins = manager->getValidEffects(); |
| 57 | break; |
| 58 | case INVALID: |
| 59 | plugins = manager->getInvalidEffects(); |
| 60 | break; |
| 61 | case SINK: |
| 62 | plugins = manager->getAnalysisTools(); |
| 63 | break; |
| 64 | case OTHER: |
| 65 | plugins = manager->getOthers(); |
| 66 | break; |
| 67 | default: |
| 68 | break; |
| 69 | } |
| 70 | |
| 71 | QList<QString> pluginNames; |
| 72 | for( l_sortable_plugin_t::iterator it = plugins.begin(); |
| 73 | it != plugins.end(); ++it ) |
| 74 | { |
| 75 | if( _type != VALID || |
| 76 | manager->getDescription( ( *it ).second )->inputChannels |
| 77 | <= Engine::mixer()->audioDev()->channels() ) |
| 78 | { |
| 79 | pluginNames.push_back( ( *it ).first ); |
| 80 | m_pluginKeys.push_back( ( *it ).second ); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | QGroupBox * pluginsBox = new QGroupBox( tr( "Plugins" ), this ); |
| 85 | QListWidget * pluginList = new QListWidget( pluginsBox ); |
| 86 | pluginList->addItems( pluginNames ); |
| 87 | connect( pluginList, SIGNAL( currentRowChanged( int ) ), |
| 88 | SLOT( rowChanged( int ) ) ); |
| 89 | connect( pluginList, SIGNAL( itemDoubleClicked( QListWidgetItem * ) ), |
| 90 | SLOT( onDoubleClicked( QListWidgetItem * ) ) ); |
| 91 | ( new QVBoxLayout( pluginsBox ) )->addWidget( pluginList ); |
| 92 | |
| 93 | QGroupBox * descriptionBox = new QGroupBox( tr( "Description" ), this ); |
| 94 | QVBoxLayout * descriptionLayout = new QVBoxLayout( descriptionBox ); |
| 95 | descriptionLayout->setSpacing( 0 ); |
| 96 | descriptionLayout->setMargin( 0 ); |
| 97 |
nothing calls this directly
no test coverage detected