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

Method saveSettings

src/core/Track.cpp:2071–2105  ·  view source on GitHub ↗

! \brief Save this track's settings to file * * We save the track type and its muted state and solo state, then append the track- * specific settings. Then we iterate through the trackContentObjects * and save all their states in turn. * * \param doc The QDomDocument to use to save * \param element The The QDomElement to save into * \todo Does this accurately describe the parameters

Source from the content-addressed store, hash-verified

2069 * \todo Save the track height
2070 */
2071void Track::saveSettings( QDomDocument & doc, QDomElement & element )
2072{
2073 if( !m_simpleSerializingMode )
2074 {
2075 element.setTagName( "track" );
2076 }
2077 element.setAttribute( "type", type() );
2078 element.setAttribute( "name", name() );
2079 m_mutedModel.saveSettings( doc, element, "muted" );
2080 m_soloModel.saveSettings( doc, element, "solo" );
2081
2082 if( m_height >= MINIMAL_TRACK_HEIGHT )
2083 {
2084 element.setAttribute( "height", m_height );
2085 }
2086
2087 QDomElement tsDe = doc.createElement( nodeName() );
2088 // let actual track (InstrumentTrack, bbTrack, sampleTrack etc.) save
2089 // its settings
2090 element.appendChild( tsDe );
2091 saveTrackSpecificSettings( doc, tsDe );
2092
2093 if( m_simpleSerializingMode )
2094 {
2095 m_simpleSerializingMode = false;
2096 return;
2097 }
2098
2099 // now save settings of all TCO's
2100 for( tcoVector::const_iterator it = m_trackContentObjects.begin();
2101 it != m_trackContentObjects.end(); ++it )
2102 {
2103 ( *it )->saveState( doc, element );
2104 }
2105}
2106
2107
2108

Callers

nothing calls this directly

Calls 5

typeFunction · 0.50
nodeNameFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
saveStateMethod · 0.45

Tested by

no test coverage detected