Ejemplo n.º 1
0
FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv,
										  int channelIndex )
{
	m_fxLine = new FxLine(_parent, _mv, channelIndex);

	FxChannel *fxChannel = Engine::fxMixer()->effectChannel(channelIndex);

	m_fader = new Fader( &fxChannel->m_volumeModel,
					tr( "FX Fader %1" ).arg( channelIndex ), m_fxLine );
	m_fader->setLevelsDisplayedInDBFS();
	// TODO dbvToAmp is really dBFSToAmp. Rename in later commit.
	m_fader->setMinPeak(dbvToAmp(-40));
	m_fader->setMaxPeak(dbvToAmp(12));

	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( &fxChannel->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()-11);
	ToolTip::add( m_muteBtn, tr( "Mute this FX channel" ) );

	m_soloBtn = new PixmapButton( m_fxLine, tr( "Solo" ) );
	m_soloBtn->setModel( &fxChannel->m_soloModel );
	m_soloBtn->setActiveGraphic(
				embed::getIconPixmap( "led_red" ) );
	m_soloBtn->setInactiveGraphic(
				embed::getIconPixmap( "led_off" ) );
	m_soloBtn->setCheckable( true );
	m_soloBtn->move( 9,  m_fader->y()-21);
	connect(&fxChannel->m_soloModel, SIGNAL( dataChanged() ),
			_mv, SLOT ( toggledSolo() ) );
	ToolTip::add( m_soloBtn, tr( "Solo FX channel" ) );
	
	// Create EffectRack for the channel
	m_rackView = new EffectRackView( &fxChannel->m_fxChain, _mv->m_racksWidget );
	m_rackView->setFixedSize( 245, FxLine::FxLineHeight );
}
Ejemplo n.º 2
0
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()-11);
	toolTip::add( m_muteBtn, tr( "Mute this FX channel" ) );

	m_soloBtn = new pixmapButton( m_fxLine, tr( "Solo" ) );
	m_soloBtn->setModel( &m->effectChannel(_chIndex)->m_soloModel );
	m_soloBtn->setActiveGraphic(
				embed::getIconPixmap( "led_red" ) );
	m_soloBtn->setInactiveGraphic(
				embed::getIconPixmap( "led_off" ) );
	m_soloBtn->setCheckable( true );
	m_soloBtn->move( 9,  m_fader->y()-21);
	connect(&m->effectChannel(_chIndex)->m_soloModel, SIGNAL( dataChanged() ),
			_mv, SLOT ( toggledSolo() ) );
	toolTip::add( m_soloBtn, tr( "Solo 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 );
}