| 45 | |
| 46 | |
| 47 | EffectView::EffectView( Effect * _model, QWidget * _parent ) : |
| 48 | PluginView( _model, _parent ), |
| 49 | m_bg( embed::getIconPixmap( "effect_plugin" ) ), |
| 50 | m_subWindow( NULL ), |
| 51 | m_controlView( NULL ) |
| 52 | { |
| 53 | setFixedSize( 210, 60 ); |
| 54 | |
| 55 | // Disable effects that are of type "DummyEffect" |
| 56 | bool isEnabled = !dynamic_cast<DummyEffect *>( effect() ); |
| 57 | m_bypass = new LedCheckBox( this, "", isEnabled ? LedCheckBox::Green : LedCheckBox::Red ); |
| 58 | m_bypass->move( 3, 3 ); |
| 59 | m_bypass->setEnabled( isEnabled ); |
| 60 | m_bypass->setWhatsThis( tr( "Toggles the effect on or off." ) ); |
| 61 | |
| 62 | ToolTip::add( m_bypass, tr( "On/Off" ) ); |
| 63 | |
| 64 | |
| 65 | m_wetDry = new Knob( knobBright_26, this ); |
| 66 | m_wetDry->setLabel( tr( "W/D" ) ); |
| 67 | m_wetDry->move( 27, 5 ); |
| 68 | m_wetDry->setEnabled( isEnabled ); |
| 69 | m_wetDry->setHintText( tr( "Wet Level:" ), "" ); |
| 70 | m_wetDry->setWhatsThis( tr( "The Wet/Dry knob sets the ratio between " |
| 71 | "the input signal and the effect signal that " |
| 72 | "forms the output." ) ); |
| 73 | |
| 74 | |
| 75 | m_autoQuit = new TempoSyncKnob( knobBright_26, this ); |
| 76 | m_autoQuit->setLabel( tr( "DECAY" ) ); |
| 77 | m_autoQuit->move( 60, 5 ); |
| 78 | m_autoQuit->setEnabled( isEnabled && !effect()->m_autoQuitDisabled ); |
| 79 | m_autoQuit->setHintText( tr( "Time:" ), "ms" ); |
| 80 | m_autoQuit->setWhatsThis( tr( |
| 81 | "The Decay knob controls how many buffers of silence must pass before the " |
| 82 | "plugin stops processing. Smaller values will reduce the CPU overhead but " |
| 83 | "run the risk of clipping the tail on delay and reverb effects." ) ); |
| 84 | |
| 85 | |
| 86 | m_gate = new Knob( knobBright_26, this ); |
| 87 | m_gate->setLabel( tr( "GATE" ) ); |
| 88 | m_gate->move( 93, 5 ); |
| 89 | m_gate->setEnabled( isEnabled && !effect()->m_autoQuitDisabled ); |
| 90 | m_gate->setHintText( tr( "Gate:" ), "" ); |
| 91 | m_gate->setWhatsThis( tr( |
| 92 | "The Gate knob controls the signal level that is considered to be 'silence' " |
| 93 | "while deciding when to stop processing signals." ) ); |
| 94 | |
| 95 | |
| 96 | setModel( _model ); |
| 97 | |
| 98 | if( effect()->controls()->controlCount() > 0 ) |
| 99 | { |
| 100 | QPushButton * ctls_btn = new QPushButton( tr( "Controls" ), |
| 101 | this ); |
| 102 | QFont f = ctls_btn->font(); |
| 103 | ctls_btn->setFont( pointSize<8>( f ) ); |
| 104 | ctls_btn->setGeometry( 140, 14, 50, 20 ); |
nothing calls this directly
no test coverage detected