Moved Setting of activity indicator color from InstrumentTrack to InstrumentTrackView

This commit is contained in:
Dave French
2015-01-29 09:49:20 +00:00
parent c02f043b3f
commit 968d0215df
2 changed files with 18 additions and 16 deletions

View File

@@ -225,7 +225,6 @@ protected slots:
void updateBaseNote();
void updatePitch();
void updatePitchRange();
void muteHasChanged();
private:
@@ -321,6 +320,7 @@ private slots:
void midiInSelected();
void midiOutSelected();
void midiConfigChanged();
void muteHasChanged();
private:

View File

@@ -124,7 +124,6 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) :
connect( &m_baseNoteModel, SIGNAL( dataChanged() ), this, SLOT( updateBaseNote() ) );
connect( &m_pitchModel, SIGNAL( dataChanged() ), this, SLOT( updatePitch() ) );
connect( &m_pitchRangeModel, SIGNAL( dataChanged() ), this, SLOT( updatePitchRange() ) );
connect( &m_mutedModel, SIGNAL( dataChanged() ), this, SLOT( muteHasChanged() ) );
m_effectChannelModel.setRange( 0, Engine::fxMixer()->numChannels()-1, 1);
@@ -550,20 +549,6 @@ void InstrumentTrack::updatePitchRange()
processOutEvent( MidiEvent( MidiControlChange, midiPort()->realOutputChannel(), MidiControllerDataEntry, midiPitchRange() ) );
}
void InstrumentTrack::muteHasChanged()
{
if( m_mutedModel.value() )
{
m_fb->setActiveColor( QApplication::palette().color( QPalette::Active,
QPalette::Highlight ) );
} else
{
m_fb->setActiveColor( QApplication::palette().color( QPalette::Active,
QPalette::BrightText ) );
}
}
@@ -941,6 +926,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
connect( m_activityIndicator, SIGNAL( released() ),
this, SLOT( activityIndicatorReleased() ) );
_it->setIndicator( m_activityIndicator );
connect( &_it->m_mutedModel, SIGNAL( dataChanged() ), this, SLOT( muteHasChanged() ) );
setModel( _it );
}
@@ -1145,6 +1131,22 @@ void InstrumentTrackView::midiConfigChanged()
void InstrumentTrackView::muteHasChanged()
{
if(model()->m_mutedModel.value() )
{
m_activityIndicator->setActiveColor( QApplication::palette().color( QPalette::Active,
QPalette::Highlight ) );
} else
{
m_activityIndicator->setActiveColor( QApplication::palette().color( QPalette::Active,
QPalette::BrightText ) );
}
}
class fxLineLcdSpinBox : public LcdSpinBox