本文整理汇总了C++中trackcontainer::TrackList类的典型用法代码示例。如果您正苦于以下问题:C++ TrackList类的具体用法?C++ TrackList怎么用?C++ TrackList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TrackList类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: resolveAllIDs
void AutomationPattern::resolveAllIDs()
{
TrackContainer::TrackList l = Engine::getSong()->tracks() +
Engine::getBBTrackContainer()->tracks();
l += Engine::getSong()->globalAutomationTrack();
for( TrackContainer::TrackList::iterator it = l.begin();
it != l.end(); ++it )
{
if( ( *it )->type() == Track::AutomationTrack ||
( *it )->type() == Track::HiddenAutomationTrack )
{
Track::tcoVector v = ( *it )->getTCOs();
for( Track::tcoVector::iterator j = v.begin();
j != v.end(); ++j )
{
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );
if( a )
{
for( QVector<jo_id_t>::Iterator k = a->m_idsToResolve.begin();
k != a->m_idsToResolve.end(); ++k )
{
JournallingObject * o = Engine::projectJournal()->
journallingObject( *k );
if( o && dynamic_cast<AutomatableModel *>( o ) )
{
a->addObject( dynamic_cast<AutomatableModel *>( o ), false );
}
}
a->m_idsToResolve.clear();
a->dataChanged();
}
}
}
}
}
开发者ID:Lukas-W,项目名称:lmms,代码行数:35,代码来源:AutomationPattern.cpp
示例2: isAutomated
bool AutomationPattern::isAutomated( const AutomatableModel * _m )
{
TrackContainer::TrackList l;
l += Engine::getSong()->tracks();
l += Engine::getBBTrackContainer()->tracks();
l += Engine::getSong()->globalAutomationTrack();
for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it )
{
if( ( *it )->type() == Track::AutomationTrack ||
( *it )->type() == Track::HiddenAutomationTrack )
{
const Track::tcoVector & v = ( *it )->getTCOs();
for( Track::tcoVector::ConstIterator j = v.begin(); j != v.end(); ++j )
{
const AutomationPattern * a = dynamic_cast<const AutomationPattern *>( *j );
if( a && a->hasAutomation() )
{
for( objectVector::const_iterator k = a->m_objects.begin(); k != a->m_objects.end(); ++k )
{
if( *k == _m )
{
return true;
}
}
}
}
}
}
return false;
}
开发者ID:Lukas-W,项目名称:lmms,代码行数:31,代码来源:AutomationPattern.cpp
示例3: removeSteps
void BBTrackContainerView::removeSteps()
{
TrackContainer::TrackList tl = model()->tracks();
for( TrackContainer::TrackList::iterator it = tl.begin();
it != tl.end(); ++it )
{
if( ( *it )->type() == Track::InstrumentTrack )
{
Pattern* p = static_cast<Pattern *>( ( *it )->getTCO( m_bbtc->currentBB() ) );
p->removeSteps();
}
}
}
开发者ID:rcorre,项目名称:lmms,代码行数:14,代码来源:BBEditor.cpp
示例4: loadTrackSpecificSettings
void bbTrack::loadTrackSpecificSettings( const QDomElement & _this )
{
/* if( _this.attribute( "icon" ) != "" )
{
m_trackLabel->setPixmapFile( _this.attribute( "icon" ) );
}*/
if( _this.hasAttribute( "clonebbt" ) )
{
const int src = _this.attribute( "clonebbt" ).toInt();
const int dst = s_infoMap[this];
engine::getBBTrackContainer()->createTCOsForBB( dst );
TrackContainer::TrackList tl =
engine::getBBTrackContainer()->tracks();
// copy TCOs of all tracks from source BB (at bar "src") to destination
// TCOs (which are created if they do not exist yet)
for( TrackContainer::TrackList::iterator it = tl.begin();
it != tl.end(); ++it )
{
( *it )->getTCO( src )->copy();
( *it )->getTCO( dst )->paste();
}
setName( tr( "Clone of %1" ).arg(
_this.parentNode().toElement().attribute( "name" ) ) );
}
else
{
QDomNode node = _this.namedItem(
TrackContainer::classNodeName() );
if( node.isElement() )
{
( (JournallingObject *)engine::getBBTrackContainer() )->
restoreState( node.toElement() );
}
}
/* doesn't work yet because bbTrack-ctor also sets current bb so if
bb-tracks are created after this function is called, this doesn't
help at all....
if( _this.attribute( "current" ).toInt() )
{
engine::getBBEditor()->setCurrentBB( s_infoMap[this] );
}*/
}
开发者ID:Cubiicle,项目名称:lmms,代码行数:43,代码来源:bb_track.cpp
示例5:
/*! \brief returns a list of all the automation patterns everywhere that are connected to a specific model
* \param _m the model we want to look for
*/
QVector<AutomationPattern *> AutomationPattern::patternsForModel( const AutomatableModel * _m )
{
QVector<AutomationPattern *> patterns;
TrackContainer::TrackList l;
l += Engine::getSong()->tracks();
l += Engine::getBBTrackContainer()->tracks();
l += Engine::getSong()->globalAutomationTrack();
// go through all tracks...
for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it )
{
// we want only automation tracks...
if( ( *it )->type() == Track::AutomationTrack ||
( *it )->type() == Track::HiddenAutomationTrack )
{
// get patterns in those tracks....
const Track::tcoVector & v = ( *it )->getTCOs();
// go through all the patterns...
for( Track::tcoVector::ConstIterator j = v.begin(); j != v.end(); ++j )
{
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );
// check that the pattern has automation
if( a && a->hasAutomation() )
{
// now check is the pattern is connected to the model we want by going through all the connections
// of the pattern
bool has_object = false;
for( objectVector::const_iterator k = a->m_objects.begin(); k != a->m_objects.end(); ++k )
{
if( *k == _m )
{
has_object = true;
}
}
// if the patterns is connected to the model, add it to the list
if( has_object ) { patterns += a; }
}
}
}
}
return patterns;
}
开发者ID:Lukas-W,项目名称:lmms,代码行数:45,代码来源:AutomationPattern.cpp
注:本文中的trackcontainer::TrackList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论