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:
committed by
Tobias Doerffel
parent
0f3851d597
commit
8e2ec9e48f
@@ -109,6 +109,7 @@ private slots:
|
||||
void toggleOneInstrumentTrackWindow( bool _enabled );
|
||||
void toggleCompactTrackButtons( bool _enabled );
|
||||
void toggleSyncVSTPlugins( bool _enabled );
|
||||
void toggleAnimateAFP( bool _enabled );
|
||||
|
||||
|
||||
private:
|
||||
@@ -158,6 +159,7 @@ private:
|
||||
bool m_oneInstrumentTrackWindow;
|
||||
bool m_compactTrackButtons;
|
||||
bool m_syncVSTPlugins;
|
||||
bool m_animateAFP;
|
||||
|
||||
typedef QMap<QString, AudioDevice::setupWidget *> AswMap;
|
||||
typedef QMap<QString, MidiClient::setupWidget *> MswMap;
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* setup_dialog.cpp - dialog for setting up LMMS
|
||||
*
|
||||
* Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -119,7 +119,9 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
|
||||
m_compactTrackButtons( configManager::inst()->value( "ui",
|
||||
"compacttrackbuttons" ).toInt() ),
|
||||
m_syncVSTPlugins( configManager::inst()->value( "ui",
|
||||
"syncvstplugins" ).toInt() )
|
||||
"syncvstplugins" ).toInt() ),
|
||||
m_animateAFP(configManager::inst()->value( "ui",
|
||||
"animateafp").toInt() )
|
||||
{
|
||||
setWindowIcon( embed::getIconPixmap( "setup_general" ) );
|
||||
setWindowTitle( tr( "Setup LMMS" ) );
|
||||
@@ -476,7 +478,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
|
||||
tabWidget * ui_fx_tw = new tabWidget( tr( "UI effects vs. "
|
||||
"performance" ).toUpper(),
|
||||
performance );
|
||||
ui_fx_tw->setFixedHeight( 100 );
|
||||
ui_fx_tw->setFixedHeight( 120 );
|
||||
|
||||
ledCheckBox * disable_ch_act_ind = new ledCheckBox(
|
||||
tr( "Disable channel activity indicators" ),
|
||||
@@ -511,6 +513,15 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
|
||||
this, SLOT( toggleAutoSave( bool ) ) );
|
||||
|
||||
|
||||
ledCheckBox * animAFP = new ledCheckBox(
|
||||
tr( "Show playback cursor in AudioFileProcessor" ),
|
||||
ui_fx_tw );
|
||||
animAFP->move( 10, 100 );
|
||||
animAFP->setChecked( m_animateAFP );
|
||||
connect( animAFP, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( toggleAnimateAFP( bool ) ) );
|
||||
|
||||
|
||||
|
||||
perf_layout->addWidget( ui_fx_tw );
|
||||
perf_layout->addStretch();
|
||||
@@ -787,6 +798,9 @@ void setupDialog::accept()
|
||||
QString::number( m_compactTrackButtons ) );
|
||||
configManager::inst()->setValue( "ui", "syncvstplugins",
|
||||
QString::number( m_syncVSTPlugins ) );
|
||||
configManager::inst()->setValue( "ui", "animateafp",
|
||||
QString::number( m_animateAFP ) );
|
||||
|
||||
|
||||
configManager::inst()->setWorkingDir( m_workingDir );
|
||||
configManager::inst()->setVSTDir( m_vstDir );
|
||||
@@ -974,6 +988,11 @@ void setupDialog::toggleSyncVSTPlugins( bool _enabled )
|
||||
m_syncVSTPlugins = _enabled;
|
||||
}
|
||||
|
||||
void setupDialog::toggleAnimateAFP( bool _enabled )
|
||||
{
|
||||
m_animateAFP = _enabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user