diff options
Diffstat (limited to 'muse2/awl')
-rw-r--r-- | muse2/awl/floatentry.cpp | 2 | ||||
-rw-r--r-- | muse2/awl/pitchedit.cpp | 4 | ||||
-rw-r--r-- | muse2/awl/posedit.cpp | 22 | ||||
-rw-r--r-- | muse2/awl/posedit.h | 8 | ||||
-rw-r--r-- | muse2/awl/tcanvas.cpp | 2 |
5 files changed, 21 insertions, 17 deletions
diff --git a/muse2/awl/floatentry.cpp b/muse2/awl/floatentry.cpp index 573420df..9b4b3e99 100644 --- a/muse2/awl/floatentry.cpp +++ b/muse2/awl/floatentry.cpp @@ -220,7 +220,7 @@ void FloatEntry::repeat() switch (button) { case Qt::LeftButton: - if (!MusEConfig::config.leftMouseButtonCanDecrease) + if (!MusEGlobal::config.leftMouseButtonCanDecrease) return; // else fall through case Qt::MidButton: diff --git a/muse2/awl/pitchedit.cpp b/muse2/awl/pitchedit.cpp index e0ede87b..3d9f1037 100644 --- a/muse2/awl/pitchedit.cpp +++ b/muse2/awl/pitchedit.cpp @@ -27,7 +27,9 @@ #include <QKeyEvent> +namespace MusEGlobal { extern QObject* song; // TODO FINDME this is a really dirty hack! +} namespace Awl { @@ -40,7 +42,7 @@ PitchEdit::PitchEdit(QWidget* parent) { setRange(0, 127); deltaMode = false; - connect(song, SIGNAL(midiNote(int, int)), SLOT(midiNote(int,int))); + connect(MusEGlobal::song, SIGNAL(midiNote(int, int)), SLOT(midiNote(int,int))); } //--------------------------------------------------------- diff --git a/muse2/awl/posedit.cpp b/muse2/awl/posedit.cpp index 5666f39f..049b59bd 100644 --- a/muse2/awl/posedit.cpp +++ b/muse2/awl/posedit.cpp @@ -32,7 +32,9 @@ #include <QLineEdit> #include <QStyle> +namespace MusEGlobal { extern int mtcType; +} namespace Awl { @@ -217,7 +219,7 @@ void PosEdit::setSmpte(bool f) // setValue //--------------------------------------------------------- -void PosEdit::setValue(const Pos& time) +void PosEdit::setValue(const MusECore::Pos& time) { if(_pos == time) return; @@ -227,13 +229,13 @@ void PosEdit::setValue(const Pos& time) void PosEdit::setValue(const QString& s) { - Pos time(s); + MusECore::Pos time(s); setValue(time); } void PosEdit::setValue(int t) { - Pos time(t); + MusECore::Pos time(t); setValue(time); } @@ -287,7 +289,7 @@ QAbstractSpinBox::StepEnabled PosEdit::stepEnabled() const else { int nf = 23; // 24 frames sec - switch(mtcType) { + switch(MusEGlobal::mtcType) { //case 0: // 24 frames sec // nf = 23; // break; @@ -398,7 +400,7 @@ QValidator::State PosEdit::validate(QString& s,int& /*i*/) const rv = state; int nf = 23; // 24 frames sec - switch(mtcType) { + switch(MusEGlobal::mtcType) { //case 0: // 24 frames sec // nf = 23; // break; @@ -541,7 +543,7 @@ void PosEdit::stepBy(int steps) case 2: { int nf = 23; // 24 frames sec - switch(mtcType) { + switch(MusEGlobal::mtcType) { //case 0: // 24 frames sec // nf = 23; // break; @@ -578,7 +580,7 @@ void PosEdit::stepBy(int steps) default: return; } - Pos newPos(minute, sec, frame, subframe); + MusECore::Pos newPos(minute, sec, frame, subframe); if (!(newPos == _pos)) { changed = true; _pos = newPos; @@ -623,7 +625,7 @@ void PosEdit::stepBy(int steps) default: return; } - Pos newPos(bar, beat, tick); + MusECore::Pos newPos(bar, beat, tick); if (!(newPos == _pos)) { changed = true; _pos = newPos; @@ -666,7 +668,7 @@ void PosEdit::finishEdit() return; } - Pos newPos(sl[0].toInt(), sl[1].toInt(), sl[2].toInt(), sl[3].toInt()); + MusECore::Pos newPos(sl[0].toInt(), sl[1].toInt(), sl[2].toInt(), sl[3].toInt()); if (!(newPos == _pos)) { changed = true; @@ -681,7 +683,7 @@ void PosEdit::finishEdit() return; } - Pos newPos(sl[0].toInt() - 1, sl[1].toInt() - 1, sl[2].toInt()); + MusECore::Pos newPos(sl[0].toInt() - 1, sl[1].toInt() - 1, sl[2].toInt()); if (!(newPos == _pos)) { changed = true; diff --git a/muse2/awl/posedit.h b/muse2/awl/posedit.h index 2da74d41..29692124 100644 --- a/muse2/awl/posedit.h +++ b/muse2/awl/posedit.h @@ -42,7 +42,7 @@ class PosEdit : public QAbstractSpinBox Q_PROPERTY(bool smpte READ smpte WRITE setSmpte) bool _smpte; - Pos _pos; + MusECore::Pos _pos; bool initialized; QIntValidator* validator; @@ -58,7 +58,7 @@ class PosEdit : public QAbstractSpinBox void finishEdit(); signals: - void valueChanged(const Pos&); + void valueChanged(const MusECore::Pos&); // Choose these three carefully, watch out for focusing recursion. void returnPressed(); @@ -67,7 +67,7 @@ class PosEdit : public QAbstractSpinBox void editingFinished(); public slots: - void setValue(const Pos& time); + void setValue(const MusECore::Pos& time); void setValue(int t); void setValue(const QString& s); @@ -76,7 +76,7 @@ class PosEdit : public QAbstractSpinBox ~PosEdit(); QSize sizeHint() const; - Pos pos() const { return _pos; } + MusECore::Pos pos() const { return _pos; } void setSmpte(bool); bool smpte() const { return _smpte; } // void* operator new(size_t); // What was this for? Tim. diff --git a/muse2/awl/tcanvas.cpp b/muse2/awl/tcanvas.cpp index d39080e2..70fe909f 100644 --- a/muse2/awl/tcanvas.cpp +++ b/muse2/awl/tcanvas.cpp @@ -300,7 +300,7 @@ bool TimeCanvas::eventFilter(QObject* obj, QEvent* event) //else if (b & Qt::RightButton) // i = 2; else if (b & Qt::RightButton) { - if ((MusEConfig::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier)) + if ((MusEGlobal::config.rangeMarkerWithoutMMB) && (event->modifiers() & Qt::ControlModifier)) i = 1; else i = 2; |