diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index ee54629b3..192d58d33 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -889,6 +889,19 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume l->addWidget( m_syncButton, 0, 0, 1, 2, Qt::AlignLeft ); + m_displayAutomatedOnly = new QPushButton( tr( "Automated" ), this ); + connect( m_displayAutomatedOnly, SIGNAL( clicked() ), this, + SLOT( displayAutomatedOnly() ) ); + m_displayAutomatedOnly->setWhatsThis( + tr( "Click here if you want to display automated parameters only." ) ); + + l->addWidget( m_displayAutomatedOnly, 0, 1, 1, 2, Qt::AlignLeft ); + + for( int i = 0; i < 10; i++ ) + { + l->addItem( new QSpacerItem( 68, 45, QSizePolicy::Fixed, QSizePolicy::Fixed ), 0, i ); + } + const QMap & dump = m_vi->m_plugin->parameterDump(); m_vi->paramCount = dump.size(); @@ -979,6 +992,31 @@ void manageVestigeInstrumentView::syncPlugin( void ) } + + +void manageVestigeInstrumentView::displayAutomatedOnly( void ) +{ + bool isAuto = QString::compare( m_displayAutomatedOnly->text(), tr( "Automated" ) ) == 0; + + for( int i = 0; i< m_vi->paramCount; i++ ) + { + + if( !( m_vi->knobFModel[ i ]->isAutomated() || + m_vi->knobFModel[ i ]->getControllerConnection() ) ) + { + if( m_vi->vstKnobs[ i ]->isVisible() == true && isAuto ) + { + m_vi->vstKnobs[ i ]->hide(); + m_displayAutomatedOnly->setText( "All" ); + } else { + m_vi->vstKnobs[ i ]->show(); + m_displayAutomatedOnly->setText( "Automated" ); + } + } + } +} + + manageVestigeInstrumentView::~manageVestigeInstrumentView() { if( m_vi->knobFModel != NULL ) diff --git a/plugins/vestige/vestige.h b/plugins/vestige/vestige.h index 0320fe4b6..299cdda3e 100644 --- a/plugins/vestige/vestige.h +++ b/plugins/vestige/vestige.h @@ -111,6 +111,7 @@ public: protected slots: void syncPlugin( void ); + void displayAutomatedOnly( void ); void setParameter( void ); @@ -128,6 +129,7 @@ private: QWidget *widget; QGridLayout * l; QPushButton * m_syncButton; + QPushButton * m_displayAutomatedOnly; } ; diff --git a/plugins/vst_effect/VstEffectControls.cpp b/plugins/vst_effect/VstEffectControls.cpp index ec74eea6a..c8b0766cc 100644 --- a/plugins/vst_effect/VstEffectControls.cpp +++ b/plugins/vst_effect/VstEffectControls.cpp @@ -331,6 +331,19 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls * l->addWidget( m_syncButton, 0, 0, 1, 2, Qt::AlignLeft ); + m_displayAutomatedOnly = new QPushButton( tr( "Automated" ), widget ); + connect( m_displayAutomatedOnly, SIGNAL( clicked() ), this, + SLOT( displayAutomatedOnly() ) ); + m_displayAutomatedOnly->setWhatsThis( + tr( "Click here if you want to display automated parameters only." ) ); + + l->addWidget( m_displayAutomatedOnly, 0, 1, 1, 2, Qt::AlignLeft ); + + for( int i = 0; i < 10; i++ ) + { + l->addItem( new QSpacerItem( 68, 45, QSizePolicy::Fixed, QSizePolicy::Fixed ), 0, i ); + } + const QMap & dump = m_effect->m_plugin->parameterDump(); m_vi->paramCount = dump.size(); @@ -424,6 +437,30 @@ void manageVSTEffectView::syncPlugin( void ) +void manageVSTEffectView::displayAutomatedOnly( void ) +{ + bool isAuto = QString::compare( m_displayAutomatedOnly->text(), tr( "Automated" ) ) == 0; + + for( int i = 0; i< m_vi2->paramCount; i++ ) + { + + if( !( m_vi2->knobFModel[ i ]->isAutomated() || + m_vi2->knobFModel[ i ]->getControllerConnection() ) ) + { + if( m_vi2->vstKnobs[ i ]->isVisible() == true && isAuto ) + { + m_vi2->vstKnobs[ i ]->hide(); + m_displayAutomatedOnly->setText( "All" ); + } else { + m_vi2->vstKnobs[ i ]->show(); + m_displayAutomatedOnly->setText( "Automated" ); + } + } + } +} + + + void manageVSTEffectView::setParameter( void ) { diff --git a/plugins/vst_effect/VstEffectControls.h b/plugins/vst_effect/VstEffectControls.h index 1c92cfefe..67622196f 100644 --- a/plugins/vst_effect/VstEffectControls.h +++ b/plugins/vst_effect/VstEffectControls.h @@ -113,6 +113,7 @@ public: protected slots: void syncPlugin( void ); + void displayAutomatedOnly( void ); void setParameter( void ); private: @@ -129,6 +130,7 @@ private: QGridLayout * l; QPushButton * m_syncButton; + QPushButton * m_displayAutomatedOnly; } ;