From 8654b47182ce65207e4a7ac63d376787cc7f94d1 Mon Sep 17 00:00:00 2001 From: Paul Giblock Date: Fri, 6 Jun 2008 07:42:21 +0000 Subject: [PATCH] Update some plugins to use displayName git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1079 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 17 +++++ .../audio_file_processor.cpp | 27 ++++---- .../bassbooster_control_dialog.cpp | 6 +- plugins/bass_booster/bassbooster_controls.cpp | 6 +- plugins/bit_invader/bit_invader.cpp | 4 +- plugins/kicker/kicker.cpp | 24 +++---- plugins/lb302/lb302.cpp | 50 +++++++------- plugins/organic/organic.cpp | 44 ++++++------ plugins/organic/organic.h | 2 +- plugins/sf2_player/sf2_player.cpp | 69 +++++++++---------- .../stereoenhancer_control_dialog.cpp | 2 +- .../stereoenhancer_controls.cpp | 2 +- .../stereomatrix_control_dialog.cpp | 16 ++--- .../stereo_matrix/stereomatrix_controls.cpp | 8 +-- plugins/vibed/nine_button_selector.cpp | 3 +- src/core/ladspa_control.cpp | 6 +- 16 files changed, 151 insertions(+), 135 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44095f351..651700abe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,23 @@ - add support for sequenced midi in midi-controllers - add displayName field to model / autoModel for descriptive model trees - use displayName for midiController and contextMenus + + * src/core/ladspa_control.cpp: + * plugins/lb302/lb302.cpp: + * plugins/organic/organic.cpp: + * plugins/organic/organic.h: + * plugins/bass_booster/bassbooster_control_dialog.cpp: + * plugins/bass_booster/bassbooster_controls.cpp: + * plugins/stereo_matrix/stereomatrix_control_dialog.cpp: + * plugins/stereo_matrix/stereomatrix_controls.cpp: + * plugins/bit_invader/bit_invader.cpp: + * plugins/vibed/nine_button_selector.cpp: + * plugins/audio_file_processor/audio_file_processor.cpp: + * plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp: + * plugins/stereo_enhancer/stereoenhancer_controls.cpp: + * plugins/sf2_player/sf2_player.cpp: + * plugins/kicker/kicker.cpp: + Update plugins to use displayName for children 2008-06-05 Tobias Doerffel diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index f8043285a..2234e7a1c 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -69,15 +69,14 @@ plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor = - audioFileProcessor::audioFileProcessor( instrumentTrack * _instrument_track ) : instrument( _instrument_track, &audiofileprocessor_plugin_descriptor ), m_sampleBuffer(), - m_ampModel( 100, 0, 500, 1, this ), - m_startPointModel( 0, 0, 1, 0.0000001f, this ), - m_endPointModel( 1, 0, 1, 0.0000001f, this ), - m_reverseModel( FALSE, this ), - m_loopModel( FALSE, this ) + m_ampModel( 100, 0, 500, 1, this, tr( "Amplify" ) ), + m_startPointModel( 0, 0, 1, 0.0000001f, this, tr( "Start of sample") ), + m_endPointModel( 1, 0, 1, 0.0000001f, this, tr( "End of sample" ) ), + m_reverseModel( FALSE, this, tr( "Reverse sample" ) ), + m_loopModel( FALSE, this, tr( "Loop") ) { connect( &m_reverseModel, SIGNAL( dataChanged() ), this, SLOT( reverseModelChanged() ) ); @@ -334,8 +333,8 @@ const QStringList & audioFileProcessor::subPluginFeatures::supportedExtensions( class audioFileKnob : public knob { public: - audioFileKnob( QWidget * _parent, const QString & _name ) : - knob( knobStyled, _parent, _name ) + audioFileKnob( QWidget * _parent ) : + knob( knobStyled, _parent ) { setFixedSize( 37, 47 ); } @@ -357,7 +356,7 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument, "artwork" ) ); } - m_openAudioFileButton = new pixmapButton( this, NULL ); + m_openAudioFileButton = new pixmapButton( this ); m_openAudioFileButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_openAudioFileButton->move( 227, 72 ); m_openAudioFileButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -376,7 +375,7 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument, "are not reset, so please don't wonder if your sample " "doesn't sound like the original one..." ) ); - m_reverseButton = new pixmapButton( this, NULL ); + m_reverseButton = new pixmapButton( this ); m_reverseButton->setCheckable( TRUE ); m_reverseButton->move( 184, 124 ); m_reverseButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -389,7 +388,7 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument, "This is useful for cool effects, e.g. a reversed " "crash." ) ); - m_loopButton = new pixmapButton( this, tr( "Loop" ) ); + m_loopButton = new pixmapButton( this ); m_loopButton->setCheckable( TRUE ); m_loopButton->move( 220, 124 ); m_loopButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -405,7 +404,7 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument, "This is useful for things like string- and choir-" "samples." ) ); - m_ampKnob = new volumeKnob( knobStyled, this, tr( "Amplify" ) ); + m_ampKnob = new volumeKnob( knobStyled, this ); m_ampKnob->move( 17, 108 ); m_ampKnob->setFixedSize( 37, 47 ); m_ampKnob->setHintText( tr( "Amplify:" )+" ", "%" ); @@ -415,7 +414,7 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument, "Otherwise it will be amplified up or down (your " "actual sample-file isn't touched!)" ) ); - m_startKnob = new audioFileKnob( this, tr( "Start of sample" ) ); + m_startKnob = new audioFileKnob( this ); m_startKnob->move( 68, 108 ); m_startKnob->setHintText( tr( "Startpoint:" )+" ", "" ); m_startKnob->setWhatsThis( @@ -425,7 +424,7 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument, "which AudioFileProcessor returns if a note is longer " "than the sample between start- and end-point." ) ); - m_endKnob = new audioFileKnob( this, tr( "End of sample" ) ); + m_endKnob = new audioFileKnob( this ); m_endKnob->move( 119, 108 ); m_endKnob->setHintText( tr( "Endpoint:" )+" ", "" ); m_endKnob->setWhatsThis( diff --git a/plugins/bass_booster/bassbooster_control_dialog.cpp b/plugins/bass_booster/bassbooster_control_dialog.cpp index 072933a12..65581b754 100644 --- a/plugins/bass_booster/bassbooster_control_dialog.cpp +++ b/plugins/bass_booster/bassbooster_control_dialog.cpp @@ -36,17 +36,17 @@ bassBoosterControlDialog::bassBoosterControlDialog( { QHBoxLayout * l = new QHBoxLayout( this ); - knob * freqKnob = new knob( knobBright_26, this, tr( "Frequency" ) ); + knob * freqKnob = new knob( knobBright_26, this); freqKnob->setModel( &_controls->m_freqModel ); freqKnob->setLabel( tr( "FREQ" ) ); freqKnob->setHintText( tr( "Frequency:" ) + " ", "Hz" ); - knob * gainKnob = new knob( knobBright_26, this, tr( "Gain" ) ); + knob * gainKnob = new knob( knobBright_26, this ); gainKnob->setModel( &_controls->m_gainModel ); gainKnob->setLabel( tr( "GAIN" ) ); gainKnob->setHintText( tr( "Gain:" ) + " ", "" ); - knob * ratioKnob = new knob( knobBright_26, this, tr( "Ratio" ) ); + knob * ratioKnob = new knob( knobBright_26, this ); ratioKnob->setModel( &_controls->m_ratioModel ); ratioKnob->setLabel( tr( "RATIO" ) ); ratioKnob->setHintText( tr( "Ratio:" ) + " ", "" ); diff --git a/plugins/bass_booster/bassbooster_controls.cpp b/plugins/bass_booster/bassbooster_controls.cpp index bcce55b15..ee3118593 100644 --- a/plugins/bass_booster/bassbooster_controls.cpp +++ b/plugins/bass_booster/bassbooster_controls.cpp @@ -31,9 +31,9 @@ bassBoosterControls::bassBoosterControls( bassBoosterEffect * _eff ) : effectControls( _eff ), m_effect( _eff ), - m_freqModel( 100.0f, 50.0f, 200.0f, 1.0f, this ), - m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this ), - m_ratioModel( 2.0f, 0.1f, 10.0f, 0.1f, this ) + m_freqModel( 100.0f, 50.0f, 200.0f, 1.0f, this, tr( "Frequency" ) ), + m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ), + m_ratioModel( 2.0f, 0.1f, 10.0f, 0.1f, this, tr( "Ratio" ) ) { connect( &m_freqModel, SIGNAL( dataChanged() ), this, SLOT( changeFrequency() ) ); diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 8c3d64154..1a8c1dce5 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -149,7 +149,7 @@ sample_t bSynth::nextStringSample( void ) bitInvader::bitInvader( instrumentTrack * _channel_track ) : instrument( _channel_track, &bitinvader_plugin_descriptor ), - m_sampleLength( 128, 8, 128, 1, this ), + m_sampleLength( 128, 8, 128, 1, this, tr( "Samplelength" ) ), m_graph( -1.0f, 1.0f, 128, this ), m_interpolation( FALSE, this ), m_normalize( FALSE, this) @@ -326,7 +326,7 @@ bitInvaderView::bitInvaderView( instrument * _instrument, "artwork" ) ); setPalette( pal ); - m_sampleLengthKnob = new knob( knobDark_28, this, tr( "Samplelength" ) ); + m_sampleLengthKnob = new knob( knobDark_28, this ); m_sampleLengthKnob->move( 10, 120 ); m_sampleLengthKnob->setHintText( tr( "Sample Length" ) + " ", "" ); diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index 5dc53b881..3f61dde3e 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -58,11 +58,11 @@ plugin::descriptor PLUGIN_EXPORT kicker_plugin_descriptor = kickerInstrument::kickerInstrument( instrumentTrack * _instrument_track ) : instrument( _instrument_track, &kicker_plugin_descriptor ), - m_startFreqModel( 150.0f, 5.0f, 1000.0f, 1.0f, this ), - m_endFreqModel( 40.0f, 5.0f, 1000.0f, 1.0f, this ), - m_decayModel( 120.0f, 5.0f, 1000.0f, 1.0f, this ), - m_distModel( 0.8f, 0.0f, 100.0f, 0.1f, this ), - m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this ) + m_startFreqModel( 150.0f, 5.0f, 1000.0f, 1.0f, this, tr( "Start frequency" ) ), + m_endFreqModel( 40.0f, 5.0f, 1000.0f, 1.0f, this, tr( "End frequency" ) ), + m_decayModel( 120.0f, 5.0f, 1000.0f, 1.0f, this, tr( "Decay" ) ), + m_distModel( 0.8f, 0.0f, 100.0f, 0.1f, this, tr( "Distortion" ) ), + m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ) { m_startFreqModel.setTrack( _instrument_track ); m_endFreqModel.setTrack( _instrument_track ); @@ -192,8 +192,8 @@ pluginView * kickerInstrument::instantiateView( QWidget * _parent ) class kickerKnob : public knob { public: - kickerKnob( QWidget * _parent, const QString & _name ) : - knob( knobStyled, _parent, _name ) + kickerKnob( QWidget * _parent ) : + knob( knobStyled, _parent ) { setFixedSize( 37, 47 ); } @@ -206,23 +206,23 @@ kickerInstrumentView::kickerInstrumentView( instrument * _instrument, QWidget * _parent ) : instrumentView( _instrument, _parent ) { - m_startFreqKnob = new kickerKnob( this, tr( "Start frequency" ) ); + m_startFreqKnob = new kickerKnob( this ); m_startFreqKnob->setHintText( tr( "Start frequency:" ) + " ", "Hz" ); m_startFreqKnob->move( 12, 124 ); - m_endFreqKnob = new kickerKnob( this, tr( "End frequency" ) ); + m_endFreqKnob = new kickerKnob( this ); m_endFreqKnob->setHintText( tr( "End frequency:" ) + " ", "Hz" ); m_endFreqKnob->move( 59, 124 ); - m_decayKnob = new kickerKnob( this, tr( "Decay" ) ); + m_decayKnob = new kickerKnob( this ); m_decayKnob->setHintText( tr( "Decay:" ) + " ", "ms" ); m_decayKnob->move( 107, 124 ); - m_distKnob = new kickerKnob( this, tr( "Distortion" ) ); + m_distKnob = new kickerKnob( this ); m_distKnob->setHintText( tr( "Distortion:" ) + " ", "" ); m_distKnob->move( 155, 124 ); - m_gainKnob = new kickerKnob( this, tr( "Gain" ) ); + m_gainKnob = new kickerKnob( this ); m_gainKnob->setHintText( tr( "Gain:" ) + " ", "" ); m_gainKnob->move( 203, 124 ); diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 9fea0dc67..c2d28a081 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -320,18 +320,18 @@ void lb302Filter3Pole::setState(const lb302FilterState* fs) lb302Synth::lb302Synth( instrumentTrack * _instrumentTrack ) : instrument( _instrumentTrack, &lb302_plugin_descriptor ), - vcf_cut_knob( 0.75f, 0.0f, 1.5f, 0.005f, this ), - vcf_res_knob( 0.75f, 0.0f, 1.25f, 0.005f, this ), - vcf_mod_knob( 0.1f, 0.0f, 1.0f, 0.005f, this ), - vcf_dec_knob( 0.1f, 0.0f, 1.0f, 0.005f, this ), - vco_fine_detune_knob( 0.0f, -100.0f, 100.0f, 1.0f, this ), - dist_knob( 0.0f, 0.0f, 1.0f, 0.01f, this ), - wave_knob( 0.0f, 0.0f, 5.0f, 1.0f, this ), - slide_dec_knob( 0.6f, 0.0f, 1.0f, 0.005f, this ), - slideToggle( FALSE, this ), - accentToggle( FALSE, this ), - deadToggle( FALSE, this ), - db24Toggle( FALSE, this ) + vcf_cut_knob( 0.75f, 0.0f, 1.5f, 0.005f, this, tr( "VCF Cutoff Frequency" ) ), + vcf_res_knob( 0.75f, 0.0f, 1.25f, 0.005f, this, tr( "VCF Resonance" ) ), + vcf_mod_knob( 0.1f, 0.0f, 1.0f, 0.005f, this, tr( "VCF Envelope Mod" ) ), + vcf_dec_knob( 0.1f, 0.0f, 1.0f, 0.005f, this, tr( "VCF Envelope Decay" ) ), + vco_fine_detune_knob( 0.0f, -100.0f, 100.0f, 1.0f, this, tr( "VCO Fine Detuning:") ), + dist_knob( 0.0f, 0.0f, 1.0f, 0.01f, this, tr( "Distortion" ) ), + wave_knob( 0.0f, 0.0f, 5.0f, 1.0f, this, tr( "Waveform" ) ), + slide_dec_knob( 0.6f, 0.0f, 1.0f, 0.005f, this, tr( "Slide Decay" ) ), + slideToggle( FALSE, this, tr( "Slide" ) ), + accentToggle( FALSE, this, tr( "Accent" ) ), + deadToggle( FALSE, this, tr( "Dead" ) ), + db24Toggle( FALSE, this, tr( "24dB/oct Filter" ) ) { @@ -972,59 +972,59 @@ lb302SynthView::lb302SynthView( instrument * _instrument, QWidget * _parent ) : instrumentView( _instrument, _parent ) { // GUI - m_vcfCutKnob = new knob( knobBright_26, this, tr( "VCF Cutoff Frequency" ) ); + m_vcfCutKnob = new knob( knobBright_26, this ); m_vcfCutKnob->move( 75, 130 ); m_vcfCutKnob->setHintText( tr( "Cutoff Freq:" ) + " ", "" ); m_vcfCutKnob->setLabel( tr("CUT") ); - m_vcfResKnob = new knob( knobBright_26, this, tr( "VCF Resonance" ) ); + m_vcfResKnob = new knob( knobBright_26, this ); m_vcfResKnob->move( 120, 130 ); m_vcfResKnob->setHintText( tr( "Resonance:" ) + " ", "" ); m_vcfResKnob->setLabel( tr("RES") ); - m_vcfModKnob = new knob( knobBright_26, this, tr( "VCF Envelope Mod" ) ); + m_vcfModKnob = new knob( knobBright_26, this ); m_vcfModKnob->move( 165, 130 ); m_vcfModKnob->setHintText( tr( "Env Mod:" ) + " ", "" ); m_vcfModKnob->setLabel( tr("ENV MOD") ); - m_vcfDecKnob = new knob( knobBright_26, this, tr( "VCF Envelope Decay" ) ); + m_vcfDecKnob = new knob( knobBright_26, this ); m_vcfDecKnob->move( 210, 130 ); m_vcfDecKnob->setHintText( tr( "Decay:" ) + " ", "" ); m_vcfDecKnob->setLabel( tr("DEC") ); - m_slideToggle = new ledCheckBox( "Slide", this, tr( "Slide" ) ); + m_slideToggle = new ledCheckBox( "Slide", this ); m_slideToggle->move( 10, 180 ); - m_accentToggle = new ledCheckBox( "Accent", this, tr( "Accent" ) ); + m_accentToggle = new ledCheckBox( "Accent", this ); m_accentToggle->move( 10, 200 ); m_accentToggle->setDisabled(true); - m_deadToggle = new ledCheckBox( "Dead", this, tr( "Dead" ) ); + m_deadToggle = new ledCheckBox( "Dead", this ); m_deadToggle->move( 10, 220 ); - m_db24Toggle = new ledCheckBox( "24dB/oct", this, + m_db24Toggle = new ledCheckBox( "24dB/oct", this ); + m_db24Toggle->setWhatsThis( tr( "303-es-que, 24dB/octave, 3 pole filter" ) ); m_db24Toggle->move( 10, 150); - m_slideDecKnob = new knob( knobBright_26, this, tr( "Slide Decay" ) ); + m_slideDecKnob = new knob( knobBright_26, this ); m_slideDecKnob->move( 210, 75 ); m_slideDecKnob->setHintText( tr( "Slide Decay:" ) + " ", "" ); m_slideDecKnob->setLabel( tr( "SLIDE")); - m_vcoFineDetuneKnob = new knob( knobBright_26, this, - tr("Fine detuning of the VCO. Ranged between -100 and 100 centes.") ); + m_vcoFineDetuneKnob = new knob( knobBright_26, this ); m_vcoFineDetuneKnob->move(165, 75); m_vcoFineDetuneKnob->setHintText( tr( "VCO Fine Detuning:") + " ", "cents"); m_vcoFineDetuneKnob->setLabel( tr( "DETUNE")); - m_distKnob = new knob( knobBright_26, this, tr( "Distortion" ) ); + m_distKnob = new knob( knobBright_26, this ); m_distKnob->move( 210, 190 ); m_distKnob->setHintText( tr( "DIST:" ) + " ", "" ); m_distKnob->setLabel( tr( "DIST")); - m_waveKnob = new knob( knobBright_26, this, tr( "Waveform" ) ); + m_waveKnob = new knob( knobBright_26, this ); m_waveKnob->move( 120, 75 ); m_waveKnob->setHintText( tr( "WAVE:" ) + " ", "" ); m_waveKnob->setLabel( tr( "WAVE")); diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index b4e0361ee..e70839bc9 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -77,15 +77,15 @@ QPixmap * organicInstrumentView::s_artwork = NULL; organicInstrument::organicInstrument( instrumentTrack * _channel_track ) : instrument( _channel_track, &organic_plugin_descriptor ), m_modulationAlgo( oscillator::SignalMix ), - m_fx1Model( 0.0f, 0.0f, 0.99f, 0.01f , this ), - m_volModel( 100.0f, 0.0f, 200.0f, 1.0f, this ) + m_fx1Model( 0.0f, 0.0f, 0.99f, 0.01f , this, tr( "Distortion" ) ), + m_volModel( 100.0f, 0.0f, 200.0f, 1.0f, this, tr( "Volume" ) ) { m_numOscillators = 8; m_osc = new oscillatorObject*[ m_numOscillators ]; for (int i=0; i < m_numOscillators; i++) { - m_osc[i] = new oscillatorObject( this, _channel_track ); + m_osc[i] = new oscillatorObject( this, _channel_track, i ); m_osc[i]->m_numOscillators = m_numOscillators; // Connect events @@ -370,8 +370,8 @@ pluginView * organicInstrument::instantiateView( QWidget * _parent ) class organicKnob : public knob { public: - organicKnob( QWidget * _parent, const QString & _name ) : - knob( knobStyled, _parent, _name ) + organicKnob( QWidget * _parent ) : + knob( knobStyled, _parent ) { setFixedSize( 21, 21 ); } @@ -393,17 +393,17 @@ organicInstrumentView::organicInstrumentView( instrument * _instrument, setPalette( pal ); // setup knob for FX1 - m_fx1Knob = new organicKnob( this, tr( "FX1" ) ); + m_fx1Knob = new organicKnob( this ); m_fx1Knob->move( 15, 201 ); m_fx1Knob->setFixedSize( 37, 47 ); + m_fx1Knob->setHintText( tr( "Distortion:" ) + " ", "%" ); m_fx1Knob->setObjectName( "fx1Knob" ); // setup volume-knob - m_volKnob = new organicKnob( this, tr( "Osc %1 volume" ).arg( - 1 ) ); + m_volKnob = new organicKnob( this ); m_volKnob->move( 60, 201 ); m_volKnob->setFixedSize( 37, 47 ); - m_volKnob->setHintText( tr( "Osc %1 volume:" ).arg( 1 ) + " ", "%" ); + m_volKnob->setHintText( tr( "Volume:" ).arg( 1 ) + " ", "%" ); m_volKnob->setObjectName( "volKnob" ); // randomise @@ -454,30 +454,26 @@ void organicInstrumentView::modelChanged( void ) for( int i = 0; i < m_numOscillators; ++i ) { // setup waveform-knob - knob * oscKnob = new organicKnob( this, tr( - "Osc %1 waveform" ).arg( i + 1 ) ); + knob * oscKnob = new organicKnob( this ); oscKnob->move( x + i * colWidth, y ); oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ) + " ", "%" ); // setup volume-knob - volumeKnob * volKnob = new volumeKnob( knobStyled, this, tr( - "Osc %1 volume" ).arg( i + 1 ) ); + volumeKnob * volKnob = new volumeKnob( knobStyled, this ); volKnob->move( x + i * colWidth, y + rowHeight*1 ); volKnob->setFixedSize( 21, 21 ); volKnob->setHintText( tr( "Osc %1 volume:" ).arg( i + 1 ) + " ", "%" ); // setup panning-knob - knob * panKnob = new organicKnob( this, - tr( "Osc %1 panning" ).arg( i + 1 ) ); + knob * panKnob = new organicKnob( this ); panKnob->move( x + i * colWidth, y + rowHeight*2 ); panKnob->setHintText( tr("Osc %1 panning:").arg( i + 1 ) + " ", "" ); // setup knob for left fine-detuning - knob * detuneKnob = new organicKnob( this, - tr( "Osc %1 fine detuning left" ).arg( i + 1 ) ); + knob * detuneKnob = new organicKnob( this ); detuneKnob->move( x + i * colWidth, y + rowHeight*3 ); detuneKnob->setHintText( tr( "Osc %1 fine detuning " "left:" ).arg( i + 1 ) @@ -501,13 +497,17 @@ void organicInstrumentView::modelChanged( void ) -oscillatorObject::oscillatorObject( model * _parent, track * _track ) : +oscillatorObject::oscillatorObject( model * _parent, track * _track, int _index ) : model( _parent ), m_waveShape( oscillator::SineWave, 0, oscillator::NumWaveShapes-1, this ), - m_oscModel( 0.0f, 0.0f, 5.0f, 1.0f, this ), - m_volModel( 100.0f, 0.0f, 100.0f, 1.0f, this ), - m_panModel( DefaultPanning, PanningLeft, PanningRight, 1.0f, this ), - m_detuneModel( 0.0f, -100.0f, 100.0f, 1.0f, this ) + m_oscModel( 0.0f, 0.0f, 5.0f, 1.0f, + this, tr( "Osc %1 waveform" ).arg( _index + 1 ) ), + m_volModel( 100.0f, 0.0f, 100.0f, 1.0f, + this, tr( "Osc %1 volume" ).arg( _index + 1 ) ), + m_panModel( DefaultPanning, PanningLeft, PanningRight, 1.0f, + this, tr( "Osc %1 panning" ).arg( _index + 1 ) ), + m_detuneModel( 0.0f, -100.0f, 100.0f, 1.0f, + this, tr( "Osc %1 fine detuning left" ).arg( _index + 1 ) ) { } diff --git a/plugins/organic/organic.h b/plugins/organic/organic.h index 594297bad..b7b052d00 100644 --- a/plugins/organic/organic.h +++ b/plugins/organic/organic.h @@ -61,7 +61,7 @@ private: float m_phaseOffsetLeft; float m_phaseOffsetRight; - oscillatorObject( model * _parent, track * _track ); + oscillatorObject( model * _parent, track * _track, int _index ); virtual ~oscillatorObject(); friend class organicInstrument; diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 4b5c93621..9b36d896b 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -75,19 +75,27 @@ sf2Instrument::sf2Instrument( instrumentTrack * _instrument_track ) : m_font( NULL ), m_fontId( 0 ), m_filename( "" ), - m_bankNum( -1, -1, 999, this ), - m_patchNum( -1, -1, 127, this ), - m_gain( 1.0f, 0.0f, 5.0f, 0.01f, this ), - m_reverbOn( 0, this ), - m_reverbRoomSize( FLUID_REVERB_DEFAULT_ROOMSIZE, 0, 1.0, 0.01f, this ), - m_reverbDamping( FLUID_REVERB_DEFAULT_DAMP, 0, 1.0, 0.01, this ), - m_reverbWidth( FLUID_REVERB_DEFAULT_WIDTH, 0, 1.0, 0.01f, this ), - m_reverbLevel( FLUID_REVERB_DEFAULT_LEVEL, 0, 1.0, 0.01f, this ), - m_chorusOn( 0, this ), - m_chorusNum( FLUID_CHORUS_DEFAULT_N, 0, 10.0, 1.0, this ), - m_chorusLevel( FLUID_CHORUS_DEFAULT_LEVEL, 0, 10.0, 0.01, this ), - m_chorusSpeed( FLUID_CHORUS_DEFAULT_SPEED, 0.29, 5.0, 0.01, this ), - m_chorusDepth( FLUID_CHORUS_DEFAULT_DEPTH, 0, 46.0, 0.05, this ) + m_bankNum( -1, -1, 999, this, tr("Bank") ), + m_patchNum( -1, -1, 127, this, tr("Patch") ), + m_gain( 1.0f, 0.0f, 5.0f, 0.01f, this, tr( "Gain" ) ), + m_reverbOn( 0, this, tr( "Reverb" ) ), + m_reverbRoomSize( FLUID_REVERB_DEFAULT_ROOMSIZE, 0, 1.0, 0.01f, + this, tr( "Reverb Roomsize" ) ), + m_reverbDamping( FLUID_REVERB_DEFAULT_DAMP, 0, 1.0, 0.01, + this, tr( "Reverb Damping" ) ), + m_reverbWidth( FLUID_REVERB_DEFAULT_WIDTH, 0, 1.0, 0.01f, + this, tr( "Reverb Width" ) ), + m_reverbLevel( FLUID_REVERB_DEFAULT_LEVEL, 0, 1.0, 0.01f, + this, tr( "Reverb Level" ) ), + m_chorusOn( 0, this, tr( "Chorus" ) ), + m_chorusNum( FLUID_CHORUS_DEFAULT_N, 0, 10.0, 1.0, + this, tr( "Chorus Lines" ) ), + m_chorusLevel( FLUID_CHORUS_DEFAULT_LEVEL, 0, 10.0, 0.01, + this, tr( "Chorus Level" ) ), + m_chorusSpeed( FLUID_CHORUS_DEFAULT_SPEED, 0.29, 5.0, 0.01, + this, tr( "Chorus Speed" ) ), + m_chorusDepth( FLUID_CHORUS_DEFAULT_DEPTH, 0, 46.0, 0.05, + this, tr( "Chorus Depth" ) ) { for( int i = 0; i < 128; ++i ) { @@ -614,12 +622,12 @@ sf2InstrumentView::sf2InstrumentView( instrument * _instrument, // LCDs - m_bankNumLcd = new lcdSpinBox( 3, this, "Bank" ); + m_bankNumLcd = new lcdSpinBox( 3, this ); m_bankNumLcd->setLabel( "BANK" ); m_bankNumLcd->addTextForValue( -1, "---" ); m_bankNumLcd->setEnabled( FALSE ); - m_patchNumLcd = new lcdSpinBox( 3, this, "Patch" ); + m_patchNumLcd = new lcdSpinBox( 3, this ); m_patchNumLcd->setLabel( "PATCH" ); m_patchNumLcd->addTextForValue( -1, "---" ); m_patchNumLcd->setEnabled( FALSE ); @@ -641,8 +649,7 @@ sf2InstrumentView::sf2InstrumentView( instrument * _instrument, vl->addLayout( hl ); // Gain - m_gainKnob = new knob( knobSmall_17, this, - tr( "Gain" ) ); + m_gainKnob = new knob( knobSmall_17, this ); m_gainKnob->setHintText( tr("Gain") + " ", "" ); m_gainKnob->setLabel( tr("GAIN") ); vl->addWidget( m_gainKnob ); @@ -650,25 +657,21 @@ sf2InstrumentView::sf2InstrumentView( instrument * _instrument, // Reverb hl = new QHBoxLayout(); - m_reverbOnLed = new ledCheckBox( "REVERB", this, tr( "Reverb" ) ); + m_reverbOnLed = new ledCheckBox( "REVERB", this ); - m_reverbRoomSizeKnob = new knob( knobSmall_17, this, - tr( "Reverb Roomsize" ) ); + m_reverbRoomSizeKnob = new knob( knobSmall_17, this ); m_reverbRoomSizeKnob->setHintText( tr("Reverb Roomsize:") + " ", "" ); m_reverbRoomSizeKnob->setLabel( tr("SIZE") ); - m_reverbDampingKnob = new knob( knobSmall_17, this, - tr( "Reverb Damping" ) ); + m_reverbDampingKnob = new knob( knobSmall_17, this ); m_reverbDampingKnob->setHintText( tr("Reverb Damping:") + " ", "" ); m_reverbDampingKnob->setLabel( tr("DAMP") ); - m_reverbWidthKnob = new knob( knobSmall_17, this, - tr( "Reverb Width" ) ); + m_reverbWidthKnob = new knob( knobSmall_17, this ); m_reverbWidthKnob->setHintText( tr("Reverb Width:") + " ", "" ); m_reverbWidthKnob->setLabel( tr("WIDTH") ); - m_reverbLevelKnob = new knob( knobSmall_17, this, - tr( "Reverb Level" ) ); + m_reverbLevelKnob = new knob( knobSmall_17, this ); m_reverbLevelKnob->setHintText( tr("Reverb Level:") + " ", "" ); m_reverbLevelKnob->setLabel( tr("LEVEL") ); @@ -683,25 +686,21 @@ sf2InstrumentView::sf2InstrumentView( instrument * _instrument, // Chorus hl = new QHBoxLayout(); - m_chorusOnLed = new ledCheckBox( "CHORUS", this, tr( "Chorus" ) ); + m_chorusOnLed = new ledCheckBox( "CHORUS", this ); - m_chorusNumKnob = new knob( knobSmall_17, this, - tr( "Chorus Lines" ) ); + m_chorusNumKnob = new knob( knobSmall_17, this ); m_chorusNumKnob->setHintText( tr("Chorus Lines:") + " ", "" ); m_chorusNumKnob->setLabel( tr("NUM") ); - m_chorusLevelKnob = new knob( knobSmall_17, this, - tr( "Chorus Level" ) ); + m_chorusLevelKnob = new knob( knobSmall_17, this ); m_chorusLevelKnob->setHintText( tr("Chorus Level:") + " ", "" ); m_chorusLevelKnob->setLabel( tr("LEVEL") ); - m_chorusSpeedKnob = new knob( knobSmall_17, this, - tr( "Chorus Speed" ) ); + m_chorusSpeedKnob = new knob( knobSmall_17, this ); m_chorusSpeedKnob->setHintText( tr("Chorus Speed:") + " ", "" ); m_chorusSpeedKnob->setLabel( tr("SPD") ); - m_chorusDepthKnob = new knob( knobSmall_17, this, - tr( "Chorus Depth" ) ); + m_chorusDepthKnob = new knob( knobSmall_17, this ); m_chorusDepthKnob->setHintText( tr("Chorus Depth:") + " ", "" ); m_chorusDepthKnob->setLabel( tr("DEPTH") ); diff --git a/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp b/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp index 8b4da06f2..9c61c19dd 100644 --- a/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp +++ b/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp @@ -37,7 +37,7 @@ stereoEnhancerControlDialog::stereoEnhancerControlDialog( { QHBoxLayout * l = new QHBoxLayout( this ); - knob * widthKnob = new knob( knobBright_26, this, tr( "Width" ) ); + knob * widthKnob = new knob( knobBright_26, this ); widthKnob->setModel( &_controls->m_widthModel ); widthKnob->setLabel( tr( "WIDE" ) ); widthKnob->setHintText( tr( "Width:" ) + " ", "samples" ); diff --git a/plugins/stereo_enhancer/stereoenhancer_controls.cpp b/plugins/stereo_enhancer/stereoenhancer_controls.cpp index 0d75dc2f2..f26e29a1c 100644 --- a/plugins/stereo_enhancer/stereoenhancer_controls.cpp +++ b/plugins/stereo_enhancer/stereoenhancer_controls.cpp @@ -29,7 +29,7 @@ stereoEnhancerControls::stereoEnhancerControls( stereoEnhancerEffect * _eff ) : effectControls( _eff ), m_effect( _eff ), - m_widthModel(0.0f, 0.0f, 180.0f, 1.0f) + m_widthModel(0.0f, 0.0f, 180.0f, 1.0f, tr( "Width" ) ) { connect( &m_widthModel, SIGNAL( dataChanged( void ) ), this, SLOT( changeWideCoeff( void ) ) ); diff --git a/plugins/stereo_matrix/stereomatrix_control_dialog.cpp b/plugins/stereo_matrix/stereomatrix_control_dialog.cpp index df2ccd12e..c38e5e00f 100644 --- a/plugins/stereo_matrix/stereomatrix_control_dialog.cpp +++ b/plugins/stereo_matrix/stereomatrix_control_dialog.cpp @@ -41,21 +41,21 @@ stereoMatrixControlDialog::stereoMatrixControlDialog( QGridLayout * l = new QGridLayout( this ); - knob * llKnob = new knob( knobBright_26, this, tr( "Left to Left" ) ); + knob * llKnob = new knob( knobBright_26, this ); llKnob->setModel( &_controls->m_llModel ); - llKnob->setHintText( tr( "Volume:" ) + " ", "" ); + llKnob->setHintText( tr( "Left to Left Vol:" ) + " ", "" ); - knob * lrKnob = new knob( knobBright_26, this, tr( "Left to Right" ) ); + knob * lrKnob = new knob( knobBright_26, this ); lrKnob->setModel( &_controls->m_lrModel ); - lrKnob->setHintText( tr( "Volume:" ) + " ", "" ); + lrKnob->setHintText( tr( "Left to Right Vol:" ) + " ", "" ); - knob * rlKnob = new knob( knobBright_26, this, tr( "Right to Left" ) ); + knob * rlKnob = new knob( knobBright_26, this ); rlKnob->setModel( &_controls->m_rlModel ); - rlKnob->setHintText( tr( "Volume:" ) + " ", "" ); + rlKnob->setHintText( tr( "Right to Left Vol:" ) + " ", "" ); - knob * rrKnob = new knob( knobBright_26, this, tr( "Right to Right" ) ); + knob * rrKnob = new knob( knobBright_26, this ); rrKnob->setModel( &_controls->m_rrModel ); - rrKnob->setHintText( tr( "Volume:" ) + " ", "" ); + rrKnob->setHintText( tr( "Right to Right Vol:" ) + " ", "" ); l->addWidget( new QLabel( "L", this ), 1, 0); l->addWidget( new QLabel( "R", this ), 2, 0); diff --git a/plugins/stereo_matrix/stereomatrix_controls.cpp b/plugins/stereo_matrix/stereomatrix_controls.cpp index df8347695..0f0072b08 100644 --- a/plugins/stereo_matrix/stereomatrix_controls.cpp +++ b/plugins/stereo_matrix/stereomatrix_controls.cpp @@ -29,10 +29,10 @@ stereoMatrixControls::stereoMatrixControls( stereoMatrixEffect * _eff ) : effectControls( _eff ), m_effect( _eff ), - m_llModel( 1.0f, -1.0f, 1.0f, 0.01f ), - m_lrModel( 0.0f, -1.0f, 1.0f, 0.01f ), - m_rlModel( 0.0f, -1.0f, 1.0f, 0.01f ), - m_rrModel( 1.0f, -1.0f, 1.0f, 0.01f ) + m_llModel( 1.0f, -1.0f, 1.0f, 0.01f, this, tr( "Left to Left" ) ), + m_lrModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Left to Right" ) ), + m_rlModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Right to Left" ) ), + m_rrModel( 1.0f, -1.0f, 1.0f, 0.01f, this, tr( "Right to Right" ) ) { connect( &m_llModel, SIGNAL( dataChanged( void ) ), this, SLOT( changeMatrix( void ) ) ); diff --git a/plugins/vibed/nine_button_selector.cpp b/plugins/vibed/nine_button_selector.cpp index 06de0f601..48b288810 100644 --- a/plugins/vibed/nine_button_selector.cpp +++ b/plugins/vibed/nine_button_selector.cpp @@ -53,7 +53,8 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, Uint32 _x, Uint32 _y, QWidget * _parent ): QWidget( _parent ), - intModelView( new nineButtonSelectorModel(0, 8, _default, NULL, TRUE ) ) + intModelView( new nineButtonSelectorModel(0, 8, _default, NULL, + QString::null, TRUE ) ) { setFixedSize( 50, 50 ); m_base = QPixmap::grabWidget( _parent, _x, _y ); diff --git a/src/core/ladspa_control.cpp b/src/core/ladspa_control.cpp index 4e8b0831d..1b08c35e4 100644 --- a/src/core/ladspa_control.cpp +++ b/src/core/ladspa_control.cpp @@ -32,9 +32,9 @@ ladspaControl::ladspaControl( model * _parent, port_desc_t * _port, model( _parent ), m_link( _link ), m_port( _port ), - m_linkEnabledModel( _link, this ), - m_toggledModel( FALSE, this ), - m_knobModel( 0, 0, 0, 1, this ), + m_linkEnabledModel( _link, this, tr( "Link channels" ) ), + m_toggledModel( FALSE, this, m_port->name ), + m_knobModel( 0, 0, 0, 1, this, m_port->name ), m_tempoSyncKnobModel( 0, 0, 0, 1, 1.0, this ) { if( m_link )