more displayName updates, minor change to controller dialog

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1103 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-06-08 12:16:32 +00:00
parent 704a9cf2f4
commit f39c9641ab
24 changed files with 203 additions and 134 deletions

View File

@@ -3,6 +3,37 @@
* src/gui/widgets/graph.cpp:
Fix graph widget
* include/mv_base.h:
* src/core/mv_base.cpp:
Add recursive fullDisplayName function
* include/combobox_model.h:
* src/gui/widgets/automatable_button.cpp:
* src/gui/widgets/combobox.cpp:
* src/gui/widgets/tempo_sync_knob.cpp:
* src/gui/widgets/effect_view.cpp:
* src/gui/lfo_controller_dialog.cpp:
* src/core/midi/midi_port.cpp:
* src/core/fx_mixer.cpp:
* src/core/lfo_controller.cpp:
* src/core/effect.cpp:
extend more models and views for displayName
* include/instrument.h:
* src/gui/widgets/instrument_sound_shaping_view.cpp:
* src/gui/widgets/envelope_and_lfo_view.cpp:
* src/gui/widgets/instrument_function_views.cpp:
* src/gui/widgets/instrument_midi_io_view.cpp:
* src/core/envelope_and_lfo_parameters.cpp:
* src/core/instrument_sound_shaping.cpp:
* src/core/instrument_functions.cpp:
* src/core/instrument.cpp:
extend instrument stuff for displayName
* include/controller_connection_dialog.h:
* src/gui/controller_connection_dialog.cpp:
improve interface slightly
2008-06-08 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/ladspa_effect/tap/tap_deesser.c:

View File

@@ -39,8 +39,8 @@ class comboBoxModel : public intModel
{
Q_OBJECT
public:
comboBoxModel( ::model * _parent = NULL ) :
intModel( 0, 0, 0, _parent )
comboBoxModel( ::model * _parent = NULL, const QString & _display_name = QString::null ) :
intModel( 0, 0, 0, _parent, _display_name )
{
}

View File

@@ -41,6 +41,7 @@ class QScrollArea;
class autoDetectMidiController;
class comboBox;
class groupBox;
class tabWidget;
class lcdSpinBox;
class ledCheckBox;
class midiPortMenu;
@@ -72,6 +73,7 @@ protected slots:
private:
// Midi
groupBox * m_midiGroupBox;
lcdSpinBox * m_midiChannelSpinBox;
lcdSpinBox * m_midiControllerSpinBox;
@@ -79,9 +81,12 @@ private:
midiPortMenu * m_readablePorts;
boolModel m_midiAutoDetect;
// User
groupBox * m_userGroupBox;
comboBox * m_userController;
// Mapping
tabWidget * m_mappingBox;
QLineEdit * m_mappingFunction;
controller * m_controller;

View File

@@ -106,6 +106,7 @@ public:
return( FALSE );
}
virtual QString fullDisplayName( void ) const;
// --------------------------------------------------------------------
// provided functions:

View File

@@ -53,6 +53,11 @@ public:
return( m_defaultConstructed );
}
inline model * parentModel( void ) const
{
return static_cast<model *>( parent() );
}
virtual QString displayName( void ) const
{
return QString();
@@ -62,6 +67,7 @@ public:
{
}
virtual QString fullDisplayName( void ) const;
private:
bool m_defaultConstructed;

View File

@@ -42,10 +42,10 @@ effect::effect( const plugin::descriptor * _desc,
m_noRun( FALSE ),
m_running( FALSE ),
m_bufferCount( 0 ),
m_enabledModel( TRUE, this ),
m_wetDryModel( 1.0f, 0.0f, 1.0f, 0.01f, this ),
m_gateModel( 0.0f, 0.0f, 1.0f, 0.01f, this ),
m_autoQuitModel( 1.0f, 1.0f, 8000.0f, 100.0f, 1.0f, this )
m_enabledModel( TRUE, this, tr( "Effect enabled" ) ),
m_wetDryModel( 1.0f, -1.0f, 1.0f, 0.01f, this, tr( "Wet/Dry mix" ) ),
m_gateModel( 0.0f, 0.0f, 1.0f, 0.01f, this, tr( "Gate" ) ),
m_autoQuitModel( 1.0f, 1.0f, 8000.0f, 100.0f, 1.0f, this, tr( "Decay" ) )
{
m_srcState[0] = m_srcState[1] = NULL;
reinitSRC();

View File

@@ -53,23 +53,27 @@ envelopeAndLFOParameters::envelopeAndLFOParameters(
model * _parent ) :
model( _parent ),
m_used( FALSE ),
m_predelayModel( 0.0, 0.0, 1.0, 0.001, this ),
m_attackModel( 0.0, 0.0, 1.0, 0.001, this ),
m_holdModel( 0.5, 0.0, 1.0, 0.001, this ),
m_decayModel( 0.5, 0.0, 1.0, 0.001, this ),
m_sustainModel( 0.5, 0.0, 1.0, 0.001, this ),
m_releaseModel( 0.1, 0.0, 1.0, 0.001, this ),
m_amountModel( 0.0, -1.0, 1.0, 0.005, this ),
m_predelayModel( 0.0, 0.0, 1.0, 0.001, this, tr( "Predelay-time" ) ),
m_attackModel( 0.0, 0.0, 1.0, 0.001, this, tr( "Attack-time" ) ),
m_holdModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Hold-time" ) ),
m_decayModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Decay-time" ) ),
m_sustainModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Sustain-level" ) ),
m_releaseModel( 0.1, 0.0, 1.0, 0.001, this, tr( "Release-time" ) ),
m_amountModel( 0.0, -1.0, 1.0, 0.005, this, tr( "Modulation amount" ) ),
m_valueForZeroAmount( _value_for_zero_amount ),
m_pahdEnv( NULL ),
m_rEnv( NULL ),
m_lfoPredelayModel( 0.0, 0.0, 1.0, 0.001, this ),
m_lfoAttackModel( 0.0, 0.0, 1.0, 0.001, this ),
m_lfoSpeedModel( 0.1, 0.01, 1.0, 0.0001, 20000.0, this ),
m_lfoAmountModel( 0.0, -1.0, 1.0, 0.005, this ),
m_lfoWaveModel( SineWave, 0, NumLfoShapes, this ),
m_x100Model( FALSE, this ),
m_controlEnvAmountModel( FALSE, this ),
m_lfoPredelayModel( 0.0, 0.0, 1.0, 0.001, this,
tr( "LFO-predelay-time" ) ),
m_lfoAttackModel( 0.0, 0.0, 1.0, 0.001, this, tr( "LFO-attack-time" ) ),
m_lfoSpeedModel( 0.1, 0.01, 1.0, 0.0001, 20000.0, this,
tr( "LFO-speed" ) ),
m_lfoAmountModel( 0.0, -1.0, 1.0, 0.005, this,
tr( "LFO-modulation-amount" ) ),
m_lfoWaveModel( SineWave, 0, NumLfoShapes, this,
tr( "LFO wave shape" ) ),
m_x100Model( FALSE, this, tr( "Freq x 100" ) ),
m_controlEnvAmountModel( FALSE, this, tr( "Modulate Env-Amount" ) ),
m_lfoFrame( 0 ),
m_lfoAmountIsZero( FALSE ),
m_lfoShapeData( NULL )

View File

@@ -192,7 +192,9 @@ void fxMixer::clear()
m_fxChannels[i]->m_fxChain.clear();
m_fxChannels[i]->m_volumeModel.setValue( 1.0f );
m_fxChannels[i]->m_name = ( i == 0 ) ?
tr( "Master" ) : tr( "FX %1" ).arg( i );
tr( "Master" ) : tr( "FX %1" ).arg( i );
m_fxChannels[i]->m_volumeModel.setDisplayName(
m_fxChannels[i]->m_name );
}
}

View File

@@ -123,6 +123,13 @@ void instrument::applyRelease( sampleFrame * buf, const notePlayHandle * _n )
QString instrument::fullDisplayName( void ) const
{
return getInstrumentTrack()->displayName();
}

View File

@@ -170,8 +170,8 @@ const int ARP_GROUPBOX_HEIGHT = 240 - ARP_GROUPBOX_Y;
chordCreator::chordCreator( instrumentTrack * _instrument_track ) :
model( _instrument_track ),
m_chordsEnabledModel( FALSE, this ),
m_chordsModel( this ),
m_chordRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this )
m_chordsModel( this, tr( "Chord type" ) ),
m_chordRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this, tr( "Chord range" ) )
{
m_chordsEnabledModel.setTrack( _instrument_track );
@@ -283,12 +283,12 @@ void chordCreator::loadSettings( const QDomElement & _this )
arpeggiator::arpeggiator( instrumentTrack * _instrument_track ) :
model( _instrument_track ),
m_arpEnabledModel( FALSE ),
m_arpModel( this ),
m_arpRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this ),
m_arpTimeModel( 100.0f, 25.0f, 2000.0f, 1.0f, 1.0, this ),
m_arpGateModel( 100.0f, 1.0f, 200.0f, 1.0f, this ),
m_arpDirectionModel( 0, 0, NumArpDirections, this ),
m_arpModeModel( this )
m_arpModel( this, tr( "Arpeggio type" ) ),
m_arpRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this, tr( "Arpeggio range" ) ),
m_arpTimeModel( 100.0f, 25.0f, 2000.0f, 1.0f, 1.0, this, tr( "Arpeggio time" ) ),
m_arpGateModel( 100.0f, 1.0f, 200.0f, 1.0f, this, tr( "Arpeggio gate" ) ),
m_arpDirectionModel( 0, 0, NumArpDirections, this, tr( "Arpeggio direction" ) ),
m_arpModeModel( this, tr( "Arpeggio mode" ) )
{
m_arpEnabledModel.setTrack( _instrument_track );

View File

@@ -60,9 +60,11 @@ instrumentSoundShaping::instrumentSoundShaping(
model( _instrument_track ),
m_instrumentTrack( _instrument_track ),
m_filterEnabledModel( FALSE, this ),
m_filterModel( this ),
m_filterCutModel( 14000.0, 1.0, 14000.0, 1.0, this ),
m_filterResModel( 0.5, basicFilters<>::minQ(), 10.0, 0.01, this )
m_filterModel( this, tr( "Filter type" ) ),
m_filterCutModel( 14000.0, 1.0, 14000.0, 1.0, this,
tr( "cutoff-frequency" ) ),
m_filterResModel( 0.5, basicFilters<>::minQ(), 10.0, 0.01, this,
tr( "Q/Resonance" ) )
{
for( int i = 0; i < NumTargets; ++i )
{

View File

@@ -41,11 +41,11 @@ const float TWO_PI = 6.28318531f;
lfoController::lfoController( model * _parent ) :
controller( LfoController, _parent ),
m_lfoBaseModel( 0.5, 0.0, 1.0, 0.001, this ),
m_lfoSpeedModel( 0.1, 0.01, 5.0, 0.0001, 20000.0, this ),
m_lfoAmountModel( 1.0, -1.0, 1.0, 0.005, this ),
m_lfoPhaseModel( 0.0, 0.0, 360.0, 4.0, this ),
m_lfoWaveModel( oscillator::SineWave, 0, oscillator::NumWaveShapes, this ),
m_lfoBaseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ),
m_lfoSpeedModel( 0.1, 0.01, 5.0, 0.0001, 20000.0, this, tr( "Oscillator speed" ) ),
m_lfoAmountModel( 1.0, -1.0, 1.0, 0.005, this, tr( "Oscillator amount" ) ),
m_lfoPhaseModel( 0.0, 0.0, 360.0, 4.0, this, tr( "Oscillator phase" ) ),
m_lfoWaveModel( oscillator::SineWave, 0, oscillator::NumWaveShapes, this, tr( "Oscillator waveform" ) ),
m_duration( 1000 ),
m_phaseCorrection( 0 ),
m_phaseOffset( 0 ),

View File

@@ -42,14 +42,20 @@ midiPort::midiPort( const QString & _name, midiClient * _mc,
m_midiEventProcessor( _mep ),
m_name( _name ),
m_mode( _mode ),
m_inputChannelModel( 0, 0, MidiChannelCount, this ),
m_outputChannelModel( 1, 1, MidiChannelCount, this ),
m_inputControllerModel( 0, 0, MidiControllerCount, this ),
m_outputControllerModel( 0, 0, MidiControllerCount, this ),
m_readableModel( FALSE, this ),
m_writableModel( FALSE, this ),
m_defaultVelocityInEnabledModel( FALSE, this ),
m_defaultVelocityOutEnabledModel( FALSE, this )
m_inputChannelModel( 0, 0, MidiChannelCount, this,
tr( "Input channel" ) ),
m_outputChannelModel( 1, 1, MidiChannelCount, this,
tr( "Output channel" ) ),
m_inputControllerModel( 0, 0, MidiControllerCount, this,
tr( "Input controller" ) ),
m_outputControllerModel( 0, 0, MidiControllerCount, this,
tr( "Output controller" ) ),
m_readableModel( FALSE, this, tr( "Receive MIDI-events" ) ),
m_writableModel( FALSE, this, tr( "Send MIDI-events" ) ),
m_defaultVelocityInEnabledModel( FALSE, this,
tr( "Default input velocity" ) ),
m_defaultVelocityOutEnabledModel( FALSE, this,
tr( "Default output velocity" ) )
{
m_midiClient->addPort( this );

View File

@@ -30,6 +30,30 @@
#include "mv_base.h"
QString model::fullDisplayName( void ) const
{
const QString & n = displayName();
if( parentModel() )
{
if( !n.isEmpty() )
{
return parentModel()->fullDisplayName() + ": " + n;
}
else
{
return parentModel()->fullDisplayName();
}
}
else
{
return n;
}
}
modelView::modelView( model * _model ) :
m_model( _model )
{

View File

@@ -36,6 +36,7 @@
#include "lcd_spinbox.h"
#include "led_checkbox.h"
#include "combobox.h"
#include "tab_widget.h"
#include "group_box.h"
#include "midi_controller.h"
#include "midi_client.h"
@@ -135,7 +136,7 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
// Midi stuff
m_midiGroupBox = new groupBox( tr( "MIDI CONTROLLER" ), this );
m_midiGroupBox->setGeometry( 2, 2, 240, 64 );
m_midiGroupBox->setGeometry( 8, 2, 240, 64 );
connect( m_midiGroupBox->model(), SIGNAL( dataChanged() ),
this, SLOT( midiToggled() ) );
@@ -149,14 +150,14 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
tr( "Input controller" ) );
m_midiControllerSpinBox->addTextForValue( 0, "---" );
m_midiControllerSpinBox->setLabel( tr( "CONTROLLER" ) );
m_midiControllerSpinBox->move( 72, 24 );
m_midiControllerSpinBox->move( 68, 24 );
m_midiAutoDetectCheckBox =
new ledCheckBox( tr("Auto Detect"),
m_midiGroupBox, tr("Auto Detect") );
m_midiAutoDetectCheckBox->setModel( &m_midiAutoDetect );
m_midiAutoDetectCheckBox->move( 136, 30 );
m_midiAutoDetectCheckBox->move( 132, 30 );
connect( &m_midiAutoDetect, SIGNAL( dataChanged() ),
this, SLOT( autoDetectToggled() ) );
@@ -170,7 +171,7 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
rp_btn->setText( tr( "MIDI-devices to receive "
"MIDI-events from" ) );
rp_btn->setIcon( embed::getIconPixmap( "midi_in" ) );
rp_btn->setGeometry( 200, 24, 40, 40 );
rp_btn->setGeometry( 206, 30, 32, 32 );
rp_btn->setMenu( m_readablePorts );
rp_btn->setPopupMode( QToolButton::InstantPopup );
}
@@ -178,21 +179,12 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
// User stuff
m_userGroupBox = new groupBox( tr( "USER CONTROLLER" ), this );
m_userGroupBox->setGeometry( 2, 70, 240, 64 );
m_userGroupBox->setGeometry( 8, 70, 240, 64 );
connect( m_userGroupBox->model(), SIGNAL( dataChanged() ),
this, SLOT( userToggled() ) );
m_userController = new comboBox( m_userGroupBox, "Controller" );
m_userController->setGeometry( 10, 20, 200, 22 );
m_mappingFunction = new QLineEdit( this );
m_mappingFunction->setGeometry( 2, 140, 240, 16 );
m_mappingFunction->setText( "input" );
QWidget * buttons = new QWidget( this );
buttons->setGeometry( 2, 160, 240, 32 );
resize( 256, 196 );
m_userController->setGeometry( 10, 24, 200, 22 );
for( int i = 0; i < engine::getSong()->controllers().size(); ++i )
{
@@ -201,11 +193,21 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
}
// Mapping functions
m_mappingBox = new tabWidget( tr( "MAPPING FUNCTION" ), this );
m_mappingBox->setGeometry( 8, 138, 240, 64 );
m_mappingFunction = new QLineEdit( m_mappingBox );
m_mappingFunction->setGeometry( 10, 20, 170, 16 );
m_mappingFunction->setText( "input" );
// Buttons
QWidget * buttons = new QWidget( this );
buttons->setGeometry( 8, 210, 240, 32 );
QHBoxLayout * btn_layout = new QHBoxLayout( buttons );
btn_layout->setSpacing( 0 );
btn_layout->setMargin( 0 );
QPushButton * select_btn = new QPushButton(
embed::getIconPixmap( "add" ),
@@ -219,6 +221,8 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
//connect( cancel_btn, SIGNAL( clicked() ),
// this, SLOT( reject() ) );
resize( 256, 246 );
btn_layout->addStretch();
btn_layout->addSpacing( 10 );
btn_layout->addWidget( select_btn );
@@ -226,6 +230,8 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
btn_layout->addWidget( cancel_btn );
btn_layout->addSpacing( 10 );
// Crazy MIDI View stuff
// TODO, handle by making this a model for the Dialog "view"
controllerConnection * cc = NULL;
@@ -297,6 +303,7 @@ void controllerConnectionDialog::selectController( void )
mc = m_midiController->copyToMidiController(
engine::getSong() );
/*
if( m_targetModel->getTrack() &&
!m_targetModel->getTrack()->displayName().isEmpty() )
{
@@ -308,6 +315,8 @@ void controllerConnectionDialog::selectController( void )
{
mc->m_midiPort.setName( m_targetModel->displayName() );
}
*/
mc->m_midiPort.setName( m_targetModel->fullDisplayName() );
m_controller = mc;
}
}

View File

@@ -75,16 +75,14 @@ lfoControllerDialog::lfoControllerDialog( controller * _model, QWidget * _parent
toolTip::add( this, tr( "LFO Controller" ) );
m_lfoBaseKnob = new knob( knobBright_26, this,
tr( "LFO base value" ) );
m_lfoBaseKnob = new knob( knobBright_26, this );
m_lfoBaseKnob->setLabel( tr( "BASE" ) );
m_lfoBaseKnob->move( LFO_BASE_KNOB_X, LFO_KNOB_Y );
m_lfoBaseKnob->setHintText( tr( "Base amount:" ) + " ", "" );
m_lfoBaseKnob->setWhatsThis( tr("todo") );
m_lfoSpeedKnob = new tempoSyncKnob( knobBright_26, this,
tr( "LFO-speed" ) );
m_lfoSpeedKnob = new tempoSyncKnob( knobBright_26, this );
m_lfoSpeedKnob->setLabel( tr( "SPD" ) );
m_lfoSpeedKnob->move( LFO_SPEED_KNOB_X, LFO_KNOB_Y );
m_lfoSpeedKnob->setHintText( tr( "LFO-speed:" ) + " ", "" );
@@ -94,8 +92,7 @@ lfoControllerDialog::lfoControllerDialog( controller * _model, QWidget * _parent
"the faster the effect." ) );
m_lfoAmountKnob = new knob( knobBright_26, this,
tr( "LFO-modulation-amount" ) );
m_lfoAmountKnob = new knob( knobBright_26, this );
m_lfoAmountKnob->setLabel( tr( "AMT" ) );
m_lfoAmountKnob->move( LFO_AMOUNT_KNOB_X, LFO_KNOB_Y );
m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
@@ -105,8 +102,7 @@ lfoControllerDialog::lfoControllerDialog( controller * _model, QWidget * _parent
"selected size (e.g. volume or cutoff-frequency) will "
"be influenced by this LFO." ) );
m_lfoPhaseKnob = new knob( knobBright_26, this,
tr( "LFO phase" ) );
m_lfoPhaseKnob = new knob( knobBright_26, this );
m_lfoPhaseKnob->setLabel( tr( "PHS" ) );
m_lfoPhaseKnob->move( LFO_PHASE_KNOB_X, LFO_KNOB_Y );
m_lfoPhaseKnob->setHintText( tr( "Phase offset:" ) + " ", "" + tr( "degrees" ) );
@@ -203,8 +199,7 @@ lfoControllerDialog::lfoControllerDialog( controller * _model, QWidget * _parent
"wave-shape for current oscillator." ) );
m_lfoWaveBtnGrp = new automatableButtonGroup( this,
tr( "LFO wave shape" ) );
m_lfoWaveBtnGrp = new automatableButtonGroup( this );
m_lfoWaveBtnGrp->addButton( sin_wave_btn );
m_lfoWaveBtnGrp->addButton( triangle_wave_btn );
m_lfoWaveBtnGrp->addButton( saw_wave_btn );

View File

@@ -105,7 +105,7 @@ void automatableButton::contextMenuEvent( QContextMenuEvent * _me )
if ( m_group != NULL )
{
target = m_group;
targetName = target->accessibleName();
targetName = m_group->model()->displayName();
pattern = m_group->model()->getAutomationPattern();
}
else

View File

@@ -100,7 +100,7 @@ void comboBox::contextMenuEvent( QContextMenuEvent * _me )
return;
}
captionMenu contextMenu( accessibleName() );
captionMenu contextMenu( model()->displayName() );
addDefaultActions( &contextMenu );
contextMenu.exec( QCursor::pos() );
}

View File

@@ -57,13 +57,13 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
setAttribute( Qt::WA_OpaquePaintEvent, TRUE );
m_bypass = new ledCheckBox( "", this, tr( "Turn the effect off" ) );
m_bypass = new ledCheckBox( "", this );
m_bypass->move( 3, 3 );
m_bypass->setWhatsThis( tr( "Toggles the effect on or off." ) );
toolTip::add( m_bypass, tr( "On/Off" ) );
m_wetDry = new knob( knobBright_26, this, tr( "Wet/Dry mix" ) );
m_wetDry = new knob( knobBright_26, this );
m_wetDry->setLabel( tr( "W/D" ) );
m_wetDry->move( 27, 5 );
m_wetDry->setHintText( tr( "Wet Level:" ) + " ", "" );
@@ -72,7 +72,7 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
"shows up in the output." ) );
m_autoQuit = new tempoSyncKnob( knobBright_26, this, tr( "Decay" ) );
m_autoQuit = new tempoSyncKnob( knobBright_26, this );
m_autoQuit->setLabel( tr( "DECAY" ) );
m_autoQuit->move( 60, 5 );
m_autoQuit->setHintText( tr( "Time:" ) + " ", "ms" );
@@ -82,7 +82,7 @@ effectView::effectView( effect * _model, QWidget * _parent ) :
"run the risk of clipping the tail on delay effects." ) );
m_gate = new knob( knobBright_26, this, tr( "Gate" ) );
m_gate = new knob( knobBright_26, this );
m_gate->setLabel( tr( "GATE" ) );
m_gate->move( 93, 5 );
m_gate->setHintText( tr( "Gate:" ) + " ", "" );

View File

@@ -104,7 +104,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
s_lfoGraph = new QPixmap( embed::getIconPixmap( "lfo_graph" ) );
}
m_predelayKnob = new knob( knobBright_26, this, tr( "Predelay-time" ) );
m_predelayKnob = new knob( knobBright_26, this );
m_predelayKnob->setLabel( tr( "DEL" ) );
m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y );
m_predelayKnob->setHintText( tr( "Predelay:" ) + " ", "" );
@@ -114,7 +114,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"before start of actual envelope." ) );
m_attackKnob = new knob( knobBright_26, this, tr( "Attack-time" ) );
m_attackKnob = new knob( knobBright_26, this );
m_attackKnob->setLabel( tr( "ATT" ) );
m_attackKnob->move( ATTACK_KNOB_X, ENV_KNOBS_Y );
m_attackKnob->setHintText( tr( "Attack:" )+" ", "" );
@@ -125,7 +125,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"Choose a small value for instruments like pianos "
"and a big value for strings." ) );
m_holdKnob = new knob( knobBright_26, this, tr( "Hold-time" ) );
m_holdKnob = new knob( knobBright_26, this );
m_holdKnob->setLabel( tr( "HOLD" ) );
m_holdKnob->move( HOLD_KNOB_X, ENV_KNOBS_Y );
m_holdKnob->setHintText( tr( "Hold:" ) + " ", "" );
@@ -135,7 +135,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"envelope holds attack-level before it begins to "
"decrease to sustain-level." ) );
m_decayKnob = new knob( knobBright_26, this, tr( "Decay-time" ) );
m_decayKnob = new knob( knobBright_26, this );
m_decayKnob->setLabel( tr( "DEC" ) );
m_decayKnob->move( DECAY_KNOB_X, ENV_KNOBS_Y );
m_decayKnob->setHintText( tr( "Decay:" ) + " ", "" );
@@ -147,7 +147,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"like pianos." ) );
m_sustainKnob = new knob( knobBright_26, this, tr( "Sustain-level" ) );
m_sustainKnob = new knob( knobBright_26, this );
m_sustainKnob->setLabel( tr( "SUST" ) );
m_sustainKnob->move( SUSTAIN_KNOB_X, ENV_KNOBS_Y );
m_sustainKnob->setHintText( tr( "Sustain:" ) + " ", "" );
@@ -158,7 +158,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"zero." ) );
m_releaseKnob = new knob( knobBright_26, this, tr( "Release-time" ) );
m_releaseKnob = new knob( knobBright_26, this );
m_releaseKnob->setLabel( tr( "REL" ) );
m_releaseKnob->move( RELEASE_KNOB_X, ENV_KNOBS_Y );
m_releaseKnob->setHintText( tr( "Release:" ) + " ", "" );
@@ -170,8 +170,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"strings." ) );
m_amountKnob = new knob( knobBright_26, this,
tr( "Modulation amount" ) );
m_amountKnob = new knob( knobBright_26, this );
m_amountKnob->setLabel( tr( "AMT" ) );
m_amountKnob->move( AMOUNT_KNOB_X, ENV_GRAPH_Y );
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
@@ -184,8 +183,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
m_lfoPredelayKnob = new knob( knobBright_26, this,
tr( "LFO-predelay-time" ) );
m_lfoPredelayKnob = new knob( knobBright_26, this );
m_lfoPredelayKnob->setLabel( tr( "DEL" ) );
m_lfoPredelayKnob->move( LFO_PREDELAY_KNOB_X, LFO_KNOB_Y );
m_lfoPredelayKnob->setHintText( tr( "LFO-predelay:" ) + " ", "" );
@@ -195,8 +193,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"LFO starts to oscillate." ) );
m_lfoAttackKnob = new knob( knobBright_26, this,
tr( "LFO-attack-time" ) );
m_lfoAttackKnob = new knob( knobBright_26, this );
m_lfoAttackKnob->setLabel( tr( "ATT" ) );
m_lfoAttackKnob->move( LFO_ATTACK_KNOB_X, LFO_KNOB_Y );
m_lfoAttackKnob->setHintText( tr( "LFO-attack:" ) + " ", "" );
@@ -206,8 +203,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"increase its amplitude to maximum." ) );
m_lfoSpeedKnob = new tempoSyncKnob( knobBright_26, this,
tr( "LFO-speed" ) );
m_lfoSpeedKnob = new tempoSyncKnob( knobBright_26, this );
m_lfoSpeedKnob->setLabel( tr( "SPD" ) );
m_lfoSpeedKnob->move( LFO_SPEED_KNOB_X, LFO_KNOB_Y );
m_lfoSpeedKnob->setHintText( tr( "LFO-speed:" ) + " ", "" );
@@ -217,8 +213,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
"the faster will be your effect." ) );
m_lfoAmountKnob = new knob( knobBright_26, this,
tr( "LFO-modulation-amount" ) );
m_lfoAmountKnob = new knob( knobBright_26, this );
m_lfoAmountKnob->setLabel( tr( "AMT" ) );
m_lfoAmountKnob->move( LFO_AMOUNT_KNOB_X, LFO_KNOB_Y );
m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
@@ -283,8 +278,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
connect( m_userLfoBtn, SIGNAL( toggled( bool ) ),
this, SLOT( lfoUserWaveChanged() ) );
m_lfoWaveBtnGrp = new automatableButtonGroup( this,
tr( "LFO wave shape" ) );
m_lfoWaveBtnGrp = new automatableButtonGroup( this );
m_lfoWaveBtnGrp->addButton( sin_lfo_btn );
m_lfoWaveBtnGrp->addButton( triangle_lfo_btn );
m_lfoWaveBtnGrp->addButton( saw_lfo_btn );
@@ -292,8 +286,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
m_lfoWaveBtnGrp->addButton( m_userLfoBtn );
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this,
tr( "Freq x 100" ) );
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this );
m_x100Cb->setFont( pointSize<6>( m_x100Cb->font() ) );
m_x100Cb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 36 );
m_x100Cb->setWhatsThis(
@@ -303,7 +296,7 @@ envelopeAndLFOView::envelopeAndLFOView( QWidget * _parent ) :
m_controlEnvAmountCb = new ledCheckBox( tr( "MODULATE ENV-AMOUNT" ),
this, tr( "Modulate Env-Amount" ) );
this );
m_controlEnvAmountCb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 54 );
m_controlEnvAmountCb->setFont( pointSize<6>(
m_controlEnvAmountCb->font() ) );

View File

@@ -58,10 +58,8 @@ chordCreatorView::chordCreatorView( chordCreator * _cc, QWidget * _parent ) :
modelView( NULL ),
m_cc( _cc ),
m_chordsGroupBox( new groupBox( tr( "CHORDS" ), this ) ),
m_chordsComboBox( new comboBox( m_chordsGroupBox,
tr( "Chord type" ) ) ),
m_chordRangeKnob( new knob( knobBright_26, m_chordsGroupBox,
tr( "Chord range" ) ) )
m_chordsComboBox( new comboBox( m_chordsGroupBox ) ),
m_chordRangeKnob( new knob( knobBright_26, m_chordsGroupBox ) )
{
move( CHORDS_GROUPBOX_X, CHORDS_GROUPBOX_Y );
setFixedSize( 250, CHORDS_GROUPBOX_HEIGHT );
@@ -113,15 +111,11 @@ arpeggiatorView::arpeggiatorView( arpeggiator * _arp, QWidget * _parent ) :
modelView( NULL ),
m_a( _arp ),
m_arpGroupBox( new groupBox( tr( "ARPEGGIO" ), this ) ),
m_arpComboBox( new comboBox( m_arpGroupBox, tr( "Arpeggio type" ) ) ),
m_arpRangeKnob( new knob( knobBright_26, m_arpGroupBox,
tr( "Arpeggio range" ) ) ),
m_arpTimeKnob( new tempoSyncKnob( knobBright_26, m_arpGroupBox,
tr( "Arpeggio time" ) ) ),
m_arpGateKnob( new knob( knobBright_26, m_arpGroupBox,
tr( "Arpeggio gate" ) ) ),
m_arpModeComboBox( new comboBox( m_arpGroupBox,
tr( "Arpeggio mode" ) ) )
m_arpComboBox( new comboBox( m_arpGroupBox) ),
m_arpRangeKnob( new knob( knobBright_26, m_arpGroupBox ) ),
m_arpTimeKnob( new tempoSyncKnob( knobBright_26, m_arpGroupBox ) ),
m_arpGateKnob( new knob( knobBright_26, m_arpGroupBox ) ),
m_arpModeComboBox( new comboBox( m_arpGroupBox ) )
{
move( ARP_GROUPBOX_X, ARP_GROUPBOX_Y );
setFixedSize( 250, ARP_GROUPBOX_HEIGHT );
@@ -211,8 +205,7 @@ arpeggiatorView::arpeggiatorView( arpeggiator * _arp, QWidget * _parent ) :
"arp_random_off" ) );
toolTip::add( arp_random_btn, tr( "arpeggio direction = random" ) );
m_arpDirectionBtnGrp = new automatableButtonGroup( this,
tr( "Arpeggio direction" ) );
m_arpDirectionBtnGrp = new automatableButtonGroup( this );
m_arpDirectionBtnGrp->addButton( arp_up_btn );
m_arpDirectionBtnGrp->addButton( arp_down_btn );
m_arpDirectionBtnGrp->addButton( arp_up_and_down_btn );

View File

@@ -51,8 +51,7 @@ instrumentMidiIOView::instrumentMidiIOView(
this );
m_setupTabWidget->setGeometry( 4, 5, 238, 200 );
m_inputChannelSpinBox = new lcdSpinBox( 3, m_setupTabWidget,
tr( "Input channel" ) );
m_inputChannelSpinBox = new lcdSpinBox( 3, m_setupTabWidget );
m_inputChannelSpinBox->addTextForValue( 0, "---" );
m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_inputChannelSpinBox->move( 28, 52 );
@@ -60,16 +59,14 @@ instrumentMidiIOView::instrumentMidiIOView(
m_outputChannelSpinBox = new lcdSpinBox( 3, m_setupTabWidget,
tr( "Output channel" ) );
m_outputChannelSpinBox = new lcdSpinBox( 3, m_setupTabWidget );
m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_outputChannelSpinBox->move( 28, 132 );
m_outputChannelSpinBox->setEnabled( FALSE );
m_receiveCheckBox = new ledCheckBox( tr( "Receive MIDI-events" ),
m_setupTabWidget,
tr( "Receive MIDI-events" ) );
m_setupTabWidget );
m_receiveCheckBox->move( 10, 34 );
// enabling/disabling widgets is UI-stuff thus we do not use model here
connect( m_receiveCheckBox, SIGNAL( toggled( bool ) ),
@@ -77,15 +74,13 @@ instrumentMidiIOView::instrumentMidiIOView(
m_defaultVelocityInCheckBox = new ledCheckBox(
tr( "Default velocity for all input-events" ),
m_setupTabWidget,
tr( "Default input velocity" ) );
tr( "Default velocity for all input-events" ),
m_setupTabWidget );
m_defaultVelocityInCheckBox->move( 28, 84 );
m_sendCheckBox = new ledCheckBox( tr( "Send MIDI-events" ),
m_setupTabWidget,
tr( "Send MIDI-events" ) );
m_setupTabWidget );
m_sendCheckBox->move( 10, 114 );
connect( m_sendCheckBox, SIGNAL( toggled( bool ) ),
m_outputChannelSpinBox, SLOT( setEnabled( bool ) ) );
@@ -93,8 +88,7 @@ instrumentMidiIOView::instrumentMidiIOView(
m_defaultVelocityOutCheckBox = new ledCheckBox(
tr( "Default velocity for all output-events" ),
m_setupTabWidget,
tr( "Default output velocity" ) );
m_setupTabWidget );
m_defaultVelocityOutCheckBox->move( 28, 164 );

View File

@@ -86,8 +86,7 @@ instrumentSoundShapingView::instrumentSoundShapingView( QWidget * _parent ) :
FILTER_GROUPBOX_HEIGHT );
m_filterComboBox = new comboBox( m_filterGroupBox,
tr( "Filter type" ) );
m_filterComboBox = new comboBox( m_filterGroupBox );
m_filterComboBox->setGeometry( 14, 22, 120, 22 );
m_filterComboBox->setFont( pointSize<8>( m_filterComboBox->font() ) );
@@ -97,8 +96,7 @@ instrumentSoundShapingView::instrumentSoundShapingView( QWidget * _parent ) :
"for changing the characteristics of a sound." ) );
m_filterCutKnob = new knob( knobBright_26, m_filterGroupBox,
tr( "cutoff-frequency" ) );
m_filterCutKnob = new knob( knobBright_26, m_filterGroupBox );
m_filterCutKnob->setLabel( tr( "CUTOFF" ) );
m_filterCutKnob->move( 140, 18 );
m_filterCutKnob->setHintText( tr( "cutoff-frequency:" ) + " ", " " +
@@ -112,8 +110,7 @@ instrumentSoundShapingView::instrumentSoundShapingView( QWidget * _parent ) :
"frequencies below cutoff-frequency and so on..." ) );
m_filterResKnob = new knob( knobBright_26, m_filterGroupBox,
tr( "Q/Resonance" ) );
m_filterResKnob = new knob( knobBright_26, m_filterGroupBox );
m_filterResKnob->setLabel( tr( "Q/RESO" ) );
m_filterResKnob->move( 190, 18 );
m_filterResKnob->setHintText( tr( "Q/Resonance:" ) + " ", "" );

View File

@@ -252,7 +252,7 @@ void tempoSyncKnob::contextMenuEvent( QContextMenuEvent * )
{
mouseReleaseEvent( NULL );
captionMenu contextMenu( accessibleName() );
captionMenu contextMenu( model()->displayName() );
addDefaultActions( &contextMenu );
contextMenu.addSeparator();