Skip to content

Commit f39c964

Browse files
committed
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
1 parent 704a9cf commit f39c964

24 files changed

+203
-134
lines changed

ChangeLog

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,37 @@
33
* src/gui/widgets/graph.cpp:
44
Fix graph widget
55

6+
* include/mv_base.h:
7+
* src/core/mv_base.cpp:
8+
Add recursive fullDisplayName function
9+
10+
* include/combobox_model.h:
11+
* src/gui/widgets/automatable_button.cpp:
12+
* src/gui/widgets/combobox.cpp:
13+
* src/gui/widgets/tempo_sync_knob.cpp:
14+
* src/gui/widgets/effect_view.cpp:
15+
* src/gui/lfo_controller_dialog.cpp:
16+
* src/core/midi/midi_port.cpp:
17+
* src/core/fx_mixer.cpp:
18+
* src/core/lfo_controller.cpp:
19+
* src/core/effect.cpp:
20+
extend more models and views for displayName
21+
22+
* include/instrument.h:
23+
* src/gui/widgets/instrument_sound_shaping_view.cpp:
24+
* src/gui/widgets/envelope_and_lfo_view.cpp:
25+
* src/gui/widgets/instrument_function_views.cpp:
26+
* src/gui/widgets/instrument_midi_io_view.cpp:
27+
* src/core/envelope_and_lfo_parameters.cpp:
28+
* src/core/instrument_sound_shaping.cpp:
29+
* src/core/instrument_functions.cpp:
30+
* src/core/instrument.cpp:
31+
extend instrument stuff for displayName
32+
33+
* include/controller_connection_dialog.h:
34+
* src/gui/controller_connection_dialog.cpp:
35+
improve interface slightly
36+
637
2008-06-08 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
738

839
* plugins/ladspa_effect/tap/tap_deesser.c:

include/combobox_model.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class comboBoxModel : public intModel
3939
{
4040
Q_OBJECT
4141
public:
42-
comboBoxModel( ::model * _parent = NULL ) :
43-
intModel( 0, 0, 0, _parent )
42+
comboBoxModel( ::model * _parent = NULL, const QString & _display_name = QString::null ) :
43+
intModel( 0, 0, 0, _parent, _display_name )
4444
{
4545
}
4646

include/controller_connection_dialog.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class QScrollArea;
4141
class autoDetectMidiController;
4242
class comboBox;
4343
class groupBox;
44+
class tabWidget;
4445
class lcdSpinBox;
4546
class ledCheckBox;
4647
class midiPortMenu;
@@ -72,16 +73,20 @@ protected slots:
7273

7374

7475
private:
76+
// Midi
7577
groupBox * m_midiGroupBox;
7678
lcdSpinBox * m_midiChannelSpinBox;
7779
lcdSpinBox * m_midiControllerSpinBox;
7880
ledCheckBox * m_midiAutoDetectCheckBox;
7981
midiPortMenu * m_readablePorts;
8082
boolModel m_midiAutoDetect;
8183

84+
// User
8285
groupBox * m_userGroupBox;
8386
comboBox * m_userController;
8487

88+
// Mapping
89+
tabWidget * m_mappingBox;
8590
QLineEdit * m_mappingFunction;
8691

8792
controller * m_controller;

include/instrument.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class EXPORT instrument : public plugin
106106
return( FALSE );
107107
}
108108

109+
virtual QString fullDisplayName( void ) const;
109110

110111
// --------------------------------------------------------------------
111112
// provided functions:

include/mv_base.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ class EXPORT model : public QObject
5353
return( m_defaultConstructed );
5454
}
5555

56+
inline model * parentModel( void ) const
57+
{
58+
return static_cast<model *>( parent() );
59+
}
60+
5661
virtual QString displayName( void ) const
5762
{
5863
return QString();
@@ -62,6 +67,7 @@ class EXPORT model : public QObject
6267
{
6368
}
6469

70+
virtual QString fullDisplayName( void ) const;
6571

6672
private:
6773
bool m_defaultConstructed;

src/core/effect.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ effect::effect( const plugin::descriptor * _desc,
4242
m_noRun( FALSE ),
4343
m_running( FALSE ),
4444
m_bufferCount( 0 ),
45-
m_enabledModel( TRUE, this ),
46-
m_wetDryModel( 1.0f, 0.0f, 1.0f, 0.01f, this ),
47-
m_gateModel( 0.0f, 0.0f, 1.0f, 0.01f, this ),
48-
m_autoQuitModel( 1.0f, 1.0f, 8000.0f, 100.0f, 1.0f, this )
45+
m_enabledModel( TRUE, this, tr( "Effect enabled" ) ),
46+
m_wetDryModel( 1.0f, -1.0f, 1.0f, 0.01f, this, tr( "Wet/Dry mix" ) ),
47+
m_gateModel( 0.0f, 0.0f, 1.0f, 0.01f, this, tr( "Gate" ) ),
48+
m_autoQuitModel( 1.0f, 1.0f, 8000.0f, 100.0f, 1.0f, this, tr( "Decay" ) )
4949
{
5050
m_srcState[0] = m_srcState[1] = NULL;
5151
reinitSRC();

src/core/envelope_and_lfo_parameters.cpp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,27 @@ envelopeAndLFOParameters::envelopeAndLFOParameters(
5353
model * _parent ) :
5454
model( _parent ),
5555
m_used( FALSE ),
56-
m_predelayModel( 0.0, 0.0, 1.0, 0.001, this ),
57-
m_attackModel( 0.0, 0.0, 1.0, 0.001, this ),
58-
m_holdModel( 0.5, 0.0, 1.0, 0.001, this ),
59-
m_decayModel( 0.5, 0.0, 1.0, 0.001, this ),
60-
m_sustainModel( 0.5, 0.0, 1.0, 0.001, this ),
61-
m_releaseModel( 0.1, 0.0, 1.0, 0.001, this ),
62-
m_amountModel( 0.0, -1.0, 1.0, 0.005, this ),
56+
m_predelayModel( 0.0, 0.0, 1.0, 0.001, this, tr( "Predelay-time" ) ),
57+
m_attackModel( 0.0, 0.0, 1.0, 0.001, this, tr( "Attack-time" ) ),
58+
m_holdModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Hold-time" ) ),
59+
m_decayModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Decay-time" ) ),
60+
m_sustainModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Sustain-level" ) ),
61+
m_releaseModel( 0.1, 0.0, 1.0, 0.001, this, tr( "Release-time" ) ),
62+
m_amountModel( 0.0, -1.0, 1.0, 0.005, this, tr( "Modulation amount" ) ),
6363
m_valueForZeroAmount( _value_for_zero_amount ),
6464
m_pahdEnv( NULL ),
6565
m_rEnv( NULL ),
66-
m_lfoPredelayModel( 0.0, 0.0, 1.0, 0.001, this ),
67-
m_lfoAttackModel( 0.0, 0.0, 1.0, 0.001, this ),
68-
m_lfoSpeedModel( 0.1, 0.01, 1.0, 0.0001, 20000.0, this ),
69-
m_lfoAmountModel( 0.0, -1.0, 1.0, 0.005, this ),
70-
m_lfoWaveModel( SineWave, 0, NumLfoShapes, this ),
71-
m_x100Model( FALSE, this ),
72-
m_controlEnvAmountModel( FALSE, this ),
66+
m_lfoPredelayModel( 0.0, 0.0, 1.0, 0.001, this,
67+
tr( "LFO-predelay-time" ) ),
68+
m_lfoAttackModel( 0.0, 0.0, 1.0, 0.001, this, tr( "LFO-attack-time" ) ),
69+
m_lfoSpeedModel( 0.1, 0.01, 1.0, 0.0001, 20000.0, this,
70+
tr( "LFO-speed" ) ),
71+
m_lfoAmountModel( 0.0, -1.0, 1.0, 0.005, this,
72+
tr( "LFO-modulation-amount" ) ),
73+
m_lfoWaveModel( SineWave, 0, NumLfoShapes, this,
74+
tr( "LFO wave shape" ) ),
75+
m_x100Model( FALSE, this, tr( "Freq x 100" ) ),
76+
m_controlEnvAmountModel( FALSE, this, tr( "Modulate Env-Amount" ) ),
7377
m_lfoFrame( 0 ),
7478
m_lfoAmountIsZero( FALSE ),
7579
m_lfoShapeData( NULL )

src/core/fx_mixer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ void fxMixer::clear()
192192
m_fxChannels[i]->m_fxChain.clear();
193193
m_fxChannels[i]->m_volumeModel.setValue( 1.0f );
194194
m_fxChannels[i]->m_name = ( i == 0 ) ?
195-
tr( "Master" ) : tr( "FX %1" ).arg( i );
195+
tr( "Master" ) : tr( "FX %1" ).arg( i );
196+
m_fxChannels[i]->m_volumeModel.setDisplayName(
197+
m_fxChannels[i]->m_name );
196198

197199
}
198200
}

src/core/instrument.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ void instrument::applyRelease( sampleFrame * buf, const notePlayHandle * _n )
123123

124124

125125

126+
QString instrument::fullDisplayName( void ) const
127+
{
128+
return getInstrumentTrack()->displayName();
129+
}
130+
131+
132+
126133

127134

128135

src/core/instrument_functions.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ const int ARP_GROUPBOX_HEIGHT = 240 - ARP_GROUPBOX_Y;
170170
chordCreator::chordCreator( instrumentTrack * _instrument_track ) :
171171
model( _instrument_track ),
172172
m_chordsEnabledModel( FALSE, this ),
173-
m_chordsModel( this ),
174-
m_chordRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this )
173+
m_chordsModel( this, tr( "Chord type" ) ),
174+
m_chordRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this, tr( "Chord range" ) )
175175
{
176176
m_chordsEnabledModel.setTrack( _instrument_track );
177177

@@ -283,12 +283,12 @@ void chordCreator::loadSettings( const QDomElement & _this )
283283
arpeggiator::arpeggiator( instrumentTrack * _instrument_track ) :
284284
model( _instrument_track ),
285285
m_arpEnabledModel( FALSE ),
286-
m_arpModel( this ),
287-
m_arpRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this ),
288-
m_arpTimeModel( 100.0f, 25.0f, 2000.0f, 1.0f, 1.0, this ),
289-
m_arpGateModel( 100.0f, 1.0f, 200.0f, 1.0f, this ),
290-
m_arpDirectionModel( 0, 0, NumArpDirections, this ),
291-
m_arpModeModel( this )
286+
m_arpModel( this, tr( "Arpeggio type" ) ),
287+
m_arpRangeModel( 1.0f, 1.0f, 9.0f, 1.0f, this, tr( "Arpeggio range" ) ),
288+
m_arpTimeModel( 100.0f, 25.0f, 2000.0f, 1.0f, 1.0, this, tr( "Arpeggio time" ) ),
289+
m_arpGateModel( 100.0f, 1.0f, 200.0f, 1.0f, this, tr( "Arpeggio gate" ) ),
290+
m_arpDirectionModel( 0, 0, NumArpDirections, this, tr( "Arpeggio direction" ) ),
291+
m_arpModeModel( this, tr( "Arpeggio mode" ) )
292292
{
293293
m_arpEnabledModel.setTrack( _instrument_track );
294294

0 commit comments

Comments
 (0)