当前位置: 首页>>代码示例>>C++>>正文


C++ FxMixer::moveChannelLeft方法代码示例

本文整理汇总了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 );
}
开发者ID:liushuyu,项目名称:lmms,代码行数:17,代码来源:FxMixerView.cpp

示例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);
}
开发者ID:floft,项目名称:lmms,代码行数:41,代码来源:FxMixerView.cpp


注:本文中的FxMixer::moveChannelLeft方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。