AudioFileProcessor: Make AFP cursor configurable

Add possibility to turn off playback cursor in AFP. Might be good
for weaker systems.

Closes Patch #40.
This commit is contained in:
Raine M. Ekman
2013-06-11 13:19:00 +02:00
committed by Tobias Doerffel
parent 0f3851d597
commit 8e2ec9e48f
4 changed files with 28 additions and 7 deletions

View File

@@ -522,7 +522,8 @@ AudioFileProcessorWaveView::AudioFileProcessorWaveView( QWidget * _parent, int _
m_endKnob( 0 ),
m_isDragging( false ),
m_reversed( false ),
m_framesPlayed( 0 )
m_framesPlayed( 0 ),
m_animation(configManager::inst()->value("ui", "animateafp").toInt())
{
setFixedSize( _w, _h );
setMouseTracking( true );
@@ -701,7 +702,7 @@ void AudioFileProcessorWaveView::paintEvent( QPaintEvent * _pe )
QColor( 255, 255, 0, 70 )
);
if( m_framesPlayed )
if( m_framesPlayed && m_animation)
{
const int played_width_px = m_framesPlayed
/ double( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() )

View File

@@ -91,7 +91,6 @@ private:
BoolModel m_reverseModel;
BoolModel m_loopModel;
friend class AudioFileProcessorView;
} ;
@@ -235,7 +234,7 @@ private:
draggingType m_draggingType;
bool m_reversed;
f_cnt_t m_framesPlayed;
bool m_animation;
public:
AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, sampleBuffer & _buf );