Added an option do en/disable the note labels.

This commit is contained in:
Ruediger Ranft
2013-10-27 17:05:18 +01:00
parent 11402b49b7
commit dc86474589
3 changed files with 25 additions and 3 deletions

View File

@@ -45,6 +45,7 @@
#include <math.h>
#include <algorithm>
#include "config_mgr.h"
#include "piano_roll.h"
#include "bb_track_container.h"
#include "Clipboard.h"
@@ -3163,7 +3164,10 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
*cursor );
}
printNoteHeights(p, keyAreaBottom(), width(), m_startKey);
if( configManager::inst()->value( "ui", "printnotelabels").toInt() )
{
printNoteHeights(p, keyAreaBottom(), width(), m_startKey);
}
}

View File

@@ -121,7 +121,9 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
m_syncVSTPlugins( configManager::inst()->value( "ui",
"syncvstplugins" ).toInt() ),
m_animateAFP(configManager::inst()->value( "ui",
"animateafp").toInt() )
"animateafp").toInt() ),
m_printNoteLabels(configManager::inst()->value( "ui",
"printnotelabels").toInt() )
{
setWindowIcon( embed::getIconPixmap( "setup_general" ) );
setWindowTitle( tr( "Setup LMMS" ) );
@@ -271,6 +273,15 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
connect( syncVST, SIGNAL( toggled( bool ) ),
this, SLOT( toggleSyncVSTPlugins( bool ) ) );
ledCheckBox * noteLabels = new ledCheckBox(
tr( "Enable note labels in piano roll" ),
misc_tw );
labelNumber++;
noteLabels->move( XDelta, YDelta*labelNumber );
noteLabels->setChecked( m_printNoteLabels );
connect( noteLabels, SIGNAL( toggled( bool ) ),
this, SLOT( toggleNoteLabels( bool ) ) );
misc_tw->setFixedHeight( YDelta*labelNumber + HeaderSize );
@@ -813,6 +824,8 @@ void setupDialog::accept()
QString::number( m_syncVSTPlugins ) );
configManager::inst()->setValue( "ui", "animateafp",
QString::number( m_animateAFP ) );
configManager::inst()->setValue( "ui", "printnotelabels",
QString::number( m_printNoteLabels ) );
configManager::inst()->setWorkingDir( m_workingDir );
@@ -1007,7 +1020,10 @@ void setupDialog::toggleAnimateAFP( bool _enabled )
}
void setupDialog::toggleNoteLabels( bool en )
{
m_printNoteLabels = en;
}
void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled )