diff --git a/src/audio/audio_alsa.cpp b/src/audio/audio_alsa.cpp index e3027c69f..56562c0ea 100644 --- a/src/audio/audio_alsa.cpp +++ b/src/audio/audio_alsa.cpp @@ -459,7 +459,7 @@ audioALSA::setupWidget::setupWidget( QWidget * _parent ) : dev_lbl->setGeometry( 10, 40, 160, 10 ); m_channels = new lcdSpinBox( DEFAULT_CHANNELS, SURROUND_CHANNELS, 1, - this, NULL ); + this, NULL, NULL, NULL ); m_channels->setStep( 2 ); m_channels->setLabel( tr( "CHANNELS" ) ); m_channels->setValue( configManager::inst()->value( "audioalsa", diff --git a/src/audio/audio_jack.cpp b/src/audio/audio_jack.cpp index bc5d26a25..600445646 100644 --- a/src/audio/audio_jack.cpp +++ b/src/audio/audio_jack.cpp @@ -451,7 +451,7 @@ audioJACK::setupWidget::setupWidget( QWidget * _parent ) : cn_lbl->setGeometry( 10, 40, 160, 10 ); m_channels = new lcdSpinBox( DEFAULT_CHANNELS, SURROUND_CHANNELS, 1, - this, NULL ); + this, NULL, NULL, NULL ); m_channels->setStep( 2 ); m_channels->setLabel( tr( "CHANNELS" ) ); m_channels->setValue( configManager::inst()->value( "audiojack", diff --git a/src/audio/audio_oss.cpp b/src/audio/audio_oss.cpp index 012ed058d..93466a495 100644 --- a/src/audio/audio_oss.cpp +++ b/src/audio/audio_oss.cpp @@ -354,7 +354,7 @@ audioOSS::setupWidget::setupWidget( QWidget * _parent ) : dev_lbl->setGeometry( 10, 40, 160, 10 ); m_channels = new lcdSpinBox( DEFAULT_CHANNELS, SURROUND_CHANNELS, 1, - this, NULL ); + this, NULL, NULL, NULL ); m_channels->setStep( 2 ); m_channels->setLabel( tr( "CHANNELS" ) ); m_channels->setValue( configManager::inst()->value( "audiooss", diff --git a/src/core/midi_tab_widget.cpp b/src/core/midi_tab_widget.cpp index 92c0d9033..2a366f7d1 100644 --- a/src/core/midi_tab_widget.cpp +++ b/src/core/midi_tab_widget.cpp @@ -75,7 +75,9 @@ midiTabWidget::midiTabWidget( instrumentTrack * _instrument_track, m_inputChannelSpinBox = new lcdSpinBox( 0, MIDI_CHANNEL_COUNT, 3, - m_setupTabWidget, eng() ); + m_setupTabWidget, + tr( "Input channel" ), + eng(), _instrument_track ); m_inputChannelSpinBox->addTextForValue( 0, "---" ); m_inputChannelSpinBox->setValue( m_midiPort->inputChannel() + 1 ); m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) ); @@ -85,7 +87,9 @@ midiTabWidget::midiTabWidget( instrumentTrack * _instrument_track, inputChannelChanged( m_inputChannelSpinBox->value() ); m_outputChannelSpinBox = new lcdSpinBox( 1, MIDI_CHANNEL_COUNT, 3, - m_setupTabWidget, eng() ); + m_setupTabWidget, + tr( "Output channel" ), + eng(), _instrument_track ); m_outputChannelSpinBox->setValue( m_midiPort->outputChannel() + 1 ); //m_outputChannelSpinBox->addTextForValue( 0, "---" ); m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) ); @@ -217,8 +221,8 @@ midiTabWidget::~midiTabWidget() void midiTabWidget::saveSettings( QDomDocument & _doc, QDomElement & _this ) { - _this.setAttribute( "inputchannel", m_inputChannelSpinBox->value() ); - _this.setAttribute( "outputchannel", m_outputChannelSpinBox->value() ); + m_inputChannelSpinBox->saveSettings( _doc, _this, "inputchannel" ); + m_outputChannelSpinBox->saveSettings( _doc, _this, "outputchannel" ); m_receiveCheckBox->saveSettings( _doc, _this, "receive" ); m_sendCheckBox->saveSettings( _doc, _this, "send" ); m_defaultVelocityInCheckBox->saveSettings( _doc, _this, "defvelin" ); @@ -292,10 +296,8 @@ void midiTabWidget::saveSettings( QDomDocument & _doc, QDomElement & _this ) void midiTabWidget::loadSettings( const QDomElement & _this ) { - m_inputChannelSpinBox->setValue( _this.attribute( "inputchannel" - ).toInt() ); - m_outputChannelSpinBox->setValue( _this.attribute( "outputchannel" - ).toInt() ); + m_inputChannelSpinBox->loadSettings( _this, "inputchannel" ); + m_outputChannelSpinBox->loadSettings( _this, "outputchannel" ); m_receiveCheckBox->loadSettings( _this, "receive" ); m_sendCheckBox->loadSettings( _this, "send" ); m_defaultVelocityInCheckBox->loadSettings( _this, "defvelin" ); diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 7d691b72b..f42b1ba04 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -260,7 +260,8 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) : m_effectChannelNumber = new lcdSpinBox( MIN_EFFECT_CHANNEL, MAX_EFFECT_CHANNEL, 2, m_generalSettingsWidget, - eng() ); + tr( "FX channel" ), + eng(), this ); m_effectChannelNumber->setInitValue( DEFAULT_EFFECT_CHANNEL ); m_effectChannelNumber->setLabel( tr( "FX CHNL" ) ); m_effectChannelNumber->move( m_surroundArea->x() + @@ -1039,7 +1040,7 @@ void instrumentTrack::saveTrackSpecificSettings( QDomDocument & _doc, m_surroundArea->saveSettings( _doc, _this, "surpos" ); - _this.setAttribute( "fxch", m_effectChannelNumber->value() ); + m_effectChannelNumber->saveSettings( _doc, _this, "fxch" ); _this.setAttribute( "basetone", m_baseTone ); _this.setAttribute( "baseoct", m_baseOctave ); _this.setAttribute( "tab", m_tabWidget->activeTab() ); @@ -1067,8 +1068,7 @@ void instrumentTrack::loadTrackSpecificSettings( const QDomElement & _this ) m_surroundArea->loadSettings( _this, "surpos" ); - m_effectChannelNumber->setInitValue( - _this.attribute( "fxch" ).toInt() ); + m_effectChannelNumber->loadSettings( _this, "fxch" ); m_baseTone = static_cast( _this.attribute( "basetone" ).toInt() ); m_baseOctave = static_cast( _this.attribute(