En-/disable loop points via MidiControlListener

MidiControlListener's toggleLoop action makes the song object emit a
loopPointsChanged signal, which timeLine connects to and enables or
disables the loop points accordingly.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Achim Settelmeier
2009-05-31 22:51:42 +02:00
committed by Tobias Doerffel
parent dc539d88de
commit 86b0056488
4 changed files with 35 additions and 5 deletions

View File

@@ -44,9 +44,12 @@ public:
ActionNone = 0,
ActionControl,
ActionPlay,
ActionStop
ActionStop,
ActionToggleLoop,
ActionJumpToLoopStart,
ActionJumpToLoopEnd
} EventAction;
static const int numActions = 4;
static const int numActions = 7;
typedef QMap<int, EventAction> ActionMap;

View File

@@ -192,7 +192,11 @@ public:
return m_timeSigModel;
}
inline void toggleLoopPoints( int _mode )
{
emit loopPointsChanged( _mode );
}
public slots:
void play( void );
void record( void );
@@ -316,7 +320,7 @@ signals:
void tempoChanged( bpm_t _new_bpm );
void timeSignatureChanged( int _old_ticks_per_tact,
int _ticks_per_tact );
void loopPointsChanged( int _mode );
} ;