made it possible to add automation-tracks to BB-editor
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1243 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -53,7 +53,7 @@ public slots:
|
||||
void play( void );
|
||||
void stop( void );
|
||||
void updatePosition( void );
|
||||
|
||||
void addAutomationTrack( void );
|
||||
|
||||
private:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
|
||||
@@ -53,6 +53,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
|
||||
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
|
||||
|
||||
QHBoxLayout * tb_layout = new QHBoxLayout( m_toolBar );
|
||||
tb_layout->setSpacing( 0 );
|
||||
tb_layout->setMargin( 0 );
|
||||
|
||||
|
||||
@@ -77,6 +78,12 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
|
||||
engine::getSong(), SLOT( addBBTrack() ),
|
||||
m_toolBar );
|
||||
|
||||
toolButton * add_automation_track = new toolButton(
|
||||
embed::getIconPixmap( "add_automation" ),
|
||||
tr( "Add automation-track" ),
|
||||
this, SLOT( addAutomationTrack() ), m_toolBar );
|
||||
|
||||
|
||||
|
||||
m_playButton->setWhatsThis(
|
||||
tr( "Click here, if you want to play the current "
|
||||
@@ -100,6 +107,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
|
||||
tb_layout->addWidget( m_bbComboBox );
|
||||
tb_layout->addSpacing( 10 );
|
||||
tb_layout->addWidget( add_bb_track );
|
||||
tb_layout->addWidget( add_automation_track );
|
||||
tb_layout->addStretch();
|
||||
tb_layout->addWidget( l );
|
||||
tb_layout->addSpacing( 15 );
|
||||
@@ -114,8 +122,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
|
||||
|
||||
setModel( _tc );
|
||||
connect( &_tc->m_bbComboBoxModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( updatePosition() ),
|
||||
Qt::QueuedConnection );
|
||||
this, SLOT( updatePosition() ), Qt::QueuedConnection );
|
||||
}
|
||||
|
||||
|
||||
@@ -193,6 +200,14 @@ void bbEditor::updatePosition( void )
|
||||
|
||||
|
||||
|
||||
void bbEditor::addAutomationTrack( void )
|
||||
{
|
||||
(void) track::create( track::AutomationTrack, model() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void bbEditor::keyPressEvent( QKeyEvent * _ke )
|
||||
{
|
||||
if ( _ke->key() == Qt::Key_Space )
|
||||
|
||||
Reference in New Issue
Block a user