本文整理汇总了C++中FxMixer::moveChannelLeft方法的典型用法代码示例。如果您正苦于以下问题:C++ FxMixer::moveChannelLeft方法的具体用法?C++ FxMixer::moveChannelLeft怎么用?C++ FxMixer::moveChannelLeft使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FxMixer
的用法示例。
在下文中一共展示了FxMixer::moveChannelLeft方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: moveChannelLeft
void FxMixerView::moveChannelLeft(int index, int focusIndex)
{
// can't move master or first channel left or last channel right
if( index <= 1 || index >= m_fxChannelViews.size() ) return;
FxMixer *m = Engine::fxMixer();
// Move instruments channels
m->moveChannelLeft( index );
// Update widgets models
m_fxChannelViews[index]->setChannelIndex( index );
m_fxChannelViews[index - 1]->setChannelIndex( index - 1 );
// Focus on new position
setCurrentFxLine( focusIndex );
}
示例2: moveChannelLeft
void FxMixerView::moveChannelLeft(int index)
{
// can't move master or first channel left or last channel right
if( index <= 1 || index >= m_fxChannelViews.size() ) return;
int selIndex = m_currentFxLine->channelIndex();
FxMixer * mix = engine::fxMixer();
mix->moveChannelLeft(index);
// refresh the two mixer views
for( int i = index-1; i <= index; ++i )
{
// delete the mixer view
int replaceIndex = chLayout->indexOf(m_fxChannelViews[i]->m_fxLine);
chLayout->removeWidget(m_fxChannelViews[i]->m_fxLine);
m_racksLayout->removeWidget( m_fxChannelViews[i]->m_rackView );
delete m_fxChannelViews[i]->m_fader;
delete m_fxChannelViews[i]->m_muteBtn;
delete m_fxChannelViews[i]->m_soloBtn;
delete m_fxChannelViews[i]->m_fxLine;
delete m_fxChannelViews[i];
// add it again
m_fxChannelViews[i] = new FxChannelView( m_channelAreaWidget, this, i );
chLayout->insertWidget( replaceIndex, m_fxChannelViews[i]->m_fxLine );
m_racksLayout->insertWidget( replaceIndex, m_fxChannelViews[i]->m_rackView );
}
// keep selected channel
if( selIndex == index )
{
selIndex = index-1;
}
else if( selIndex == index - 1 )
{
selIndex = index;
}
setCurrentFxLine(selIndex);
}