Skip to content

Commit

Permalink
Merge pull request #2816 from BaraMGB/PeakControllerGUI
Browse files Browse the repository at this point in the history
provides a new GUI for the peak controller plugin
  • Loading branch information
Umcaruje committed Jun 9, 2016
2 parents 2d04870 + 4617bfa commit 9eec9a0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
Binary file modified data/themes/default/lfo_controller_artwork.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/peak_controller_effect/artwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
PeakControllerEffectControls * _controls ) :
EffectControlDialog( _controls )
{
setWindowIcon( embed::getIconPixmap( "controller" ) );
setAutoFillBackground( true );
QPalette pal;
pal.setBrush( backgroundRole(),
PLUGIN_NAME::getIconPixmap( "artwork" ) );
setPalette( pal );
setFixedSize( 240, 100 );

QVBoxLayout * tl = new QVBoxLayout( this );
tl->setContentsMargins( 5, 30, 5, 8 );

QHBoxLayout * l = new QHBoxLayout;
l->setSpacing( 4 );
m_baseKnob = new Knob( knobBright_26, this );
m_baseKnob->setLabel( tr( "BASE" ) );
m_baseKnob->setModel( &_controls->m_baseModel );
Expand Down Expand Up @@ -80,28 +77,30 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
m_tresholdKnob->setModel( &_controls->m_tresholdModel );
m_tresholdKnob->setHintText( tr( "Treshold:" ) , "" );

l->addWidget( m_baseKnob );
l->addWidget( m_amountKnob );
l->addWidget( m_amountMultKnob );
l->addWidget( m_attackKnob );
l->addWidget( m_decayKnob );
l->addWidget( m_tresholdKnob );
l->addStretch(); // expand, so other widgets have minimum width
tl->addLayout( l );

QVBoxLayout * l2 = new QVBoxLayout; // = 2nd vbox

m_muteLed = new LedCheckBox( "Mute Effect", this );
m_muteLed->setModel( &_controls->m_muteModel );

m_absLed = new LedCheckBox( "Absolute Value", this );
m_absLed->setModel( &_controls->m_absModel );

l2->addWidget( m_muteLed );
l2->addWidget( m_absLed );
l2->addStretch(); // expand, so other widgets have minimum height
tl->addLayout( l2 );
QVBoxLayout * mainLayout = new QVBoxLayout();
QHBoxLayout * knobLayout = new QHBoxLayout();
QHBoxLayout * ledLayout = new QHBoxLayout();

knobLayout->addWidget( m_baseKnob );
knobLayout->addWidget( m_amountKnob );
knobLayout->addWidget( m_amountMultKnob );
knobLayout->addWidget( m_attackKnob );
knobLayout->addWidget( m_decayKnob );
knobLayout->addWidget( m_tresholdKnob );

ledLayout->addWidget( m_muteLed );
ledLayout->addWidget( m_absLed );

mainLayout->setContentsMargins( 0, 30, 0, 0 );
mainLayout->addLayout( knobLayout );
mainLayout->addLayout( ledLayout );

setLayout( tl );
this->setLayout( mainLayout );
}

2 changes: 1 addition & 1 deletion src/gui/LfoControllerDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent


m_amountKnob = new Knob( knobBright_26, this );
m_amountKnob->setLabel( tr( "AMT" ) );
m_amountKnob->setLabel( tr( "AMNT" ) );
m_amountKnob->move( CD_LFO_AMOUNT_CD_KNOB_X, CD_LFO_CD_KNOB_Y );
m_amountKnob->setHintText( tr( "Modulation amount:" ), "" );
m_amountKnob->setWhatsThis(
Expand Down

0 comments on commit 9eec9a0

Please sign in to comment.