From 9b74ff93fb7ddef88e95401e6d8c99bb667a4d8d Mon Sep 17 00:00:00 2001 From: Javier Serrano Polo Date: Fri, 23 Nov 2007 00:08:27 +0000 Subject: [PATCH] really added LADSPA browser git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@609 0778d3d1-df1d-0410-868b-ea421aaaa00d --- plugins/ladspa_browser/Makefile.am | 40 ++++ plugins/ladspa_browser/ladspa_browser.cpp | 216 +++++++++++++++++ plugins/ladspa_browser/ladspa_browser.h | 62 +++++ plugins/ladspa_browser/ladspa_description.cpp | 224 ++++++++++++++++++ plugins/ladspa_browser/ladspa_description.h | 69 ++++++ plugins/ladspa_browser/ladspa_port_dialog.cpp | 183 ++++++++++++++ plugins/ladspa_browser/ladspa_port_dialog.h | 49 ++++ plugins/ladspa_browser/logo.png | Bin 0 -> 3280 bytes 8 files changed, 843 insertions(+) create mode 100644 plugins/ladspa_browser/Makefile.am create mode 100644 plugins/ladspa_browser/ladspa_browser.cpp create mode 100644 plugins/ladspa_browser/ladspa_browser.h create mode 100644 plugins/ladspa_browser/ladspa_description.cpp create mode 100644 plugins/ladspa_browser/ladspa_description.h create mode 100644 plugins/ladspa_browser/ladspa_port_dialog.cpp create mode 100644 plugins/ladspa_browser/ladspa_port_dialog.h create mode 100644 plugins/ladspa_browser/logo.png diff --git a/plugins/ladspa_browser/Makefile.am b/plugins/ladspa_browser/Makefile.am new file mode 100644 index 000000000..bad9df9be --- /dev/null +++ b/plugins/ladspa_browser/Makefile.am @@ -0,0 +1,40 @@ +AUTOMAKE_OPTIONS = foreign 1.4 + + +INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. + + +AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="ladspa_browser" + + +%.moc: ./%.h + $(MOC) -o $@ $< + + +MOC_FILES = ./ladspa_browser.moc \ + ./ladspa_description.moc \ + ./ladspa_port_dialog.moc + +BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h +EMBEDDED_RESOURCES = $(wildcard *png) + +./embedded_resources.h: $(EMBEDDED_RESOURCES) + $(BIN2RES) $(EMBEDDED_RESOURCES) > $@ + +EXTRA_DIST = $(EMBEDDED_RESOURCES) + + +CLEANFILES = $(MOC_FILES) ./embedded_resources.h + + + +pkglib_LTLIBRARIES = libladspa_browser.la + +libladspa_browser_la_SOURCES = ladspa_browser.cpp \ + ladspa_browser.h \ + ladspa_description.cpp \ + ladspa_description.h \ + ladspa_port_dialog.cpp \ + ladspa_port_dialog.h + +$(libladspa_browser_la_SOURCES): ./embedded_resources.h diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp new file mode 100644 index 000000000..125907a15 --- /dev/null +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -0,0 +1,216 @@ +/* + * ladspa_browser.cpp - dialog to display information about installed LADSPA + * plugins + * + * Copyright (c) 2006-2007 Danny McRae + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#include "ladspa_browser.h" + + +#include +#include + + +#include "gui_templates.h" +#include "ladspa_description.h" +#include "ladspa_port_dialog.h" +#include "tab_bar.h" +#include "tab_button.h" + + +#undef SINGLE_SOURCE_COMPILE +#include "embed.cpp" + + + + +extern "C" +{ + +plugin::descriptor ladspa_browser_plugin_descriptor = +{ + STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ), + "LADSPA Plugin Browser", + QT_TRANSLATE_NOOP( "pluginBrowser", + "List installed LADSPA plugins" ), + "Danny McRae ", + 0x0100, + plugin::Tool, + new QPixmap( PLUGIN_NAME::getIconPixmap( "logo" ) ), + NULL +} ; + + +// neccessary for getting instance out of shared lib +plugin * lmms_plugin_main( void * _data ) +{ + return( new ladspaBrowser ); +} + +} + + + + +ladspaBrowser::ladspaBrowser( void ) : + tool( &ladspa_browser_plugin_descriptor ) +{ + QHBoxLayout * hlayout = new QHBoxLayout( this ); + hlayout->setSpacing( 0 ); + hlayout->setMargin( 0 ); + + m_tabBar = new tabBar( this, QBoxLayout::TopToBottom ); + m_tabBar->setExclusive( TRUE ); + m_tabBar->setFixedWidth( 72 ); + + QWidget * ws = new QWidget( this ); + ws->setFixedSize( 500, 400 ); + + QWidget * available = createTab( ws, tr( "Available Effects" ), VALID ); + QWidget * unavailable = createTab( ws, tr( "Unavailable Effects" ), + INVALID ); + QWidget * instruments = createTab( ws, tr( "Instruments" ), SOURCE ); + QWidget * analysis = createTab( ws, tr( "Analysis Tools" ), SINK ); + QWidget * other = createTab( ws, tr( "Don't know" ), OTHER ); + + + m_tabBar->addTab( available, tr( "Available Effects" ), + 0, FALSE, TRUE + )->setIcon( embed::getIconPixmap( "setup_audio" ) ); + m_tabBar->addTab( unavailable, tr( "Unavailable Effects" ), + 1, FALSE, TRUE + )->setIcon( embed::getIconPixmap( + "unavailable_sound" ) ); + m_tabBar->addTab( instruments, tr( "Instruments" ), + 2, FALSE, TRUE + )->setIcon( embed::getIconPixmap( + "setup_midi" ) ); + m_tabBar->addTab( analysis, tr( "Analysis Tools" ), + 3, FALSE, TRUE + )->setIcon( embed::getIconPixmap( "analysis" ) ); + m_tabBar->addTab( other, tr( "Don't know" ), + 4, TRUE, TRUE + )->setIcon( embed::getIconPixmap( "uhoh" ) ); + + + m_tabBar->setActiveTab( 0 ); + + hlayout->addWidget( m_tabBar ); + hlayout->addSpacing( 10 ); + hlayout->addWidget( ws ); + hlayout->addSpacing( 10 ); + hlayout->addStretch(); + + setWhatsThis( tr( +"This dialog displays information on all of the LADSPA plugins LMMS was " +"able to locate. The plugins are divided into five categories based " +"upon an interpretation of the port types and names.\n\n" + +"Available Effects are those that can be used by LMMS. In order for LMMS " +"to be able to use an effect, it must, first and foremost, be an effect, " +"which is to say, it has to have both input channels and output channels. " +"LMMS identifies an input channel as an audio rate port containing 'in' in " +"the name. Output channels are identified by the letters 'out'. Furthermore, " +"the effect must have the same number of inputs and outputs and be real time " +"capable.\n\n" + +"Unavailable Effects are those that were identified as effects, but either " +"didn't have the same number of input and output channels or weren't real " +"time capable.\n\n" + +"Instruments are plugins for which only output channels were identified.\n\n" + +"Analysis Tools are plugins for which only input channels were identified.\n\n" + +"Don't Knows are plugins for which no input or output channels were " +"identified.\n\n" + +"Double clicking any of the plugins will bring up information on the " +"ports." ) ); + + hide(); + if( parentWidget() ) + { + parentWidget()->hide(); + parentWidget()->layout()->setSizeConstraint( + QLayout::SetFixedSize ); + } +} + + + + +ladspaBrowser::~ladspaBrowser() +{ +} + + + + +QString ladspaBrowser::nodeName( void ) const +{ + return( ladspa_browser_plugin_descriptor.name ); +} + + + + +QWidget * ladspaBrowser::createTab( QWidget * _parent, const QString & _txt, + ladspaPluginType _type ) +{ + QWidget * tab = new QWidget( _parent ); + tab->setFixedSize( 500, 340 ); + QVBoxLayout * layout = new QVBoxLayout( tab ); + layout->setSpacing( 0 ); + layout->setMargin( 0 ); + + QLabel * title = new QLabel( _txt, tab ); + QFont f = title->font(); + f.setBold( TRUE ); + title->setFont( pointSize<12>( f ) ); + + layout->addSpacing( 5 ); + layout->addWidget( title ); + layout->addSpacing( 10 ); + + ladspaDescription * description = new ladspaDescription( tab, _type ); + connect( description, SIGNAL( doubleClicked( const ladspa_key_t & ) ), + SLOT( showPorts( const ladspa_key_t & ) ) ); + layout->addWidget( description, 1 ); + + return( tab ); +} + + + + +void ladspaBrowser::showPorts( const ladspa_key_t & _key ) +{ + ladspaPortDialog ports( _key ); + ports.exec(); +} + + + + +#include "ladspa_browser.moc" diff --git a/plugins/ladspa_browser/ladspa_browser.h b/plugins/ladspa_browser/ladspa_browser.h new file mode 100644 index 000000000..0f357ce92 --- /dev/null +++ b/plugins/ladspa_browser/ladspa_browser.h @@ -0,0 +1,62 @@ +/* + * ladspa_browser.h - dialog to display information about installed LADSPA + * plugins + * + * Copyright (c) 2006-2007 Danny McRae + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef _LADSPA_BROWSER_H +#define _LADSPA_BROWSER_H + + +#include "ladspa_manager.h" +#include "tool.h" + + +class tabBar; + + +class ladspaBrowser : public tool +{ + Q_OBJECT +public: + ladspaBrowser( void ); + virtual ~ladspaBrowser(); + + virtual QString nodeName( void ) const; + + +public slots: + void showPorts( const ladspa_key_t & _key ); + void displayHelp( void ); + + +private: + tabBar * m_tabBar; + + QWidget * createTab( QWidget * _parent, const QString & _txt, + ladspaPluginType _type ); + +} ; + + +#endif diff --git a/plugins/ladspa_browser/ladspa_description.cpp b/plugins/ladspa_browser/ladspa_description.cpp new file mode 100644 index 000000000..9e3d7490e --- /dev/null +++ b/plugins/ladspa_browser/ladspa_description.cpp @@ -0,0 +1,224 @@ +/* + * ladspa_description.cpp - LADSPA plugin description + * + * Copyright (c) 2007 Javier Serrano Polo + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#include "ladspa_description.h" + + +#include +#include +#include +#include +#include + + +#include "audio_device.h" +#include "engine.h" +#include "ladspa_2_lmms.h" +#include "mixer.h" + + + + +ladspaDescription::ladspaDescription( QWidget * _parent, + ladspaPluginType _type ) : + QWidget( _parent ) +{ + ladspa2LMMS * manager = engine::getLADSPAManager(); + + l_sortable_plugin_t plugins; + switch( _type ) + { + case SOURCE: + plugins = manager->getInstruments(); + break; + case TRANSFER: + plugins = manager->getValidEffects(); + break; + case VALID: + plugins = manager->getValidEffects(); + break; + case INVALID: + plugins = manager->getInvalidEffects(); + break; + case SINK: + plugins = manager->getAnalysisTools(); + break; + case OTHER: + plugins = manager->getOthers(); + break; + default: + break; + } + + QList pluginNames; + for( l_sortable_plugin_t::iterator it = plugins.begin(); + it != plugins.end(); it++ ) + { + if( _type != VALID || + manager->getDescription( ( *it ).second )->inputChannels + <= engine::getMixer()->audioDev()->channels() ) + { + pluginNames.push_back( ( *it ).first ); + m_pluginKeys.push_back( ( *it ).second ); + } + } + + QGroupBox * pluginsBox = new QGroupBox( tr( "Plugins" ), this ); + QListWidget * pluginList = new QListWidget( pluginsBox ); + pluginList->addItems( pluginNames ); + connect( pluginList, SIGNAL( currentRowChanged( int ) ), + SLOT( rowChanged( int ) ) ); + connect( pluginList, SIGNAL( itemDoubleClicked( QListWidgetItem * ) ), + SLOT( onDoubleClicked( QListWidgetItem * ) ) ); + ( new QVBoxLayout( pluginsBox ) )->addWidget( pluginList ); + + QGroupBox * descriptionBox = new QGroupBox( tr( "Description" ), this ); + QVBoxLayout * descriptionLayout = new QVBoxLayout( descriptionBox ); + descriptionLayout->setSpacing( 0 ); + descriptionLayout->setMargin( 0 ); + + m_scrollArea = new QScrollArea( descriptionBox ); + descriptionLayout->addWidget( m_scrollArea ); + + QVBoxLayout * layout = new QVBoxLayout( this ); + layout->addWidget( pluginsBox ); + layout->addWidget( descriptionBox ); + + if( pluginList->count() > 0 ) + { + pluginList->setCurrentRow( 0 ); + m_currentSelection = m_pluginKeys[0]; + update( m_currentSelection ); + } +} + + + + +ladspaDescription::~ladspaDescription() +{ +} + + + + +void ladspaDescription::update( const ladspa_key_t & _key ) +{ + QWidget * description = new QWidget; + m_scrollArea->setWidget( description ); + + QVBoxLayout * layout = new QVBoxLayout( description ); + layout->setSizeConstraint( QLayout::SetFixedSize ); + + ladspa2LMMS * manager = engine::getLADSPAManager(); + + QLabel * name = new QLabel( description ); + name->setText( QWidget::tr( "Name: " ) + manager->getName( _key ) ); + layout->addWidget( name ); + + QWidget * maker = new QWidget( description ); + QHBoxLayout * makerLayout = new QHBoxLayout( maker ); + makerLayout->setMargin( 0 ); + makerLayout->setSpacing( 0 ); + layout->addWidget( maker ); + + QLabel * maker_label = new QLabel( maker ); + maker_label->setText( QWidget::tr( "Maker: " ) ); + maker_label->setAlignment( Qt::AlignTop ); + QLabel * maker_content = new QLabel( maker ); + maker_content->setText( manager->getMaker( _key ) ); + maker_content->setWordWrap( TRUE ); + makerLayout->addWidget( maker_label ); + makerLayout->addWidget( maker_content, 1 ); + + QWidget * copyright = new QWidget( description ); + QHBoxLayout * copyrightLayout = new QHBoxLayout( copyright ); + copyrightLayout->setMargin( 0 ); + copyrightLayout->setSpacing( 0 ); + layout->addWidget( copyright ); + + QLabel * copyright_label = new QLabel( copyright ); + copyright_label->setText( QWidget::tr( "Copyright: " ) ); + copyright_label->setAlignment( Qt::AlignTop ); + + QLabel * copyright_content = new QLabel( copyright ); + copyright_content->setText( manager->getCopyright( _key ) ); + copyright_content->setWordWrap( TRUE ); + copyrightLayout->addWidget( copyright_label ); + copyrightLayout->addWidget( copyright_content, 1 ); + + QLabel * requiresRealTime = new QLabel( description ); + requiresRealTime->setText( QWidget::tr( "Requires Real Time: " ) + + ( manager->hasRealTimeDependency( _key ) ? + QWidget::tr( "Yes" ) : + QWidget::tr( "No" ) ) ); + layout->addWidget( requiresRealTime ); + + QLabel * realTimeCapable = new QLabel( description ); + realTimeCapable->setText( QWidget::tr( "Real Time Capable: " ) + + ( manager->isRealTimeCapable( _key ) ? + QWidget::tr( "Yes" ) : + QWidget::tr( "No" ) ) ); + layout->addWidget( realTimeCapable ); + + QLabel * inplaceBroken = new QLabel( description ); + inplaceBroken->setText( QWidget::tr( "In Place Broken: " ) + + ( manager->isInplaceBroken( _key ) ? + QWidget::tr( "Yes" ) : + QWidget::tr( "No" ) ) ); + layout->addWidget( inplaceBroken ); + + QLabel * channelsIn = new QLabel( description ); + channelsIn->setText( QWidget::tr( "Channels In: " ) + QString::number( + manager->getDescription( _key )->inputChannels ) ); + layout->addWidget( channelsIn ); + + QLabel * channelsOut = new QLabel( description ); + channelsOut->setText( QWidget::tr( "Channels Out: " ) + QString::number( + manager->getDescription( _key )->outputChannels ) ); + layout->addWidget( channelsOut ); +} + + + + +void ladspaDescription::rowChanged( int _pluginIndex ) +{ + m_currentSelection = m_pluginKeys[_pluginIndex]; + update( m_currentSelection ); +} + + + + +void ladspaDescription::onDoubleClicked( QListWidgetItem * _item ) +{ + emit( doubleClicked( m_currentSelection ) ); +} + + + + +#include "ladspa_description.moc" diff --git a/plugins/ladspa_browser/ladspa_description.h b/plugins/ladspa_browser/ladspa_description.h new file mode 100644 index 000000000..ce1164f70 --- /dev/null +++ b/plugins/ladspa_browser/ladspa_description.h @@ -0,0 +1,69 @@ +/* + * ladspa_description.h - LADSPA plugin description + * + * Copyright (c) 2007 Javier Serrano Polo + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef _LADSPA_DESCRIPTION_H +#define _LADSPA_DESCRIPTION_H + + +#include + +#include "ladspa_manager.h" + + +class QListWidgetItem; +class QScrollArea; + + +class ladspaDescription : public QWidget +{ + Q_OBJECT +public: + ladspaDescription( QWidget * _parent, ladspaPluginType _type ); + virtual ~ladspaDescription(); + + +signals: + void doubleClicked( const ladspa_key_t & ); + + +private: + QScrollArea * m_scrollArea; + + QList m_pluginKeys; + ladspa_key_t m_currentSelection; + + void update( const ladspa_key_t & _key ); + + +private slots: + void rowChanged( int _pluginIndex ); + void onDoubleClicked( QListWidgetItem * _item ); + +} ; + + + + +#endif diff --git a/plugins/ladspa_browser/ladspa_port_dialog.cpp b/plugins/ladspa_browser/ladspa_port_dialog.cpp new file mode 100644 index 000000000..87884f280 --- /dev/null +++ b/plugins/ladspa_browser/ladspa_port_dialog.cpp @@ -0,0 +1,183 @@ +/* + * ladspa_port_dialog.cpp - dialog to test a LADSPA plugin + * + * Copyright (c) 2006-2007 Danny McRae + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#include "ladspa_port_dialog.h" + +#include +#include + +#include "embed.h" +#include "engine.h" +#include "ladspa_2_lmms.h" +#include "mixer.h" + + +ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) +{ + ladspa2LMMS * manager = engine::getLADSPAManager(); + + setWindowIcon( embed::getIconPixmap( "ports" ) ); + setWindowTitle( tr( "Ports" ) ); + setModal( TRUE ); + + QVBoxLayout * vlayout = new QVBoxLayout( this ); + vlayout->setSpacing( 0 ); + vlayout->setMargin( 0 ); + + Uint16 pc = manager->getPortCount( _key ); + + QTableWidget * settings = new QTableWidget( pc, 7, this ); + + QStringList ports; + ports.append( tr( "Name" ) ); + ports.append( tr( "Rate" ) ); + ports.append( tr( "Direction" ) ); + ports.append( tr( "Type" ) ); + ports.append( tr( "Min < Default < Max" ) ); + ports.append( tr( "Logarithmic" ) ); + ports.append( tr( "SR Dependent" ) ); + settings->setHorizontalHeaderLabels( ports ); + + for( Uint16 row = 0; row < pc; row++ ) + { + for( Uint8 col = 0; col < 7; ++col ) + { + QTableWidgetItem * item = new QTableWidgetItem; + item->setFlags( 0 ); + settings->setItem( row, col, item ); + } + + Uint8 col = 0; + settings->item( row, col++ )->setText( manager->getPortName( + _key, row ) ); + + settings->item( row, col++ )->setText( + manager->isPortAudio( _key, row ) ? + tr( "Audio" ) : tr( "Control" ) ); + + settings->item( row, col++ )->setText( + manager->isPortInput( _key, row ) ? + tr( "Input" ) : tr( "Output" ) ); + + settings->item( row, col++ )->setText( + manager->isPortToggled( _key, row ) ? tr( "Toggled" ) : + manager->isInteger( _key, row ) ? tr( "Integer" ) : + tr( "Float" ) ); + + float min = manager->getLowerBound( _key, row ); + float max = manager->getUpperBound( _key, row ); + float def = manager->getDefaultSetting( _key, row ); + QString range = ""; + + if( manager->areHintsSampleRateDependent( _key, row ) ) + { + if( min != NOHINT ) + { + min *= engine::getMixer()->sampleRate(); + } + if( max != NOHINT ) + { + max *= engine::getMixer()->sampleRate(); + } + } + + if( min == NOHINT ) + { + range += "-Inf < "; + } + else if( manager->isInteger( _key, row ) ) + { + range += QString::number( static_cast( min ) ) + + " < "; + } + else + { + range += QString::number( min ) + " < "; + } + + if( def == NOHINT ) + { + range += "None < "; + } + else if( manager->isInteger( _key, row ) ) + { + range += QString::number( static_cast( def ) ) + + " < "; + } + else + { + range += QString::number( def ) + " < "; + } + + if( max == NOHINT ) + { + range += "Inf"; + } + else if( manager->isInteger( _key, row ) ) + { + range += QString::number( static_cast( max ) ); + } + else + { + range += QString::number( max ); + } + + if( manager->isPortOutput( _key, row ) || + manager->isPortToggled( _key, row ) ) + { + range = ""; + } + + settings->item( row, col++ )->setText( range ); + + if( manager->isLogarithmic( _key, row ) ) + { + settings->item( row, col )->setText( tr( "Yes" ) ); + } + col++; + + if( manager->areHintsSampleRateDependent( _key, row ) ) + { + settings->item( row, col )->setText( tr( "Yes" ) ); + } + } + + + vlayout->addWidget( settings ); + + show(); +} + + + + +ladspaPortDialog::~ladspaPortDialog() +{ +} + + + + +#include "ladspa_port_dialog.moc" diff --git a/plugins/ladspa_browser/ladspa_port_dialog.h b/plugins/ladspa_browser/ladspa_port_dialog.h new file mode 100644 index 000000000..c249ef980 --- /dev/null +++ b/plugins/ladspa_browser/ladspa_port_dialog.h @@ -0,0 +1,49 @@ +/* + * ladspa_port_dialog.h - dialog to test a LADSPA plugin + * + * Copyright (c) 2006-2007 Danny McRae + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef _LADSPA_PORT_DIALOG_H +#define _LADSPA_PORT_DIALOG_H + + +#include + +#include "ladspa_manager.h" + + + + +class ladspaPortDialog : public QDialog +{ + Q_OBJECT +public: + ladspaPortDialog( const ladspa_key_t & _key ); + virtual ~ladspaPortDialog(); + +}; + + + + +#endif diff --git a/plugins/ladspa_browser/logo.png b/plugins/ladspa_browser/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6d757a2b04f134e5392f1384922633f11a039c46 GIT binary patch literal 3280 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 O0000