Control play/pause buttons in slot of MainWindow via signal in Song class

The engine class as the component instance manager is the wrong place to
control the play/pause buttons. Instead emit a signal in the Song class
and update the buttons in a slot in MainWindow. This fixes problems with
GUI/pixmap operations happening outside the GUI thread when exporting a
project.

Closes #435.
This commit is contained in:
Tobias Doerffel
2014-03-18 20:39:52 +01:00
parent b45c0c5f02
commit 41c154dc95
6 changed files with 48 additions and 49 deletions

View File

@@ -107,6 +107,8 @@ public slots:
void togglePianoRollWin();
void toggleControllerRack();
void updatePlayPauseIcons();
void undo();
void redo();

View File

@@ -147,8 +147,6 @@ public:
return s_controllerRackView;
}
static void updatePlayPauseIcons();
static float framesPerTick()
{
return s_framesPerTick;

View File

@@ -360,6 +360,7 @@ private:
signals:
void projectLoaded();
void playbackStateChanged();
void lengthChanged( int _tacts );
void tempoChanged( bpm_t _new_bpm );
void timeSignatureChanged( int _old_ticks_per_tact,