1
#include "SendButtonIndicator.h"
7
SendButtonIndicator:: SendButtonIndicator( QWidget * _parent, FxLine * _owner,
13
qpmOff = embed::getIconPixmap("mixer_send_off", 23, 16);
14
qpmOn = embed::getIconPixmap("mixer_send_on", 23, 16);
16
// don't do any initializing yet, because the FxMixerView and FxLine
17
// that were passed to this constructor are not done with their constructors
22
void SendButtonIndicator::mousePressEvent( QMouseEvent * e )
24
FxMixer * mix = engine::fxMixer();
25
int from = m_mv->currentFxLine()->channelIndex();
26
int to = m_parent->channelIndex();
27
FloatModel * sendModel = mix->channelSendModel(from, to);
28
if( sendModel == NULL )
30
// not sending. create a mixer send.
31
mix->createChannelSend( from, to );
35
// sending. delete the mixer send.
36
mix->deleteChannelSend( from, to );
39
m_mv->updateFxLine(m_parent->channelIndex());
43
FloatModel * SendButtonIndicator::getSendModel()
45
FxMixer * mix = engine::fxMixer();
46
return mix->channelSendModel(
47
m_mv->currentFxLine()->channelIndex(), m_parent->channelIndex());
50
void SendButtonIndicator::updateLightStatus()
52
setPixmap( getSendModel() == NULL ? qpmOff : qpmOn );