本文整理汇总了C++中FxMixer::effectChannel方法的典型用法代码示例。如果您正苦于以下问题:C++ FxMixer::effectChannel方法的具体用法?C++ FxMixer::effectChannel怎么用?C++ FxMixer::effectChannel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FxMixer
的用法示例。
在下文中一共展示了FxMixer::effectChannel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FxLine
FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv,
int _chIndex )
{
m_fxLine = new FxLine(_parent, _mv, _chIndex);
FxMixer * m = engine::fxMixer();
m_fader = new fader( &m->effectChannel(_chIndex)->m_volumeModel,
tr( "FX Fader %1" ).arg( _chIndex ), m_fxLine );
m_fader->move( 16-m_fader->width()/2,
m_fxLine->height()-
m_fader->height()-5 );
m_muteBtn = new pixmapButton( m_fxLine, tr( "Mute" ) );
m_muteBtn->setModel( &m->effectChannel(_chIndex)->m_muteModel );
m_muteBtn->setActiveGraphic(
embed::getIconPixmap( "led_off" ) );
m_muteBtn->setInactiveGraphic(
embed::getIconPixmap( "led_green" ) );
m_muteBtn->setCheckable( true );
m_muteBtn->move( 9, m_fader->y()-16);
toolTip::add( m_muteBtn, tr( "Mute this FX channel" ) );
// Create EffectRack for the channel
m_rackView = new EffectRackView( &m->effectChannel(_chIndex)->m_fxChain, _mv->m_racksWidget );
m_rackView->setFixedSize( 245, FxLine::FxLineHeight );
}
示例2: renameChannel
void FxLine::renameChannel()
{
bool ok;
FxMixer * mix = engine::fxMixer();
QString new_name = QInputDialog::getText( this,
FxMixerView::tr( "Rename FX channel" ),
FxMixerView::tr( "Enter the new name for this "
"FX channel" ),
QLineEdit::Normal, mix->effectChannel(m_channelIndex)->m_name, &ok );
if( ok && !new_name.isEmpty() )
{
mix->effectChannel( m_channelIndex )->m_name = new_name;
update();
}
}
示例3: contextMenuEvent
void FxLine::contextMenuEvent( QContextMenuEvent * )
{
FxMixer * mix = engine::fxMixer();
QPointer<captionMenu> contextMenu = new captionMenu( mix->effectChannel( m_channelIndex )->m_name );
if( m_channelIndex != 0 ) // no move-options in master
{
contextMenu->addAction( tr( "Move &left" ), this, SLOT( moveChannelLeft() ) );
contextMenu->addAction( tr( "Move &right" ), this, SLOT( moveChannelRight() ) );
}
contextMenu->addAction( tr( "Rename &channel" ), this, SLOT( renameChannel() ) );
contextMenu->addSeparator();
if( m_channelIndex != 0 ) // no remove-option in master
{
contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "R&emove channel" ),
this, SLOT( removeChannel() ) );
contextMenu->addSeparator();
}
contextMenu->addAction( embed::getIconPixmap( "help" ),
tr( "&Help" ),
this, SLOT( displayHelp() ) );
contextMenu->exec( QCursor::pos() );
delete contextMenu;
}
示例4: updateFaders
void FxMixerView::updateFaders()
{
FxMixer * m = Engine::fxMixer();
// apply master gain
m->effectChannel(0)->m_peakLeft *= Engine::mixer()->masterGain();
m->effectChannel(0)->m_peakRight *= Engine::mixer()->masterGain();
for( int i = 0; i < m_fxChannelViews.size(); ++i )
{
const float opl = m_fxChannelViews[i]->m_fader->getPeak_L();
const float opr = m_fxChannelViews[i]->m_fader->getPeak_R();
const float fall_off = 1.2;
if( m->effectChannel(i)->m_peakLeft > opl )
{
m_fxChannelViews[i]->m_fader->setPeak_L( m->effectChannel(i)->m_peakLeft );
m->effectChannel(i)->m_peakLeft = 0;
}
else
{
m_fxChannelViews[i]->m_fader->setPeak_L( opl/fall_off );
}
if( m->effectChannel(i)->m_peakRight > opr )
{
m_fxChannelViews[i]->m_fader->setPeak_R( m->effectChannel(i)->m_peakRight );
m->effectChannel(i)->m_peakRight = 0;
}
else
{
m_fxChannelViews[i]->m_fader->setPeak_R( opr/fall_off );
}
}
}
示例5: paintEvent
void FxLine::paintEvent( QPaintEvent * )
{
FxMixer * mix = engine::fxMixer();
bool sendToThis = mix->channelSendModel(
m_mv->currentFxLine()->m_channelIndex, m_channelIndex) != NULL;
QPainter painter;
painter.begin( this );
drawFxLine( &painter, this,
mix->effectChannel(m_channelIndex)->m_name,
m_mv->currentFxLine() == this, sendToThis );
painter.end();
}