summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2012-08-04 22:14:50 +0000
committerTim E. Real <termtech@rogers.com>2012-08-04 22:14:50 +0000
commit345fb0cc41b94b08134dc1f40020b4bf26e1d46b (patch)
tree78f6da3cf9cd64a84ead190e615a175a6a82242d /muse2/muse
parent8ee7ac503d93d7a0b6cf3b49c3255d389ba59c17 (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')
-rw-r--r--muse2/muse/arranger/arranger.cpp8
-rw-r--r--muse2/muse/arranger/arranger.h5
-rw-r--r--muse2/muse/arranger/arrangerview.cpp4
-rw-r--r--muse2/muse/arranger/arrangerview.h3
-rw-r--r--muse2/muse/arranger/pcanvas.cpp2
-rw-r--r--muse2/muse/arranger/pcanvas.h3
-rw-r--r--muse2/muse/arranger/tlist.cpp4
-rw-r--r--muse2/muse/arranger/tlist.h3
-rw-r--r--muse2/muse/cliplist/cliplist.cpp4
-rw-r--r--muse2/muse/cliplist/cliplist.h3
-rw-r--r--muse2/muse/confmport.cpp4
-rw-r--r--muse2/muse/confmport.h3
-rw-r--r--muse2/muse/ctrl/ctrlcanvas.cpp4
-rw-r--r--muse2/muse/ctrl/ctrlcanvas.h3
-rw-r--r--muse2/muse/instruments/midictrledit.cpp4
-rw-r--r--muse2/muse/instruments/midictrledit.h3
-rw-r--r--muse2/muse/liste/listedit.cpp4
-rw-r--r--muse2/muse/liste/listedit.h3
-rw-r--r--muse2/muse/marker/markerview.cpp4
-rw-r--r--muse2/muse/marker/markerview.h3
-rw-r--r--muse2/muse/master/lmaster.cpp4
-rw-r--r--muse2/muse/master/lmaster.h3
-rw-r--r--muse2/muse/master/master.cpp4
-rw-r--r--muse2/muse/master/master.h3
-rw-r--r--muse2/muse/master/masteredit.cpp4
-rw-r--r--muse2/muse/master/masteredit.h3
-rw-r--r--muse2/muse/midiedit/dcanvas.cpp2
-rw-r--r--muse2/muse/midiedit/dlist.cpp2
-rw-r--r--muse2/muse/midiedit/dlist.h3
-rw-r--r--muse2/muse/midiedit/drumedit.cpp6
-rw-r--r--muse2/muse/midiedit/drumedit.h3
-rw-r--r--muse2/muse/midiedit/ecanvas.cpp2
-rw-r--r--muse2/muse/midiedit/ecanvas.h3
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp4
-rw-r--r--muse2/muse/midiedit/pianoroll.h3
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp8
-rw-r--r--muse2/muse/midiedit/scoreedit.h5
-rw-r--r--muse2/muse/midieditor.cpp2
-rw-r--r--muse2/muse/midieditor.h3
-rw-r--r--muse2/muse/miditransform.cpp6
-rw-r--r--muse2/muse/miditransform.h3
-rw-r--r--muse2/muse/mixer/amixer.cpp4
-rw-r--r--muse2/muse/mixer/amixer.h3
-rw-r--r--muse2/muse/mixer/astrip.cpp2
-rw-r--r--muse2/muse/mixer/astrip.h3
-rw-r--r--muse2/muse/mixer/mstrip.cpp2
-rw-r--r--muse2/muse/mixer/mstrip.h3
-rw-r--r--muse2/muse/mixer/rack.cpp4
-rw-r--r--muse2/muse/mixer/rack.h3
-rw-r--r--muse2/muse/mixer/routedialog.cpp4
-rw-r--r--muse2/muse/mixer/routedialog.h4
-rw-r--r--muse2/muse/mixer/strip.h3
-rw-r--r--muse2/muse/mplugins/midiitransform.cpp4
-rw-r--r--muse2/muse/mplugins/midiitransform.h3
-rw-r--r--muse2/muse/song.cpp44
-rw-r--r--muse2/muse/song.h12
-rw-r--r--muse2/muse/trackdrummapupdater.cpp6
-rw-r--r--muse2/muse/trackdrummapupdater.h3
-rw-r--r--muse2/muse/transport.cpp4
-rw-r--r--muse2/muse/transport.h3
-rw-r--r--muse2/muse/type_defs.h35
-rw-r--r--muse2/muse/undo.cpp6
-rw-r--r--muse2/muse/waveedit/waveedit.cpp4
-rw-r--r--muse2/muse/waveedit/waveedit.h3
-rw-r--r--muse2/muse/waveedit/waveview.cpp4
-rw-r--r--muse2/muse/waveedit/waveview.h3
-rw-r--r--muse2/muse/widgets/comment.cpp4
-rw-r--r--muse2/muse/widgets/comment.h3
-rw-r--r--muse2/muse/widgets/midisyncimpl.cpp8
-rw-r--r--muse2/muse/widgets/midisyncimpl.h3
-rw-r--r--muse2/muse/widgets/mtrackinfo.cpp6
-rw-r--r--muse2/muse/widgets/mtrackinfo.h5
-rw-r--r--muse2/muse/widgets/mtscale.cpp4
-rw-r--r--muse2/muse/widgets/mtscale.h3
-rw-r--r--muse2/muse/widgets/mtscale_flo.cpp4
-rw-r--r--muse2/muse/widgets/mtscale_flo.h3
-rw-r--r--muse2/muse/widgets/routepopup.cpp4
-rw-r--r--muse2/muse/widgets/routepopup.h3
-rw-r--r--muse2/muse/widgets/sig_tempo_toolbar.cpp8
-rw-r--r--muse2/muse/widgets/sig_tempo_toolbar.h5
-rw-r--r--muse2/muse/widgets/songpos_toolbar.cpp6
-rw-r--r--muse2/muse/widgets/songpos_toolbar.h3
-rw-r--r--muse2/muse/widgets/wtscale.cpp4
-rw-r--r--muse2/muse/widgets/wtscale.h3
84 files changed, 224 insertions, 174 deletions
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp
index 62c405d3..d25aa0b9 100644
--- a/muse2/muse/arranger/arranger.cpp
+++ b/muse2/muse/arranger/arranger.cpp
@@ -524,7 +524,7 @@ Arranger::Arranger(ArrangerView* parent, const char* name)
connect(canvas, SIGNAL(dclickPart(MusECore::Track*)), SIGNAL(editPart(MusECore::Track*)));
connect(canvas, SIGNAL(startEditor(MusECore::PartList*,int)), SIGNAL(startEditor(MusECore::PartList*, int)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(canvas, SIGNAL(followEvent(int)), hscroll, SLOT(setOffset(int)));
connect(canvas, SIGNAL(selectionChanged()), SIGNAL(selectionChanged()));
connect(canvas, SIGNAL(dropSongFile(const QString&)), SIGNAL(dropSongFile(const QString&)));
@@ -643,7 +643,7 @@ void Arranger::songlenChanged(int n)
// songChanged
//---------------------------------------------------------
-void Arranger::songChanged(int type)
+void Arranger::songChanged(MusECore::SongChangedFlags_t type)
{
// Is it simply a midi controller value adjustment? Forget it.
if(type != SC_MIDI_CONTROLLER)
@@ -1160,7 +1160,7 @@ void Arranger::genTrackInfo(QWidget* parent)
// updateTrackInfo
//---------------------------------------------------------
-void Arranger::updateTrackInfo(int flags)
+void Arranger::updateTrackInfo(MusECore::SongChangedFlags_t flags)
{
if (!showTrackinfoFlag) {
switchInfo(-1);
@@ -1198,7 +1198,7 @@ void Arranger::switchInfo(int n)
delete w;
w = new AudioStrip(trackInfo, (MusECore::AudioTrack*)selected);
//w->setFocusPolicy(Qt::TabFocus); // p4.0.9
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), w, SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), w, SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), w, SLOT(configChanged()));
w->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
trackInfo->addWidget(w, 2);
diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h
index 60390a8f..f37edd9b 100644
--- a/muse2/muse/arranger/arranger.h
+++ b/muse2/muse/arranger/arranger.h
@@ -29,6 +29,7 @@
#include <QScrollBar>
#include <QResizeEvent>
+#include "type_defs.h"
#include "midieditor.h"
#include "pcanvas.h"
#include "trackautomationview.h"
@@ -156,7 +157,7 @@ class Arranger : public QWidget {
void showTrackInfo(bool);
void trackSelectionChanged();
void trackInfoScroll(int);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void modeChange(int);
void setTime(unsigned);
void globalPitchChanged(int);
@@ -184,7 +185,7 @@ class Arranger : public QWidget {
public slots:
void dclickPart(MusECore::Track*);
void setTool(int);
- void updateTrackInfo(int flags);
+ void updateTrackInfo(MusECore::SongChangedFlags_t flags);
void configChanged();
void controllerChanged(MusECore::Track *t, int ctrlId);
void focusCanvas();
diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp
index 14a0d8ef..66e3bbbb 100644
--- a/muse2/muse/arranger/arrangerview.cpp
+++ b/muse2/muse/arranger/arrangerview.cpp
@@ -113,7 +113,7 @@ ArrangerView::ArrangerView(QWidget* parent)
connect(MusEGlobal::muse, SIGNAL(configChanged()), arranger, SLOT(configChanged()));
connect(arranger, SIGNAL(setUsedTool(int)), editTools, SLOT(set(int)));
connect(arranger, SIGNAL(selectionChanged()), SLOT(selectionChanged()));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(songChanged(MusECore::SongChangedFlags_t)));
@@ -379,7 +379,7 @@ void ArrangerView::closeEvent(QCloseEvent* e)
// songChanged
//---------------------------------------------------------
-void ArrangerView::songChanged(int type)
+void ArrangerView::songChanged(MusECore::SongChangedFlags_t type)
{
// TEST Try these, may need more/less. Esp more: Originally songChanged was directly connected to updateVisibleTracksButtons, so...
if(type & (SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_TRACK_MODIFIED |
diff --git a/muse2/muse/arranger/arrangerview.h b/muse2/muse/arranger/arrangerview.h
index 94e49e96..6a8f47c9 100644
--- a/muse2/muse/arranger/arrangerview.h
+++ b/muse2/muse/arranger/arrangerview.h
@@ -41,6 +41,7 @@
#include <QToolButton>
#include <limits.h>
+#include "type_defs.h"
#include "noteinfo.h"
#include "cobject.h"
#include "event.h"
@@ -128,7 +129,7 @@ class ArrangerView : public TopWin
void cmd(int);
void addNewTrack(QAction* action);
void configCustomColumns();
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
signals:
void isDeleting(MusEGui::TopWin*);
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index c5c3ca6d..5e754e25 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -266,7 +266,7 @@ void PartCanvas::viewMouseDoubleClickEvent(QMouseEvent* event)
// update
//---------------------------------------------------------
-void PartCanvas::updateSong(DragType t, int flags)
+void PartCanvas::updateSong(DragType t, MusECore::SongChangedFlags_t flags)
{
MusEGlobal::song->update(flags | ((t == MOVE_COPY || t == MOVE_CLONE)
? SC_PART_INSERTED : SC_PART_MODIFIED));
diff --git a/muse2/muse/arranger/pcanvas.h b/muse2/muse/arranger/pcanvas.h
index 1b766c5d..c9e4c946 100644
--- a/muse2/muse/arranger/pcanvas.h
+++ b/muse2/muse/arranger/pcanvas.h
@@ -28,6 +28,7 @@
#include <set>
#include <QTime>
+#include "type_defs.h"
#include "song.h"
#include "canvas.h"
#include "trackautomationview.h"
@@ -123,7 +124,7 @@ class PartCanvas : public Canvas {
virtual void moveCanvasItems(CItemList&, int, int, DragType);
virtual bool moveItem(MusECore::Undo& operations, CItem*, const QPoint&, DragType);
- virtual void updateSong(DragType, int);
+ virtual void updateSong(DragType, MusECore::SongChangedFlags_t);
virtual void startDrag(CItem*, DragType);
virtual void dragEnterEvent(QDragEnterEvent*);
virtual void viewDropEvent(QDropEvent*);
diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp
index 4d2a1251..6f8837e8 100644
--- a/muse2/muse/arranger/tlist.cpp
+++ b/muse2/muse/arranger/tlist.cpp
@@ -113,7 +113,7 @@ TList::TList(Header* hdr, QWidget* parent, const char* name)
//setAttribute(Qt::WA_OpaquePaintEvent);
resizeFlag = false;
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(redraw()));
connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(maybeUpdateVolatileCustomColumns()));
}
@@ -122,7 +122,7 @@ TList::TList(Header* hdr, QWidget* parent, const char* name)
// songChanged
//---------------------------------------------------------
-void TList::songChanged(int flags)
+void TList::songChanged(MusECore::SongChangedFlags_t flags)
{
if (flags & (SC_MUTE | SC_SOLO | SC_RECFLAG | SC_TRACK_INSERTED
| SC_TRACK_REMOVED | SC_TRACK_MODIFIED | SC_ROUTE | SC_CHANNELS | SC_MIDI_TRACK_PROP
diff --git a/muse2/muse/arranger/tlist.h b/muse2/muse/arranger/tlist.h
index d3701451..fd05cac9 100644
--- a/muse2/muse/arranger/tlist.h
+++ b/muse2/muse/arranger/tlist.h
@@ -23,6 +23,7 @@
#ifndef __TLIST_H__
#define __TLIST_H__
+#include "type_defs.h"
#include "track.h"
#include <map>
#include <QWidget>
@@ -123,7 +124,7 @@ class TList : public QWidget {
void chanValueFinished();
void ctrlValueFinished();
void instrPopupActivated(QAction*);
- void songChanged(int flags);
+ void songChanged(MusECore::SongChangedFlags_t flags);
void changeAutomation(QAction*);
void changeAutomationColor(QAction*);
void loadTrackDrummap(MusECore::MidiTrack*, const char* filename=NULL);
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index f32fabbc..8a711b61 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -146,7 +146,7 @@ ClipListEdit::ClipListEdit(QWidget* parent)
connect(editor->view, SIGNAL(itemSelectionChanged()), SLOT(clipSelectionChanged()));
connect(editor->view, SIGNAL(itemClicked(QTreeWidgetItem*, int)), SLOT(clicked(QTreeWidgetItem*, int)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(editor->start, SIGNAL(valueChanged(const MusECore::Pos&)), SLOT(startChanged(const MusECore::Pos&)));
connect(editor->len, SIGNAL(valueChanged(const MusECore::Pos&)), SLOT(lenChanged(const MusECore::Pos&)));
@@ -186,7 +186,7 @@ void ClipListEdit::closeEvent(QCloseEvent* e)
// songChanged
//---------------------------------------------------------
-void ClipListEdit::songChanged(int type)
+void ClipListEdit::songChanged(MusECore::SongChangedFlags_t type)
{
// Is it simply a midi controller value adjustment? Forget it.
if(type == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/cliplist/cliplist.h b/muse2/muse/cliplist/cliplist.h
index 0972df97..4d182a27 100644
--- a/muse2/muse/cliplist/cliplist.h
+++ b/muse2/muse/cliplist/cliplist.h
@@ -24,6 +24,7 @@
#ifndef __CLIPLIST_H__
#define __CLIPLIST_H__
+#include "type_defs.h"
#include "../cobject.h"
#include "event.h"
@@ -66,7 +67,7 @@ class ClipListEdit : public TopWin {
void updateList();
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void startChanged(const MusECore::Pos&);
void lenChanged(const MusECore::Pos&);
void clipSelectionChanged();
diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp
index 2281f134..cd5c95e9 100644
--- a/muse2/muse/confmport.cpp
+++ b/muse2/muse/confmport.cpp
@@ -1107,7 +1107,7 @@ MPConfig::MPConfig(QWidget* parent)
this, SLOT(rbClicked(QTableWidgetItem*)));
connect(mdevView, SIGNAL(itemChanged(QTableWidgetItem*)),
this, SLOT(mdevViewItemRenamed(QTableWidgetItem*)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(synthList, SIGNAL(itemSelectionChanged()), SLOT(selectionChanged()));
connect(instanceList, SIGNAL(itemSelectionChanged()), SLOT(selectionChanged()));
@@ -1138,7 +1138,7 @@ void MPConfig::selectionChanged()
// songChanged
//---------------------------------------------------------
-void MPConfig::songChanged(int flags)
+void MPConfig::songChanged(MusECore::SongChangedFlags_t flags)
{
if(!(flags & (SC_CONFIG | SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_TRACK_MODIFIED)))
return;
diff --git a/muse2/muse/confmport.h b/muse2/muse/confmport.h
index ce23fd24..04147090 100644
--- a/muse2/muse/confmport.h
+++ b/muse2/muse/confmport.h
@@ -28,6 +28,7 @@
#include <QToolTip>
#include "ui_synthconfigbase.h"
+#include "type_defs.h"
class QTreeWidget;
class QTableWidget;
@@ -61,7 +62,7 @@ class MPConfig : public QDialog, Ui::SynthConfigBase {
private slots:
void rbClicked(QTableWidgetItem*);
void mdevViewItemRenamed(QTableWidgetItem*);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void selectionChanged();
void addInstanceClicked();
void removeInstanceClicked();
diff --git a/muse2/muse/ctrl/ctrlcanvas.cpp b/muse2/muse/ctrl/ctrlcanvas.cpp
index b1e8753c..8d4bc8a3 100644
--- a/muse2/muse/ctrl/ctrlcanvas.cpp
+++ b/muse2/muse/ctrl/ctrlcanvas.cpp
@@ -216,7 +216,7 @@ CtrlCanvas::CtrlCanvas(MidiEditor* e, QWidget* parent, int xmag,
if (!editor->parts()->empty())
setCurTrackAndPart();
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
setCurDrumPitch(editor->curDrumInstrument());
@@ -440,7 +440,7 @@ void CtrlCanvas::configChanged()
// all marked parts are added to the internal event list
//---------------------------------------------------------
-void CtrlCanvas::songChanged(int type)
+void CtrlCanvas::songChanged(MusECore::SongChangedFlags_t type)
{
if(editor->deleting()) // Ignore while while deleting to prevent crash.
return;
diff --git a/muse2/muse/ctrl/ctrlcanvas.h b/muse2/muse/ctrl/ctrlcanvas.h
index 8e107789..e38edc22 100644
--- a/muse2/muse/ctrl/ctrlcanvas.h
+++ b/muse2/muse/ctrl/ctrlcanvas.h
@@ -26,6 +26,7 @@
#include <list>
+#include "type_defs.h"
#include "view.h"
#include "tools.h"
#include "midictrl.h"
@@ -168,7 +169,7 @@ class CtrlCanvas : public MusEGui::View {
void updateSelections();
private slots:
- void songChanged(int type);
+ void songChanged(MusECore::SongChangedFlags_t type);
void configChanged();
void setCurDrumPitch(int);
diff --git a/muse2/muse/instruments/midictrledit.cpp b/muse2/muse/instruments/midictrledit.cpp
index 03aa2f76..f4c74e9a 100644
--- a/muse2/muse/instruments/midictrledit.cpp
+++ b/muse2/muse/instruments/midictrledit.cpp
@@ -132,14 +132,14 @@ MidiControllerEditDialog::MidiControllerEditDialog(QWidget* parent, const char*
updateViewController();
_modified = false;
buttonApply->setEnabled(false);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
}
//---------------------------------------------------------
// songChanged
//---------------------------------------------------------
-void MidiControllerEditDialog::songChanged(int flags)
+void MidiControllerEditDialog::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/instruments/midictrledit.h b/muse2/muse/instruments/midictrledit.h
index 308302b1..a4d9501c 100644
--- a/muse2/muse/instruments/midictrledit.h
+++ b/muse2/muse/instruments/midictrledit.h
@@ -24,6 +24,7 @@
#ifndef __MIDICTRLEDIT_H__
#define __MIDICTRLEDIT_H__
+#include "type_defs.h"
#include "ccontrolbase.h"
#include "midictrl.h"
@@ -59,7 +60,7 @@ class MidiControllerEditDialog : public MidiControllerEditDialogBase {
void minChanged(int);
void maxChanged(int);
void portChanged(int);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
public:
MidiControllerEditDialog(QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0);
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index 62b2004d..d6bf894a 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -194,7 +194,7 @@ void ListEdit::closeEvent(QCloseEvent* e)
// songChanged
//---------------------------------------------------------
-void ListEdit::songChanged(int type)
+void ListEdit::songChanged(MusECore::SongChangedFlags_t type)
{
if(_isDeleting) // Ignore while while deleting to prevent crash.
return;
@@ -588,7 +588,7 @@ ListEdit::ListEdit(MusECore::PartList* pl)
mainGrid->setRowStretch(1, 100);
mainGrid->setColumnStretch(0, 100);
mainGrid->addWidget(liste, 1, 0, 2, 1);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
if(pl->empty())
{
diff --git a/muse2/muse/liste/listedit.h b/muse2/muse/liste/listedit.h
index d9cdac96..472ba7b8 100644
--- a/muse2/muse/liste/listedit.h
+++ b/muse2/muse/liste/listedit.h
@@ -23,6 +23,7 @@
#ifndef __LIST_EDIT_H__
#define __LIST_EDIT_H__
+#include "type_defs.h"
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
@@ -83,7 +84,7 @@ class ListEdit : public MidiEditor {
void configChanged();
public slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void focusCanvas();
signals:
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index 037c0ff3..5a5f9a2a 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -271,7 +271,7 @@ MarkerView::MarkerView(QWidget* parent)
// Rest
//---------------------------------------------------
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
updateList();
@@ -411,7 +411,7 @@ void MarkerView::deleteMarker()
// songChanged
//---------------------------------------------------------
-void MarkerView::songChanged(int flags)
+void MarkerView::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/marker/markerview.h b/muse2/muse/marker/markerview.h
index 3da98b31..16e36767 100644
--- a/muse2/muse/marker/markerview.h
+++ b/muse2/muse/marker/markerview.h
@@ -23,6 +23,7 @@
#ifndef __MARKERVIEW_H__
#define __MARKERVIEW_H__
+#include "type_defs.h"
#include "cobject.h"
#include <QTreeWidgetItem>
@@ -91,7 +92,7 @@ class MarkerView : public TopWin {
void markerChanged(int);
void clicked(QTreeWidgetItem*);
void updateList();
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
signals:
void isDeleting(MusEGui::TopWin*);
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index 23c39bc7..44dbf1e1 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -132,7 +132,7 @@ void LMaster::closeEvent(QCloseEvent* e)
// songChanged
//---------------------------------------------------------
-void LMaster::songChanged(int type)
+void LMaster::songChanged(MusECore::SongChangedFlags_t type)
{
if(_isDeleting) // Ignore while while deleting to prevent crash.
return;
@@ -267,7 +267,7 @@ LMaster::LMaster()
connect(view, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), SLOT(select(QTreeWidgetItem*, QTreeWidgetItem*)));
connect(view, SIGNAL(itemPressed(QTreeWidgetItem*, int)), SLOT(itemPressed(QTreeWidgetItem*, int)));
connect(view, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), SLOT(itemDoubleClicked(QTreeWidgetItem*)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(this, SIGNAL(seekTo(int)), MusEGlobal::song, SLOT(seekTo(int)));
connect(tempoButton, SIGNAL(clicked()), SLOT(tempoButtonClicked()));
connect(timeSigButton, SIGNAL(clicked()), SLOT(timeSigButtonClicked()));
diff --git a/muse2/muse/master/lmaster.h b/muse2/muse/master/lmaster.h
index d3278333..52c75c49 100644
--- a/muse2/muse/master/lmaster.h
+++ b/muse2/muse/master/lmaster.h
@@ -23,6 +23,7 @@
#ifndef __LMASTER_EDIT_H__
#define __LMASTER_EDIT_H__
+#include "type_defs.h"
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
@@ -165,7 +166,7 @@ class LMaster : public MidiEditor {
void comboboxTimerSlot();
public slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void configChanged();
void focusCanvas();
diff --git a/muse2/muse/master/master.cpp b/muse2/muse/master/master.cpp
index 9f692465..76d22a2f 100644
--- a/muse2/muse/master/master.cpp
+++ b/muse2/muse/master/master.cpp
@@ -60,14 +60,14 @@ Master::Master(MidiEditor* e, QWidget* parent, int xmag, int ymag)
setFocusPolicy(Qt::StrongFocus);
setMouseTracking(true);
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), this, SLOT(setPos(int, unsigned, bool)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(songChanged(MusECore::SongChangedFlags_t)));
}
//---------------------------------------------------------
// songChanged
//---------------------------------------------------------
-void Master::songChanged(int type)
+void Master::songChanged(MusECore::SongChangedFlags_t type)
{
//if(_isDeleting) return; // todo: If things get complicated don't forget some mechanism to ignore while while deleting to prevent possible crash.
diff --git a/muse2/muse/master/master.h b/muse2/muse/master/master.h
index 70667f6a..37991a7f 100644
--- a/muse2/muse/master/master.h
+++ b/muse2/muse/master/master.h
@@ -24,6 +24,7 @@
#ifndef __MASTER_H__
#define __MASTER_H__
+#include "type_defs.h"
#include "view.h"
#include "song.h"
#include "tools.h"
@@ -69,7 +70,7 @@ class Master : public MusEGui::View {
void deleteVal(int x1, int x2);
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
signals:
void followEvent(int);
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index 68ba5168..14a6a35d 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -71,7 +71,7 @@ void MasterEdit::closeEvent(QCloseEvent* e)
// songChanged
//---------------------------------------------------------
-void MasterEdit::songChanged(int type)
+void MasterEdit::songChanged(MusECore::SongChangedFlags_t type)
{
if(_isDeleting) // Ignore while while deleting to prevent crash.
return;
@@ -246,7 +246,7 @@ MasterEdit::MasterEdit()
connect(tscale, SIGNAL(tempoChanged(int)), SLOT(setTempo(int)));
connect(canvas, SIGNAL(tempoChanged(int)), SLOT(setTempo(int)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(posChanged(int,unsigned,bool)), SLOT(posChanged(int,unsigned,bool)));
connect(canvas, SIGNAL(followEvent(int)), hscroll, SLOT(setOffset(int)));
diff --git a/muse2/muse/master/masteredit.h b/muse2/muse/master/masteredit.h
index 15b5a649..5d98cabe 100644
--- a/muse2/muse/master/masteredit.h
+++ b/muse2/muse/master/masteredit.h
@@ -26,6 +26,7 @@
#include <QByteArray>
#include <QResizeEvent>
+#include "type_defs.h"
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
@@ -89,7 +90,7 @@ class MasterEdit : public MidiEditor {
void tempoChange(double);
public slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void focusCanvas();
signals:
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp
index e06fd40a..42eda0fd 100644
--- a/muse2/muse/midiedit/dcanvas.cpp
+++ b/muse2/muse/midiedit/dcanvas.cpp
@@ -1670,7 +1670,7 @@ void DrumCanvas::rebuildOurDrumMap()
emit ourDrumMapChanged(false);
if (need_update)
- MusEGlobal::song->update(SC_DRUMMAP, 0, true); // i know, this causes a recursion, which possibly
+ MusEGlobal::song->update(SC_DRUMMAP, true); // i know, this causes a recursion, which possibly
// isn't the most elegant solution here. but it will
// never be an infinite recursion
}
diff --git a/muse2/muse/midiedit/dlist.cpp b/muse2/muse/midiedit/dlist.cpp
index e099ecc9..a77fb810 100644
--- a/muse2/muse/midiedit/dlist.cpp
+++ b/muse2/muse/midiedit/dlist.cpp
@@ -969,7 +969,7 @@ void DList::tracklistChanged()
// songChanged
//---------------------------------------------------------
-void DList::songChanged(int flags)
+void DList::songChanged(MusECore::SongChangedFlags_t flags)
{
if (flags & SC_DRUMMAP) {
redraw();
diff --git a/muse2/muse/midiedit/dlist.h b/muse2/muse/midiedit/dlist.h
index 517ac722..b4c757e8 100644
--- a/muse2/muse/midiedit/dlist.h
+++ b/muse2/muse/midiedit/dlist.h
@@ -26,6 +26,7 @@
#include <QKeyEvent>
#include <QLineEdit>
+#include "type_defs.h"
#include "awl/pitchedit.h"
#include "view.h"
@@ -157,7 +158,7 @@ class DList : public View {
public slots:
void tracklistChanged();
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void ourDrumMapChanged(bool);
public:
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 196e7ffc..dc403d33 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -562,8 +562,8 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un
connect(canvas, SIGNAL(verticalScroll(unsigned)), vscroll, SLOT(setPos(unsigned)));
connect(canvas, SIGNAL(horizontalScroll(unsigned)),hscroll, SLOT(setPos(unsigned)));
connect(canvas, SIGNAL(horizontalScrollNoLimit(unsigned)),hscroll, SLOT(setPosNoLimit(unsigned)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged1(int)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), dlist, SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged1(MusECore::SongChangedFlags_t)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), dlist, SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(vscroll, SIGNAL(scrollChanged(int)), canvas, SLOT(setYPos(int)));
connect(vscroll, SIGNAL(scaleChanged(int)), canvas, SLOT(setYMag(int)));
connect(vscroll, SIGNAL(scaleChanged(int)), dlist, SLOT(setYMag(int)));
@@ -632,7 +632,7 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un
// songChanged1
//---------------------------------------------------------
-void DrumEdit::songChanged1(int bits)
+void DrumEdit::songChanged1(MusECore::SongChangedFlags_t bits)
{
if(_isDeleting) // Ignore while deleting to prevent crash.
return;
diff --git a/muse2/muse/midiedit/drumedit.h b/muse2/muse/midiedit/drumedit.h
index 7704b283..7ebf2fd9 100644
--- a/muse2/muse/midiedit/drumedit.h
+++ b/muse2/muse/midiedit/drumedit.h
@@ -26,6 +26,7 @@
#include <QByteArray>
#include <limits.h>
+#include "type_defs.h"
#include "midieditor.h"
#include "noteinfo.h"
#include "cobject.h"
@@ -144,7 +145,7 @@ class DrumEdit : public MidiEditor {
void follow(int);
void newCanvasWidth(int);
void configChanged();
- void songChanged1(int);
+ void songChanged1(MusECore::SongChangedFlags_t);
void setStep(QString);
void updateGroupingActions();
diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp
index 88cf3318..6907c014 100644
--- a/muse2/muse/midiedit/ecanvas.cpp
+++ b/muse2/muse/midiedit/ecanvas.cpp
@@ -143,7 +143,7 @@ void EventCanvas::updateSelection()
// songChanged(type)
//---------------------------------------------------------
-void EventCanvas::songChanged(int flags)
+void EventCanvas::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/midiedit/ecanvas.h b/muse2/muse/midiedit/ecanvas.h
index 454ae3fa..7847e88a 100644
--- a/muse2/muse/midiedit/ecanvas.h
+++ b/muse2/muse/midiedit/ecanvas.h
@@ -23,6 +23,7 @@
#ifndef __ECANVAS_H__
#define __ECANVAS_H__
+#include "type_defs.h"
#include "canvas.h"
#include "noteinfo.h"
#include <QEvent>
@@ -97,7 +98,7 @@ class EventCanvas : public Canvas {
bool midiin() const { return _midiin; }
bool steprec() const { return _steprec; }
QString getCaption() const;
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void range(int* s, int* e) const { *s = start_tick; *e = end_tick; }
void playEvents(bool flag) { _playEvents = flag; }
void selectAtTick(unsigned int tick);
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index 7fce2e30..9ede827e 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -442,7 +442,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,
vscroll->setPos(KH * 30);
info->setEnabled(false);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged1(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged1(MusECore::SongChangedFlags_t)));
setWindowTitle(canvas->getCaption());
@@ -492,7 +492,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,
// songChanged1
//---------------------------------------------------------
-void PianoRoll::songChanged1(int bits)
+void PianoRoll::songChanged1(MusECore::SongChangedFlags_t bits)
{
if(_isDeleting) // Ignore while while deleting to prevent crash.
return;
diff --git a/muse2/muse/midiedit/pianoroll.h b/muse2/muse/midiedit/pianoroll.h
index 8040dc7b..9c699724 100644
--- a/muse2/muse/midiedit/pianoroll.h
+++ b/muse2/muse/midiedit/pianoroll.h
@@ -29,6 +29,7 @@
#include <QKeyEvent>
#include <limits.h>
+#include "type_defs.h"
#include "noteinfo.h"
#include "cobject.h"
#include "midieditor.h"
@@ -164,7 +165,7 @@ class PianoRoll : public MidiEditor {
void setSpeaker(bool);
void setTime(unsigned);
void follow(int pos);
- void songChanged1(int);
+ void songChanged1(MusECore::SongChangedFlags_t);
void configChanged();
void newCanvasWidth(int);
void toggleTrackInfo();
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 8a252d74..8f4b9d3c 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -212,7 +212,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
connect(score_canvas, SIGNAL(canvas_height_changed(int)), SLOT(canvas_height_changed(int)));
connect(score_canvas, SIGNAL(viewport_height_changed(int)), SLOT(viewport_height_changed(int)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), score_canvas, SLOT(song_changed(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), score_canvas, SLOT(song_changed(MusECore::SongChangedFlags_t)));
connect(xscroll, SIGNAL(valueChanged(int)), time_bar, SLOT(set_xpos(int)));
connect(score_canvas, SIGNAL(pos_add_changed()), time_bar, SLOT(pos_add_changed()));
@@ -518,7 +518,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
clipboard_changed();
selection_changed();
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(song_changed(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(song_changed(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(newPartsCreated(const std::map< MusECore::Part*, std::set<MusECore::Part*> >&)), score_canvas, SLOT(add_new_parts(const std::map< MusECore::Part*, std::set<MusECore::Part*> >&)));
score_canvas->fully_recalculate();
@@ -646,7 +646,7 @@ void ScoreEdit::quant_combobox_changed(int idx)
focusCanvas();
}
-void ScoreEdit::song_changed(int flags)
+void ScoreEdit::song_changed(MusECore::SongChangedFlags_t flags)
{
if(_isDeleting) // Ignore while while deleting to prevent crash.
return;
@@ -1535,7 +1535,7 @@ void ScoreCanvas::fully_recalculate()
song_changed(SC_EVENT_MODIFIED);
}
-void ScoreCanvas::song_changed(int flags)
+void ScoreCanvas::song_changed(MusECore::SongChangedFlags_t flags)
{
if(parent && parent->deleting()) // Ignore while while deleting to prevent crash.
return;
diff --git a/muse2/muse/midiedit/scoreedit.h b/muse2/muse/midiedit/scoreedit.h
index 09720505..3b413660 100644
--- a/muse2/muse/midiedit/scoreedit.h
+++ b/muse2/muse/midiedit/scoreedit.h
@@ -40,6 +40,7 @@
#include <QToolButton>
#include <limits.h>
+#include "type_defs.h"
#include "noteinfo.h"
#include "cobject.h"
#include "event.h"
@@ -196,7 +197,7 @@ class ScoreEdit : public TopWin
void viewport_width_changed(int);
void canvas_height_changed(int);
void viewport_height_changed(int);
- void song_changed(int);
+ void song_changed(MusECore::SongChangedFlags_t);
void focusCanvas();
public:
@@ -794,7 +795,7 @@ class ScoreCanvas : public MusEGui::View
public slots:
void x_scroll_event(int);
void y_scroll_event(int);
- void song_changed(int);
+ void song_changed(MusECore::SongChangedFlags_t);
void fully_recalculate();
void goto_tick(int,bool);
void pos_changed(int i, unsigned u, bool b);
diff --git a/muse2/muse/midieditor.cpp b/muse2/muse/midieditor.cpp
index 86a5044a..b4830c21 100644
--- a/muse2/muse/midieditor.cpp
+++ b/muse2/muse/midieditor.cpp
@@ -179,7 +179,7 @@ void MidiEditor::writeStatus(int level, MusECore::Xml& xml) const
// songChanged
//---------------------------------------------------------
-void MidiEditor::songChanged(int type)
+void MidiEditor::songChanged(MusECore::SongChangedFlags_t type)
{
if (type) {
diff --git a/muse2/muse/midieditor.h b/muse2/muse/midieditor.h
index 9a215a03..fd6d255b 100644
--- a/muse2/muse/midieditor.h
+++ b/muse2/muse/midieditor.h
@@ -23,6 +23,7 @@
#ifndef __MIDIEDITOR_H__
#define __MIDIEDITOR_H__
+#include "type_defs.h"
#include "al/sig.h"
#include "cobject.h"
@@ -78,7 +79,7 @@ class MidiEditor : public TopWin {
void addNewParts(const std::map< MusECore::Part*, std::set<MusECore::Part*> >&);
public slots:
- void songChanged(int type);
+ void songChanged(MusECore::SongChangedFlags_t type);
void setCurDrumInstrument(int instr);
void horizontalZoomIn();
void horizontalZoomOut();
diff --git a/muse2/muse/miditransform.cpp b/muse2/muse/miditransform.cpp
index 4692e5d9..bd8dea27 100644
--- a/muse2/muse/miditransform.cpp
+++ b/muse2/muse/miditransform.cpp
@@ -421,7 +421,7 @@ MidiTransformerDialog::MidiTransformerDialog(QDialog* parent, Qt::WFlags fl)
//---------------------------------------------------
updatePresetList();
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
}
//---------------------------------------------------------
@@ -437,7 +437,7 @@ MidiTransformerDialog::~MidiTransformerDialog()
// songChanged
//---------------------------------------------------------
-void MidiTransformerDialog::songChanged(int flags)
+void MidiTransformerDialog::songChanged(MusECore::SongChangedFlags_t flags)
{
// Whenever a song is loaded, flags is -1. Since transforms are part of configuration,
// use SC_CONFIG here, to filter unwanted song change events.
@@ -920,7 +920,7 @@ bool MidiTransformerDialog::isSelected(MusECore::Event& event, MusECore::MidiPar
void MidiTransformerDialog::apply()
{
- int flags = 0;
+ MusECore::SongChangedFlags_t flags = 0;
MusEGlobal::song->startUndo();
MusEGlobal::audio->msgIdle(true);
bool copyExtract = (data->cmt->funcOp == MusECore::Copy)
diff --git a/muse2/muse/miditransform.h b/muse2/muse/miditransform.h
index 690bd868..2ed366bf 100644
--- a/muse2/muse/miditransform.h
+++ b/muse2/muse/miditransform.h
@@ -25,6 +25,7 @@
#define __MIDITRANSFORM_H__
#include "ui_transformbase.h"
+#include "type_defs.h"
class QListWidgetItem;
class QDialog;
@@ -117,7 +118,7 @@ class MidiTransformerDialog : public QDialog, public Ui::MidiTransformDialogBase
void insideLoopChanged(bool);
public slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
public:
MidiTransformerDialog(QDialog* parent = 0, Qt::WFlags fl = 0);
diff --git a/muse2/muse/mixer/amixer.cpp b/muse2/muse/mixer/amixer.cpp
index 1dd09c4f..fbdc4d30 100644
--- a/muse2/muse/mixer/amixer.cpp
+++ b/muse2/muse/mixer/amixer.cpp
@@ -238,7 +238,7 @@ AudioMixerApp::AudioMixerApp(QWidget* parent, MusEGlobal::MixerConfig* c)
connect(view, SIGNAL(layoutRequest()), SLOT(setSizing()));
///connect(this, SIGNAL(layoutRequest()), SLOT(setSizing()));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
//MusEGlobal::song->update(); // calls update mixer
@@ -554,7 +554,7 @@ void AudioMixerApp::configChanged()
// songChanged
//---------------------------------------------------------
-void AudioMixerApp::songChanged(int flags)
+void AudioMixerApp::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/mixer/amixer.h b/muse2/muse/mixer/amixer.h
index e1c70ca3..4a45d214 100644
--- a/muse2/muse/mixer/amixer.h
+++ b/muse2/muse/mixer/amixer.h
@@ -26,6 +26,7 @@
#include <QScrollArea>
+#include "type_defs.h"
#include "cobject.h"
#include "synth.h"
#include "node.h"
@@ -123,7 +124,7 @@ class AudioMixerApp : public QMainWindow {
//void layoutRequest();
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
//void configChanged() { songChanged(-1); }
void configChanged();
//void addNewTrack(QAction*);
diff --git a/muse2/muse/mixer/astrip.cpp b/muse2/muse/mixer/astrip.cpp
index 3b0a8707..49954a0c 100644
--- a/muse2/muse/mixer/astrip.cpp
+++ b/muse2/muse/mixer/astrip.cpp
@@ -170,7 +170,7 @@ void AudioStrip::updateRouteButtons()
// songChanged
//---------------------------------------------------------
-void AudioStrip::songChanged(int val)
+void AudioStrip::songChanged(MusECore::SongChangedFlags_t val)
{
// Is it simply a midi controller value adjustment? Forget it.
if (val == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/mixer/astrip.h b/muse2/muse/mixer/astrip.h
index c0df5360..f995ce5e 100644
--- a/muse2/muse/mixer/astrip.h
+++ b/muse2/muse/mixer/astrip.h
@@ -27,6 +27,7 @@
#include <vector>
+#include "type_defs.h"
#include "strip.h"
//#include "route.h"
@@ -111,7 +112,7 @@ class AudioStrip : public Strip {
public slots:
virtual void configChanged();
- virtual void songChanged(int);
+ virtual void songChanged(MusECore::SongChangedFlags_t);
public:
AudioStrip(QWidget* parent, MusECore::AudioTrack*);
diff --git a/muse2/muse/mixer/mstrip.cpp b/muse2/muse/mixer/mstrip.cpp
index 6f98ffb8..f8e7b7f3 100644
--- a/muse2/muse/mixer/mstrip.cpp
+++ b/muse2/muse/mixer/mstrip.cpp
@@ -459,7 +459,7 @@ void MidiStrip::configChanged()
// songChanged
//---------------------------------------------------------
-void MidiStrip::songChanged(int val)
+void MidiStrip::songChanged(MusECore::SongChangedFlags_t val)
{
if (mute && (val & SC_MUTE)) { // mute && off
mute->blockSignals(true);
diff --git a/muse2/muse/mixer/mstrip.h b/muse2/muse/mixer/mstrip.h
index d5bf5a9f..2a400799 100644
--- a/muse2/muse/mixer/mstrip.h
+++ b/muse2/muse/mixer/mstrip.h
@@ -25,6 +25,7 @@
#ifndef __MSTRIP_H__
#define __MSTRIP_H__
+#include "type_defs.h"
#include "strip.h"
#include <QLabel>
@@ -89,7 +90,7 @@ class MidiStrip : public Strip {
virtual void heartBeat();
public slots:
- virtual void songChanged(int);
+ virtual void songChanged(MusECore::SongChangedFlags_t);
virtual void configChanged();
public:
diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp
index 8b5bc716..f7a6d899 100644
--- a/muse2/muse/mixer/rack.cpp
+++ b/muse2/muse/mixer/rack.cpp
@@ -174,7 +174,7 @@ EffectRack::EffectRack(QWidget* parent, MusECore::AudioTrack* t)
connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
this, SLOT(doubleClicked(QListWidgetItem*)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
EffectRackDelegate* er_delegate = new EffectRackDelegate(this, track);
setItemDelegate(er_delegate);
@@ -207,7 +207,7 @@ EffectRack::~EffectRack()
// songChanged
//---------------------------------------------------------
-void EffectRack::songChanged(int typ)
+void EffectRack::songChanged(MusECore::SongChangedFlags_t typ)
{
if (typ & (SC_ROUTE | SC_RACK)) {
updateContents();
diff --git a/muse2/muse/mixer/rack.h b/muse2/muse/mixer/rack.h
index 49905f48..4c93b05e 100644
--- a/muse2/muse/mixer/rack.h
+++ b/muse2/muse/mixer/rack.h
@@ -25,6 +25,7 @@
#define __RACK_H__
#include <QListWidget>
+#include "type_defs.h"
class QDragEnterEvent;
class QDragLeaveEvent;
@@ -62,7 +63,7 @@ class EffectRack : public QListWidget {
private slots:
void menuRequested(QListWidgetItem*);
void doubleClicked(QListWidgetItem*);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void updateContents();
protected:
diff --git a/muse2/muse/mixer/routedialog.cpp b/muse2/muse/mixer/routedialog.cpp
index 2d73a6c0..c0eba948 100644
--- a/muse2/muse/mixer/routedialog.cpp
+++ b/muse2/muse/mixer/routedialog.cpp
@@ -47,7 +47,7 @@ RouteDialog::RouteDialog(QWidget* parent)
connect(newDstList, SIGNAL(itemSelectionChanged()), SLOT(dstSelectionChanged()));
connect(removeButton, SIGNAL(clicked()), SLOT(removeRoute()));
connect(connectButton, SIGNAL(clicked()), SLOT(addRoute()));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
routingChanged();
}
@@ -118,7 +118,7 @@ void RouteDialog::routingChanged()
// songChanged
//---------------------------------------------------------
-void RouteDialog::songChanged(int v)
+void RouteDialog::songChanged(MusECore::SongChangedFlags_t v)
{
if (v & (SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_ROUTE)) {
routingChanged();
diff --git a/muse2/muse/mixer/routedialog.h b/muse2/muse/mixer/routedialog.h
index 4d1856e5..8fab5e36 100644
--- a/muse2/muse/mixer/routedialog.h
+++ b/muse2/muse/mixer/routedialog.h
@@ -25,6 +25,8 @@
#define __ROUTEDIALOG_H__
#include "ui_routedialogbase.h"
+#include "type_defs.h"
+
class QCloseEvent;
class QDialog;
@@ -47,7 +49,7 @@ class RouteDialog : public QDialog, public Ui::RouteDialogBase {
void addRoute();
void srcSelectionChanged();
void dstSelectionChanged();
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
signals:
void closed();
diff --git a/muse2/muse/mixer/strip.h b/muse2/muse/mixer/strip.h
index 5e788484..bf446013 100644
--- a/muse2/muse/mixer/strip.h
+++ b/muse2/muse/mixer/strip.h
@@ -31,6 +31,7 @@
#include <QGridLayout>
#include <QLabel>
+#include "type_defs.h"
#include "globaldefs.h"
//#include "route.h"
@@ -86,7 +87,7 @@ class Strip : public QFrame {
public slots:
void resetPeaks();
- virtual void songChanged(int) = 0;
+ virtual void songChanged(MusECore::SongChangedFlags_t) = 0;
virtual void configChanged() = 0;
public:
diff --git a/muse2/muse/mplugins/midiitransform.cpp b/muse2/muse/mplugins/midiitransform.cpp
index 232c6f99..4be99f9d 100644
--- a/muse2/muse/mplugins/midiitransform.cpp
+++ b/muse2/muse/mplugins/midiitransform.cpp
@@ -918,14 +918,14 @@ MidiInputTransformDialog::MidiInputTransformDialog(QDialog* parent, Qt::WFlags f
updatePresetList();
presetList->setCurrentItem(presetList->item(0));
presetChanged(presetList->item(0));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
}
//---------------------------------------------------------
// songChanged
//---------------------------------------------------------
-void MidiInputTransformDialog::songChanged(int flags)
+void MidiInputTransformDialog::songChanged(MusECore::SongChangedFlags_t flags)
{
// Whenever a song is loaded, flags is -1. Since transforms are part of configuration,
// use SC_CONFIG here, to filter unwanted song change events.
diff --git a/muse2/muse/mplugins/midiitransform.h b/muse2/muse/mplugins/midiitransform.h
index 8c21e068..30dabd13 100644
--- a/muse2/muse/mplugins/midiitransform.h
+++ b/muse2/muse/mplugins/midiitransform.h
@@ -27,6 +27,7 @@
#include "ui_itransformbase.h"
#include <QCloseEvent>
+#include "type_defs.h"
class QButtonGroup;
class Xml;
@@ -114,7 +115,7 @@ class MidiInputTransformDialog : public QDialog, public Ui::MidiInputTransformDi
void procChannelValbChanged(int);
public slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
public:
MidiInputTransformDialog(QDialog* parent = 0, Qt::WFlags fl = 0);
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index b738c795..9781116f 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -524,7 +524,7 @@ void Song::duplicateTracks()
--trackno;
}
- int update_flags = SC_TRACK_INSERTED;
+ MusECore::SongChangedFlags_t update_flags = SC_TRACK_INSERTED;
if(flags & (Track::ASSIGN_ROUTES | Track::ASSIGN_DEFAULT_ROUTES))
update_flags |= SC_ROUTE;
MusEGlobal::song->endUndo(update_flags);
@@ -1370,22 +1370,17 @@ void Song::rewindStart()
// update
//---------------------------------------------------------
-void Song::update(int flags, int flags2, bool allowRecursion)
+void Song::update(MusECore::SongChangedFlags_t flags, bool allowRecursion)
{
- // HACK: If flags is -1, it is very highly likely the caller wanted flags2 = -1 as well.
- // Highly improbable someone only wanted all 32 flags set and not flags2.
- if(flags == -1)
- flags2 = -1;
-
static int level = 0; // DEBUG
if (level && !allowRecursion) {
- printf("THIS SHOULD NEVER HAPPEN: unallowed recursion in Song::update(%08x %08x), level %d!\n"
+ printf("THIS SHOULD NEVER HAPPEN: unallowed recursion in Song::update(%08x), level %d!\n"
" the songChanged() signal is NOT emitted. this will\n"
- " probably cause windows being not up-to-date.\n", flags, flags2, level);
+ " probably cause windows being not up-to-date.\n", flags, level);
return;
}
++level;
- emit songChanged(flags, flags2);
+ emit songChanged(flags);
--level;
}
@@ -1779,11 +1774,11 @@ void Song::rescanAlsaPorts()
void Song::endMsgCmd()
{
- if (updateFlags || updateFlags2) {
+ if (updateFlags) {
redoList->clearDelete();
MusEGlobal::undoAction->setEnabled(true);
MusEGlobal::redoAction->setEnabled(false);
- emit songChanged(updateFlags, updateFlags2);
+ emit songChanged(updateFlags);
}
}
@@ -1794,7 +1789,6 @@ void Song::endMsgCmd()
void Song::undo()
{
updateFlags = 0;
- updateFlags2 = 0;
if (doUndo1())
return;
MusEGlobal::audio->msgUndo();
@@ -1805,7 +1799,7 @@ void Song::undo()
if(updateFlags && (SC_TRACK_REMOVED | SC_TRACK_INSERTED))
MusEGlobal::audio->msgUpdateSoloStates();
- emit songChanged(updateFlags, updateFlags2);
+ emit songChanged(updateFlags);
}
//---------------------------------------------------------
@@ -1815,7 +1809,6 @@ void Song::undo()
void Song::redo()
{
updateFlags = 0;
- updateFlags2 = 0;
if (doRedo1())
return;
MusEGlobal::audio->msgRedo();
@@ -1826,7 +1819,7 @@ void Song::redo()
if(updateFlags && (SC_TRACK_REMOVED | SC_TRACK_INSERTED))
MusEGlobal::audio->msgUpdateSoloStates();
- emit songChanged(updateFlags, updateFlags2);
+ emit songChanged(updateFlags);
}
//---------------------------------------------------------
@@ -1858,20 +1851,15 @@ void Song::processMsg(AudioMsg* msg)
}
}
updateFlags = SC_TRACK_MODIFIED;
- updateFlags2 = 0;
break;
case SEQM_ADD_EVENT:
updateFlags = SC_EVENT_INSERTED;
- updateFlags2 = 0;
if (addEvent(msg->ev1, (MidiPart*)msg->p2)) {
Event ev;
addUndo(UndoOp(UndoOp::AddEvent, ev, msg->ev1, (Part*)msg->p2, msg->a, msg->b));
}
else
- {
updateFlags = 0;
- updateFlags2 = 0;
- }
if(msg->a)
addPortCtrlEvents(msg->ev1, (Part*)msg->p2, msg->b);
break;
@@ -1885,7 +1873,6 @@ void Song::processMsg(AudioMsg* msg)
addUndo(UndoOp(UndoOp::DeleteEvent, e, event, (Part*)part, msg->a, msg->b));
deleteEvent(event, part);
updateFlags = SC_EVENT_REMOVED;
- updateFlags2 = 0;
}
break;
case SEQM_CHANGE_EVENT:
@@ -1896,7 +1883,6 @@ void Song::processMsg(AudioMsg* msg)
addPortCtrlEvents(msg->ev2, (Part*)msg->p3, msg->b);
addUndo(UndoOp(UndoOp::ModifyEvent, msg->ev2, msg->ev1, (Part*)msg->p3, msg->a, msg->b));
updateFlags = SC_EVENT_MODIFIED;
- updateFlags2 = 0;
break;
// Moved here from MidiSeq::processMsg p4.0.34
@@ -1923,14 +1909,12 @@ void Song::processMsg(AudioMsg* msg)
addUndo(UndoOp(UndoOp::AddTempo, msg->a, msg->b));
MusEGlobal::tempomap.addTempo(msg->a, msg->b);
updateFlags = SC_TEMPO;
- updateFlags2 = 0;
break;
case SEQM_SET_TEMPO:
addUndo(UndoOp(UndoOp::AddTempo, msg->a, msg->b));
MusEGlobal::tempomap.setTempo(msg->a, msg->b);
updateFlags = SC_TEMPO;
- updateFlags2 = 0;
break;
case SEQM_SET_GLOBAL_TEMPO:
@@ -1941,35 +1925,30 @@ void Song::processMsg(AudioMsg* msg)
addUndo(UndoOp(UndoOp::DeleteTempo, msg->a, msg->b));
MusEGlobal::tempomap.delTempo(msg->a);
updateFlags = SC_TEMPO;
- updateFlags2 = 0;
break;
case SEQM_ADD_SIG:
addUndo(UndoOp(UndoOp::AddSig, msg->a, msg->b, msg->c));
AL::sigmap.add(msg->a, AL::TimeSignature(msg->b, msg->c));
updateFlags = SC_SIG;
- updateFlags2 = 0;
break;
case SEQM_REMOVE_SIG:
addUndo(UndoOp(UndoOp::DeleteSig, msg->a, msg->b, msg->c));
AL::sigmap.del(msg->a);
updateFlags = SC_SIG;
- updateFlags2 = 0;
break;
case SEQM_ADD_KEY:
addUndo(UndoOp(UndoOp::AddKey, msg->a, msg->b));
MusEGlobal::keymap.addKey(msg->a, (key_enum) msg->b);
updateFlags = SC_KEY;
- updateFlags2 = 0;
break;
case SEQM_REMOVE_KEY:
addUndo(UndoOp(UndoOp::DeleteKey, msg->a, msg->b));
MusEGlobal::keymap.delKey(msg->a);
updateFlags = SC_KEY;
- updateFlags2 = 0;
break;
default:
@@ -1987,7 +1966,6 @@ void Song::cmdAddPart(Part* part)
addPart(part);
addUndo(UndoOp(UndoOp::AddPart, part));
updateFlags = SC_PART_INSERTED;
- updateFlags2 = 0;
}
//---------------------------------------------------------
@@ -2001,7 +1979,6 @@ void Song::cmdRemovePart(Part* part)
part->events()->incARef(-1);
unchainClone(part);
updateFlags = SC_PART_REMOVED;
- updateFlags2 = 0;
}
//---------------------------------------------------------
@@ -2028,7 +2005,6 @@ void Song::cmdChangePart(Part* oldPart, Part* newPart, bool doCtrls, bool doClon
addPortCtrlEvents(newPart, doClones);
updateFlags = SC_PART_MODIFIED;
- updateFlags2 = 0;
}
//---------------------------------------------------------
@@ -2163,7 +2139,7 @@ void Song::clear(bool signal, bool clear_all)
if (signal) {
emit loopChanged(false);
recordChanged(false);
- emit songChanged(-1, -1);
+ emit songChanged(-1);
}
}
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);
diff --git a/muse2/muse/trackdrummapupdater.cpp b/muse2/muse/trackdrummapupdater.cpp
index 5fce2587..2ad6a90d 100644
--- a/muse2/muse/trackdrummapupdater.cpp
+++ b/muse2/muse/trackdrummapupdater.cpp
@@ -31,10 +31,10 @@ using MusEGlobal::song;
TrackDrummapUpdater::TrackDrummapUpdater()
{
- connect(song,SIGNAL(songChanged(int, int)), this, SLOT(songChanged(int)));
+ connect(song,SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(songChanged(MusECore::SongChangedFlags_t)));
}
-void TrackDrummapUpdater::songChanged(int flags)
+void TrackDrummapUpdater::songChanged(MusECore::SongChangedFlags_t flags)
{
if (flags & (SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_TRACK_MODIFIED |
SC_PART_INSERTED | SC_PART_REMOVED | SC_PART_MODIFIED |
@@ -52,7 +52,7 @@ void TrackDrummapUpdater::songChanged(int flags)
{
// allow recursion. there will be no more recursion, because this
// is only executed when something other than SC_DRUMMAP happens
- song->update(SC_DRUMMAP, 0, true);
+ song->update(SC_DRUMMAP, true);
}
}
diff --git a/muse2/muse/trackdrummapupdater.h b/muse2/muse/trackdrummapupdater.h
index caa2ac28..1070d780 100644
--- a/muse2/muse/trackdrummapupdater.h
+++ b/muse2/muse/trackdrummapupdater.h
@@ -25,6 +25,7 @@
#define __TRACKDRUMMAPUPDATER_H__
#include <QObject>
+#include "type_defs.h"
namespace MusECore {
@@ -36,7 +37,7 @@ class TrackDrummapUpdater : public QObject
TrackDrummapUpdater();
private slots:
- void songChanged(int flags);
+ void songChanged(MusECore::SongChangedFlags_t flags);
};
} //namespace MusECore
diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp
index f88bed1b..051c2a71 100644
--- a/muse2/muse/transport.cpp
+++ b/muse2/muse/transport.cpp
@@ -501,7 +501,7 @@ Transport::Transport(QWidget* parent, const char* name)
connect(tempo, SIGNAL(tempoChanged(int)), MusEGlobal::song, SLOT(setTempo(int)));
connect(tempo, SIGNAL(sigChanged(const AL::TimeSignature&)), SLOT(sigChange(const AL::TimeSignature&)));
connect(MusEGlobal::song, SIGNAL(playChanged(bool)), SLOT(setPlay(bool)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
@@ -722,7 +722,7 @@ void Transport::setCycleMode(int id)
// songChanged
//---------------------------------------------------------
-void Transport::songChanged(int flags)
+void Transport::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/transport.h b/muse2/muse/transport.h
index 50422b66..55e991ef 100644
--- a/muse2/muse/transport.h
+++ b/muse2/muse/transport.h
@@ -24,6 +24,7 @@
#ifndef __TRANSPORT_H__
#define __TRANSPORT_H__
+#include "type_defs.h"
#include "al/sig.h"
#include <QWidget>
@@ -129,7 +130,7 @@ class Transport : public QWidget
void rposChanged(const MusECore::Pos&);
void setRecMode(int);
void setCycleMode(int);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
void syncChanged(bool);
void jackSyncChanged(bool);
void setRecord(bool flag);
diff --git a/muse2/muse/type_defs.h b/muse2/muse/type_defs.h
new file mode 100644
index 00000000..92709c02
--- /dev/null
+++ b/muse2/muse/type_defs.h
@@ -0,0 +1,35 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+//
+// type_defs.h
+// Copyright (C) 2012 Tim E. Real (terminator356 on users dot sourceforge dot net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
+
+#ifndef __TYPE_DEFS_H__
+#define __TYPE_DEFS_H__
+
+#include "stdint.h"
+
+namespace MusECore {
+
+typedef int64_t SongChangedFlags_t;
+
+} // namespace MusECore
+
+#endif
diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp
index 38582d58..45642652 100644
--- a/muse2/muse/undo.cpp
+++ b/muse2/muse/undo.cpp
@@ -217,7 +217,6 @@ void Song::startUndo()
undoList->push_back(Undo());
updateFlags = 0;
- updateFlags2 = 0;
undoMode = true;
}
@@ -225,10 +224,9 @@ void Song::startUndo()
// endUndo
//---------------------------------------------------------
-void Song::endUndo(int flags, int flags2)
+void Song::endUndo(SongChangedFlags_t flags)
{
updateFlags |= flags;
- updateFlags2 |= flags2;
endMsgCmd();
undoMode = false;
}
@@ -399,7 +397,6 @@ void Song::doUndo2()
case UndoOp::ModifySongLen:
_len=i->b;
updateFlags = -1; // set all flags // TODO Refine this! Too many flags. // REMOVE Tim.
- updateFlags2 = -1; // set all flags
break;
case UndoOp::ModifyClip:
case UndoOp::ModifyMarker:
@@ -510,7 +507,6 @@ void Song::doRedo2()
case UndoOp::ModifySongLen:
_len=i->a;
updateFlags = -1; // set all flags // TODO Refine this! Too many flags. // REMOVE Tim.
- updateFlags2 = -1; // set all flags
break;
case UndoOp::ModifyClip:
case UndoOp::ModifyMarker:
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 67c46ad2..e1f18722 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -267,7 +267,7 @@ WaveEdit::WaveEdit(MusECore::PartList* pl)
connect(view, SIGNAL(horizontalScroll(unsigned)),hscroll, SLOT(setPos(unsigned)));
connect(hscroll, SIGNAL(scaleChanged(int)), SLOT(updateHScrollRange()));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged1(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged1(MusECore::SongChangedFlags_t)));
initShortcuts();
@@ -451,7 +451,7 @@ void WaveEdit::readStatus(MusECore::Xml& xml)
// signal from "song"
//---------------------------------------------------------
-void WaveEdit::songChanged1(int bits)
+void WaveEdit::songChanged1(MusECore::SongChangedFlags_t bits)
{
if(_isDeleting) // Ignore while while deleting to prevent crash.
return;
diff --git a/muse2/muse/waveedit/waveedit.h b/muse2/muse/waveedit/waveedit.h
index b2617f49..d52eb986 100644
--- a/muse2/muse/waveedit/waveedit.h
+++ b/muse2/muse/waveedit/waveedit.h
@@ -31,6 +31,7 @@
#include <QCloseEvent>
#include <QByteArray>
+#include "type_defs.h"
#include "midieditor.h"
class QAction;
@@ -80,7 +81,7 @@ class WaveEdit : public MidiEditor {
private slots:
void cmd(int);
void setTime(unsigned t);
- void songChanged1(int);
+ void songChanged1(MusECore::SongChangedFlags_t);
void soloChanged(bool flag);
void moveVerticalSlider(int val);
diff --git a/muse2/muse/waveedit/waveview.cpp b/muse2/muse/waveedit/waveview.cpp
index 1af1d83a..df579a43 100644
--- a/muse2/muse/waveedit/waveview.cpp
+++ b/muse2/muse/waveedit/waveview.cpp
@@ -79,7 +79,7 @@ WaveView::WaveView(MidiEditor* pr, QWidget* parent, int xscale, int yscale)
connect(MusEGlobal::song, SIGNAL(posChanged(int,unsigned,bool)), SLOT(setPos(int,unsigned,bool)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
songChanged(SC_SELECTION);
}
@@ -254,7 +254,7 @@ QString WaveView::getCaption() const
// songChanged
//---------------------------------------------------------
-void WaveView::songChanged(int flags)
+void WaveView::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/waveedit/waveview.h b/muse2/muse/waveedit/waveview.h
index a3fcf9c5..6aa55120 100644
--- a/muse2/muse/waveedit/waveview.h
+++ b/muse2/muse/waveedit/waveview.h
@@ -23,6 +23,7 @@
#ifndef WAVE_VIEW_H
#define WAVE_VIEW_H
+#include "type_defs.h"
#include "view.h"
#include <QWidget>
#include <QMouseEvent>
@@ -105,7 +106,7 @@ class WaveView : public View {
public slots:
void setYScale(int);
- void songChanged(int type);
+ void songChanged(MusECore::SongChangedFlags_t type);
signals:
void followEvent(int);
diff --git a/muse2/muse/widgets/comment.cpp b/muse2/muse/widgets/comment.cpp
index ea08c5b3..bb0ce033 100644
--- a/muse2/muse/widgets/comment.cpp
+++ b/muse2/muse/widgets/comment.cpp
@@ -57,7 +57,7 @@ TrackComment::TrackComment(MusECore::Track* t, QWidget* parent)
setAttribute(Qt::WA_DeleteOnClose);
setWindowTitle(tr("MusE: Track Comment"));
track = t;
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
textentry->setText(track->comment());
textentry->moveCursor(QTextCursor::End);
connect(textentry, SIGNAL(textChanged()), SLOT(textChanged()));
@@ -69,7 +69,7 @@ TrackComment::TrackComment(MusECore::Track* t, QWidget* parent)
// songChanged
//---------------------------------------------------------
-void TrackComment::songChanged(int flags)
+void TrackComment::songChanged(MusECore::SongChangedFlags_t flags)
{
if ((flags & (SC_TRACK_INSERTED|SC_TRACK_REMOVED|SC_TRACK_MODIFIED)) == 0)
return;
diff --git a/muse2/muse/widgets/comment.h b/muse2/muse/widgets/comment.h
index f06757d2..9f71cb47 100644
--- a/muse2/muse/widgets/comment.h
+++ b/muse2/muse/widgets/comment.h
@@ -24,6 +24,7 @@
#define __COMMENT_H__
#include "ui_commentbase.h"
+#include "type_defs.h"
class QWidget;
@@ -66,7 +67,7 @@ class TrackComment : public Comment {
virtual void setText(const QString& s);
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
public:
TrackComment(MusECore::Track*, QWidget*);
diff --git a/muse2/muse/widgets/midisyncimpl.cpp b/muse2/muse/widgets/midisyncimpl.cpp
index 44d3ca04..fb20cff9 100644
--- a/muse2/muse/widgets/midisyncimpl.cpp
+++ b/muse2/muse/widgets/midisyncimpl.cpp
@@ -262,7 +262,7 @@ MidiSyncConfig::MidiSyncConfig(QWidget* parent)
connect(syncDelaySpinBox, SIGNAL(valueChanged(int)), SLOT(syncChanged()));
// Done in show().
- //connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ //connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
//connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
}
@@ -274,7 +274,7 @@ MidiSyncConfig::~MidiSyncConfig()
// songChanged
//---------------------------------------------------------
-void MidiSyncConfig::songChanged(int flags)
+void MidiSyncConfig::songChanged(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it. Otherwise, it's mainly midi port/device changes we want.
if(flags == SC_MIDI_CONTROLLER ||
@@ -578,7 +578,7 @@ void MidiSyncConfig::cancel()
void MidiSyncConfig::show()
{
songChanged(-1);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
QDialog::show();
}
@@ -607,7 +607,7 @@ void MidiSyncConfig::closeEvent(QCloseEvent* e)
}
disconnect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), this, SLOT(heartBeat()));
- disconnect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(songChanged(int)));
+ disconnect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(songChanged(MusECore::SongChangedFlags_t)));
e->accept();
}
diff --git a/muse2/muse/widgets/midisyncimpl.h b/muse2/muse/widgets/midisyncimpl.h
index 9c22b55f..6801b510 100644
--- a/muse2/muse/widgets/midisyncimpl.h
+++ b/muse2/muse/widgets/midisyncimpl.h
@@ -25,6 +25,7 @@
#define __MIDISYNCIMPL_H__
#include "ui_midisync.h"
+#include "type_defs.h"
#include "sync.h"
class QCloseEvent;
@@ -119,7 +120,7 @@ class MidiSyncConfig : public QDialog, public Ui::MidiSyncConfigBase {
void dlvClicked(QTreeWidgetItem*, int);
void dlvDoubleClicked(QTreeWidgetItem*, int);
//void renameOk(QListViewItem*, int, const QString&);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
public:
MidiSyncConfig(QWidget* parent=0);
diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp
index fc28f5d2..1b98f100 100644
--- a/muse2/muse/widgets/mtrackinfo.cpp
+++ b/muse2/muse/widgets/mtrackinfo.cpp
@@ -265,7 +265,7 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, MusECore::Track* sel_track) : QWid
//oRButton->setVisible(false);
connect(oRButton, SIGNAL(pressed()), SLOT(outRoutesPressed()));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
@@ -594,7 +594,7 @@ void MidiTrackInfo::configChanged()
// songChanged
//---------------------------------------------------------
-void MidiTrackInfo::songChanged(int type)
+void MidiTrackInfo::songChanged(MusECore::SongChangedFlags_t type)
{
// Is it simply a midi controller value adjustment? Forget it.
if(type == SC_MIDI_CONTROLLER)
@@ -1368,7 +1368,7 @@ void MidiTrackInfo::iPanDoubleClicked()
// updateTrackInfo
//---------------------------------------------------------
-void MidiTrackInfo::updateTrackInfo(int flags)
+void MidiTrackInfo::updateTrackInfo(MusECore::SongChangedFlags_t flags)
{
// Is it simply a midi controller value adjustment? Forget it.
if(flags == SC_MIDI_CONTROLLER)
diff --git a/muse2/muse/widgets/mtrackinfo.h b/muse2/muse/widgets/mtrackinfo.h
index a38dcf20..fd21f066 100644
--- a/muse2/muse/widgets/mtrackinfo.h
+++ b/muse2/muse/widgets/mtrackinfo.h
@@ -24,6 +24,7 @@
#define __MTRACKINFO_H__
#include "ui_mtrackinfobase.h"
+#include "type_defs.h"
namespace MusECore {
class Track;
@@ -78,7 +79,7 @@ class MidiTrackInfo : public QWidget, public Ui::MidiTrackInfoBase
public slots:
void setTrack(MusECore::Track*);
void configChanged();
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
signals:
void returnPressed();
@@ -89,7 +90,7 @@ class MidiTrackInfo : public QWidget, public Ui::MidiTrackInfoBase
MusECore::Track* track() const { return selected; }
void setLabelText();
void setLabelFont();
- void updateTrackInfo(int);
+ void updateTrackInfo(MusECore::SongChangedFlags_t);
};
} // namespace MusEGui
diff --git a/muse2/muse/widgets/mtscale.cpp b/muse2/muse/widgets/mtscale.cpp
index f0e5ba8d..00947f6f 100644
--- a/muse2/muse/widgets/mtscale.cpp
+++ b/muse2/muse/widgets/mtscale.cpp
@@ -58,7 +58,7 @@ MTScale::MTScale(int* r, QWidget* parent, int xs, bool _mode)
button = Qt::NoButton;
setMouseTracking(true);
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(markerChanged(int)), SLOT(redraw()));
setFixedHeight(28);
@@ -69,7 +69,7 @@ MTScale::MTScale(int* r, QWidget* parent, int xs, bool _mode)
// songChanged
//---------------------------------------------------------
-void MTScale::songChanged(int type)
+void MTScale::songChanged(MusECore::SongChangedFlags_t type)
{
if (type & (SC_SIG|SC_TEMPO)) {
if ((type & SC_TEMPO) && waveMode) {
diff --git a/muse2/muse/widgets/mtscale.h b/muse2/muse/widgets/mtscale.h
index a505c832..4f76dcc2 100644
--- a/muse2/muse/widgets/mtscale.h
+++ b/muse2/muse/widgets/mtscale.h
@@ -23,6 +23,7 @@
#ifndef __MTSCALE_H__
#define __MTSCALE_H__
+#include "type_defs.h"
#include "view.h"
@@ -42,7 +43,7 @@ class MTScale : public View {
bool waveMode;
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
protected:
virtual void pdraw(QPainter&, const QRect&);
diff --git a/muse2/muse/widgets/mtscale_flo.cpp b/muse2/muse/widgets/mtscale_flo.cpp
index 787d9030..9eb0253a 100644
--- a/muse2/muse/widgets/mtscale_flo.cpp
+++ b/muse2/muse/widgets/mtscale_flo.cpp
@@ -51,7 +51,7 @@ MTScaleFlo::MTScaleFlo(ScoreCanvas* parent_editor, QWidget* parent_widget)
button = Qt::NoButton;
setMouseTracking(true);
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(markerChanged(int)), SLOT(redraw()));
parent=parent_editor;
@@ -64,7 +64,7 @@ MTScaleFlo::MTScaleFlo(ScoreCanvas* parent_editor, QWidget* parent_widget)
// songChanged
//---------------------------------------------------------
-void MTScaleFlo::songChanged(int type)
+void MTScaleFlo::songChanged(MusECore::SongChangedFlags_t type)
{
if (type & (SC_SIG|SC_TEMPO))
redraw();
diff --git a/muse2/muse/widgets/mtscale_flo.h b/muse2/muse/widgets/mtscale_flo.h
index 9a0b414e..4b089f5e 100644
--- a/muse2/muse/widgets/mtscale_flo.h
+++ b/muse2/muse/widgets/mtscale_flo.h
@@ -23,6 +23,7 @@
#ifndef __MTSCALE_FLO_H__
#define __MTSCALE_FLO_H__
+#include "type_defs.h"
#include "view.h"
@@ -44,7 +45,7 @@ class MTScaleFlo : public View {
int xoffset;
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
protected:
virtual void draw(QPainter&, const QRect&);
diff --git a/muse2/muse/widgets/routepopup.cpp b/muse2/muse/widgets/routepopup.cpp
index 84b98d79..f3390298 100644
--- a/muse2/muse/widgets/routepopup.cpp
+++ b/muse2/muse/widgets/routepopup.cpp
@@ -737,10 +737,10 @@ RoutePopupMenu::RoutePopupMenu(const QString& title, QWidget* parent, MusECore::
void RoutePopupMenu::init()
{
//printf("RoutePopupMenu::init this:%p\n", this);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
}
-void RoutePopupMenu::songChanged(int val)
+void RoutePopupMenu::songChanged(MusECore::SongChangedFlags_t val)
{
if(val & (SC_ROUTE | SC_CHANNELS | SC_CONFIG))
updateRouteMenus();
diff --git a/muse2/muse/widgets/routepopup.h b/muse2/muse/widgets/routepopup.h
index e4ecde4c..b379842b 100644
--- a/muse2/muse/widgets/routepopup.h
+++ b/muse2/muse/widgets/routepopup.h
@@ -24,6 +24,7 @@
#define __ROUTEPOPUPMENU_H__
//#include <QObject>
+#include "type_defs.h"
#include "popupmenu.h"
namespace MusECore {
@@ -67,7 +68,7 @@ class RoutePopupMenu : public PopupMenu
private slots:
void popupActivated(QAction*);
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
public:
RoutePopupMenu(QWidget* parent = 0, MusECore::Track* track = 0, bool isOutput = false);
diff --git a/muse2/muse/widgets/sig_tempo_toolbar.cpp b/muse2/muse/widgets/sig_tempo_toolbar.cpp
index 22296df2..ecc3ace6 100644
--- a/muse2/muse/widgets/sig_tempo_toolbar.cpp
+++ b/muse2/muse/widgets/sig_tempo_toolbar.cpp
@@ -46,7 +46,7 @@ namespace MusEGui
layout->addWidget(label);
layout->addWidget(tempo_edit);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(song_changed(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(song_changed(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), this, SLOT(pos_changed(int,unsigned,bool)));
connect(tempo_edit, SIGNAL(tempoChanged(double)), MusEGlobal::song, SLOT(setTempo(double)));
@@ -61,7 +61,7 @@ namespace MusEGui
song_changed(SC_TEMPO);
}
- void TempoToolbarWidget::song_changed(int type)
+ void TempoToolbarWidget::song_changed(MusECore::SongChangedFlags_t type)
{
if (type & SC_TEMPO)
{
@@ -92,7 +92,7 @@ namespace MusEGui
layout->addWidget(label);
layout->addWidget(sig_edit);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(song_changed(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(song_changed(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), this, SLOT(pos_changed(int,unsigned,bool)));
connect(sig_edit, SIGNAL(valueChanged(const AL::TimeSignature&)), MusEGlobal::song, SLOT(setSig(const AL::TimeSignature&)));
@@ -107,7 +107,7 @@ namespace MusEGui
song_changed(SC_SIG);
}
- void SigToolbarWidget::song_changed(int type)
+ void SigToolbarWidget::song_changed(MusECore::SongChangedFlags_t type)
{
if (type & SC_SIG)
{
diff --git a/muse2/muse/widgets/sig_tempo_toolbar.h b/muse2/muse/widgets/sig_tempo_toolbar.h
index b3fd2088..51271d30 100644
--- a/muse2/muse/widgets/sig_tempo_toolbar.h
+++ b/muse2/muse/widgets/sig_tempo_toolbar.h
@@ -24,6 +24,7 @@
#define __SIG_TEMPO_TOOLBAR_H__
#include <QWidget>
+#include "type_defs.h"
namespace Awl
{
@@ -55,7 +56,7 @@ namespace MusEGui
private slots:
void pos_changed(int,unsigned,bool);
- void song_changed(int);
+ void song_changed(MusECore::SongChangedFlags_t);
};
class TempoToolbarWidget : public QWidget
@@ -76,7 +77,7 @@ namespace MusEGui
private slots:
void pos_changed(int,unsigned,bool);
- void song_changed(int);
+ void song_changed(MusECore::SongChangedFlags_t);
};
}
diff --git a/muse2/muse/widgets/songpos_toolbar.cpp b/muse2/muse/widgets/songpos_toolbar.cpp
index ef87f378..ff52a4ad 100644
--- a/muse2/muse/widgets/songpos_toolbar.cpp
+++ b/muse2/muse/widgets/songpos_toolbar.cpp
@@ -33,12 +33,14 @@ namespace MusEGui
{
_raster=0;
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), this, SLOT(song_changed(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), this, SLOT(song_changed(MusECore::SongChangedFlags_t)));
song_changed(0);
}
- void SongPosToolbarWidget::song_changed(int)
+ void SongPosToolbarWidget::song_changed(MusECore::SongChangedFlags_t flags)
{
+ if(flags & SC_MIDI_CONTROLLER) // TODO: Filter more stuff out
+ return;
if (width()!=0)
setXMag(-(MusEGlobal::song->len()/width()));
}
diff --git a/muse2/muse/widgets/songpos_toolbar.h b/muse2/muse/widgets/songpos_toolbar.h
index 063b2ffd..02f0501c 100644
--- a/muse2/muse/widgets/songpos_toolbar.h
+++ b/muse2/muse/widgets/songpos_toolbar.h
@@ -23,6 +23,7 @@
#ifndef __SONGPOS_TOOLBAR_H__
#define __SONGPOS_TOOLBAR_H__
+#include "type_defs.h"
#include "mtscale.h"
namespace MusEGui
@@ -43,7 +44,7 @@ namespace MusEGui
virtual void resizeEvent(QResizeEvent*);
private slots:
- void song_changed(int);
+ void song_changed(MusECore::SongChangedFlags_t);
};
}
diff --git a/muse2/muse/widgets/wtscale.cpp b/muse2/muse/widgets/wtscale.cpp
index b41e7b83..bf5106b2 100644
--- a/muse2/muse/widgets/wtscale.cpp
+++ b/muse2/muse/widgets/wtscale.cpp
@@ -54,7 +54,7 @@ WTScale::WTScale(int* r, QWidget* parent, int xs)
button = Qt::NoButton;
setMouseTracking(true);
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool)));
- connect(MusEGlobal::song, SIGNAL(songChanged(int, int)), SLOT(songChanged(int)));
+ connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(markerChanged(int)), SLOT(redraw()));
setFixedHeight(28);
setBg(QColor(0xe0, 0xe0, 0xe0));
@@ -64,7 +64,7 @@ WTScale::WTScale(int* r, QWidget* parent, int xs)
// songChanged
//---------------------------------------------------------
-void WTScale::songChanged(int /*type*/)
+void WTScale::songChanged(MusECore::SongChangedFlags_t /*type*/)
{
}
diff --git a/muse2/muse/widgets/wtscale.h b/muse2/muse/widgets/wtscale.h
index 1999a91f..989daf29 100644
--- a/muse2/muse/widgets/wtscale.h
+++ b/muse2/muse/widgets/wtscale.h
@@ -23,6 +23,7 @@
#ifndef __MTSCALE_H__
#define __MTSCALE_H__
+#include "type_defs.h"
#include "view.h"
namespace MusEGui {
@@ -40,7 +41,7 @@ class WTScale : public View {
bool barLocator;
private slots:
- void songChanged(int);
+ void songChanged(MusECore::SongChangedFlags_t);
protected:
virtual void pdraw(QPainter&, const QRect&);