MCPcopy Create free account
hub / github.com/LMMS/lmms / loadSettings

Method loadSettings

src/core/FxMixer.cpp:732–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730
731
732void FxMixer::loadSettings( const QDomElement & _this )
733{
734 clear();
735 QDomNode node = _this.firstChild();
736
737 while( ! node.isNull() )
738 {
739 QDomElement fxch = node.toElement();
740
741 // index of the channel we are about to load
742 int num = fxch.attribute( "num" ).toInt();
743
744 // allocate enough channels
745 allocateChannelsTo( num );
746
747 m_fxChannels[num]->m_volumeModel.loadSettings( fxch, "volume" );
748 m_fxChannels[num]->m_muteModel.loadSettings( fxch, "muted" );
749 m_fxChannels[num]->m_soloModel.loadSettings( fxch, "soloed" );
750 m_fxChannels[num]->m_name = fxch.attribute( "name" );
751
752 m_fxChannels[num]->m_fxChain.restoreState( fxch.firstChildElement(
753 m_fxChannels[num]->m_fxChain.nodeName() ) );
754
755 // mixer sends
756 QDomNodeList chData = fxch.childNodes();
757 for( unsigned int i=0; i<chData.length(); ++i )
758 {
759 QDomElement chDataItem = chData.at(i).toElement();
760 if( chDataItem.nodeName() == QString( "send" ) )
761 {
762 int sendTo = chDataItem.attribute( "channel" ).toInt();
763 allocateChannelsTo( sendTo ) ;
764 FxRoute * fxr = createChannelSend( num, sendTo, 1.0f );
765 if( fxr ) fxr->amount()->loadSettings( chDataItem, "amount" );
766 }
767 }
768
769
770
771 node = node.nextSibling();
772 }
773
774 emit dataChanged();
775}
776
777
778void FxMixer::validateChannelName( int index, int oldIndex )

Callers

nothing calls this directly

Calls 6

isNullMethod · 0.80
amountMethod · 0.80
QStringClass · 0.50
restoreStateMethod · 0.45
nodeNameMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected