diff options
author | Tim E. Real <termtech@rogers.com> | 2012-08-04 22:14:50 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2012-08-04 22:14:50 +0000 |
commit | 345fb0cc41b94b08134dc1f40020b4bf26e1d46b (patch) | |
tree | 78f6da3cf9cd64a84ead190e615a175a6a82242d /muse2/muse/song.h | |
parent | 8ee7ac503d93d7a0b6cf3b49c3255d389ba59c17 (diff) |
REWRITE: Introducing: More bits for Song Changed SC_* flags.
Added MusECore::SongChangedFlags_t (in new type_defs.h file). Declared as int64 type.
All Song Changed parameters, handlers, connections, calls, colateral operations etc. now use
this new SongChangedFlags_t.
All the handlers are now ready for the code bodies to accept any extra flags, devs need not
do anything more than define new SC_* flags and write support inside the handlers.
Please beware these possible extra flags when writing songChanged handlers and setting updateFlags.
Diffstat (limited to 'muse2/muse/song.h')
-rw-r--r-- | muse2/muse/song.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/muse2/muse/song.h b/muse2/muse/song.h index 44d5efa6..8777fb2c 100644 --- a/muse2/muse/song.h +++ b/muse2/muse/song.h @@ -30,6 +30,7 @@ #include <map> #include <set> +#include "type_defs.h" #include "pos.h" #include "globaldefs.h" #include "tempo.h" @@ -128,8 +129,7 @@ class Song : public QObject { TempoFifo _tempoFifo; // External tempo changes, processed in heartbeat. - int updateFlags; - int updateFlags2; // Extra room for more flags + MusECore::SongChangedFlags_t updateFlags; TrackList _tracks; // tracklist as seen by arranger MidiTrackList _midis; @@ -346,7 +346,7 @@ class Song : public QObject { //----------------------------------------- void startUndo(); - void endUndo(int /*flags*/, int /*flags2*/ = 0); + void endUndo(MusECore::SongChangedFlags_t); void undoOp(UndoOp::UndoType type, const char* changedFile, const char* changeData, int startframe, int endframe); @@ -372,7 +372,7 @@ class Song : public QObject { //----------------------------------------- void dumpMaster(); - void addUpdateFlags(int f, int f2 = 0) { updateFlags |= f; updateFlags2 |= f2; } + void addUpdateFlags(MusECore::SongChangedFlags_t f) { updateFlags |= f; } //----------------------------------------- // Python bridge related @@ -386,7 +386,7 @@ class Song : public QObject { void seekTo(int tick); // use allowRecursion with care! this could lock up muse if you // aren't sure that your recursion will be finite! - void update(int flags = -1, int flags2 = 0, bool allowRecursion=false); + void update(MusECore::SongChangedFlags_t flags = -1, bool allowRecursion=false); void beat(); void undo(); @@ -420,7 +420,7 @@ class Song : public QObject { void populateScriptMenu(QMenu* menuPlugins, QObject* receiver); signals: - void songChanged(int /*flags*/, int /*flags2*/ = 0); + void songChanged(MusECore::SongChangedFlags_t); void posChanged(int, unsigned, bool); void loopChanged(bool); void recordChanged(bool); |