| 540 | |
| 541 | |
| 542 | void BBTrack::loadTrackSpecificSettings( const QDomElement & _this ) |
| 543 | { |
| 544 | /* if( _this.attribute( "icon" ) != "" ) |
| 545 | { |
| 546 | m_trackLabel->setPixmapFile( _this.attribute( "icon" ) ); |
| 547 | }*/ |
| 548 | |
| 549 | if( _this.hasAttribute( "clonebbt" ) ) |
| 550 | { |
| 551 | const int src = _this.attribute( "clonebbt" ).toInt(); |
| 552 | const int dst = s_infoMap[this]; |
| 553 | TrackContainer::TrackList tl = |
| 554 | Engine::getBBTrackContainer()->tracks(); |
| 555 | // copy TCOs of all tracks from source BB (at bar "src") to destination |
| 556 | // TCOs (which are created if they do not exist yet) |
| 557 | for( TrackContainer::TrackList::iterator it = tl.begin(); |
| 558 | it != tl.end(); ++it ) |
| 559 | { |
| 560 | ( *it )->getTCO( src )->copy(); |
| 561 | ( *it )->getTCO( dst )->paste(); |
| 562 | } |
| 563 | setName( tr( "Clone of %1" ).arg( |
| 564 | _this.parentNode().toElement().attribute( "name" ) ) ); |
| 565 | } |
| 566 | else |
| 567 | { |
| 568 | QDomNode node = _this.namedItem( |
| 569 | TrackContainer::classNodeName() ); |
| 570 | if( node.isElement() ) |
| 571 | { |
| 572 | ( (JournallingObject *)Engine::getBBTrackContainer() )-> |
| 573 | restoreState( node.toElement() ); |
| 574 | } |
| 575 | } |
| 576 | /* doesn't work yet because BBTrack-ctor also sets current bb so if |
| 577 | bb-tracks are created after this function is called, this doesn't |
| 578 | help at all.... |
| 579 | if( _this.attribute( "current" ).toInt() ) |
| 580 | { |
| 581 | engine::getBBEditor()->setCurrentBB( s_infoMap[this] ); |
| 582 | }*/ |
| 583 | } |
| 584 | |
| 585 | |
| 586 |
no test coverage detected