diff options
author | Tim E. Real <termtech@rogers.com> | 2010-12-09 07:41:47 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-12-09 07:41:47 +0000 |
commit | 703f47458a859c9559c13038246dd37529eba6ff (patch) | |
tree | e0676d3c7aff9362683c06fed8416d191ae13542 /muse2/muse | |
parent | d184da8dfd7cf98f0e6fcd468cb4c8a4bde55177 (diff) |
Made MusE the owner of transport object. Improved PosEdit class.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/app.cpp | 7 | ||||
-rw-r--r-- | muse2/muse/app.h | 1 | ||||
-rw-r--r-- | muse2/muse/master/lmaster.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/osc.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/transport.cpp | 19 | ||||
-rw-r--r-- | muse2/muse/transport.h | 1 |
6 files changed, 28 insertions, 6 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 81f313ea..67adbb23 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1630,6 +1630,13 @@ MusE::MusE(int argc, char** argv) : QMainWindow() song->update(); } +MusE::~MusE() +{ + //printf("MusE::~MusE\n"); + //if(transport) + // delete transport; +} + //--------------------------------------------------------- // setHeartBeat //--------------------------------------------------------- diff --git a/muse2/muse/app.h b/muse2/muse/app.h index c8348af3..39ee7eb4 100644 --- a/muse2/muse/app.h +++ b/muse2/muse/app.h @@ -334,6 +334,7 @@ class MusE : public QMainWindow public: MusE(int argc, char** argv); + ~MusE(); Arranger* arranger; QRect configGeometryMain; bool importMidi(const QString name, bool merge); diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp index cb969428..c9a94167 100644 --- a/muse2/muse/master/lmaster.cpp +++ b/muse2/muse/master/lmaster.cpp @@ -430,6 +430,7 @@ void LMaster::itemDoubleClicked(QTreeWidgetItem* i) // returnPressed() //! called when editor is closed //--------------------------------------------------------- + void LMaster::returnPressed() { if (!editedItem) @@ -556,6 +557,7 @@ void LMaster::returnPressed() editedItem = 0; editorColumn = -1; editingNewItem = false; + } diff --git a/muse2/muse/osc.cpp b/muse2/muse/osc.cpp index 91a3a0ee..0cfb0c23 100644 --- a/muse2/muse/osc.cpp +++ b/muse2/muse/osc.cpp @@ -243,7 +243,9 @@ int oscMessageHandler(const char* path, const char* types, lo_arg** argv, #endif //const char* sub = strstr(p, instance->name().toLatin1().constData()); - const char* sub = strstr(p, instance->label().toLatin1().constData()); + ///const char* sub = strstr(p, instance->label().toLatin1().constData()); + QByteArray ba = instance->label().toLatin1(); + const char* sub = strstr(p, ba.constData()); if(sub == NULL) continue; diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp index 36b0486d..0e2a33e0 100644 --- a/muse2/muse/transport.cpp +++ b/muse2/muse/transport.cpp @@ -220,11 +220,12 @@ void Transport::setRecord(bool flag) // Transport //--------------------------------------------------------- -Transport::Transport(QWidget*, const char* name) +Transport::Transport(QWidget* parent, const char* name) // : QWidget(0, name, WStyle_Customize | WType_TopLevel | WStyle_Tool //| WStyle_NoBorder | WStyle_StaysOnTop) //: QWidget(0, name, Qt::WStyle_Customize | Qt::Window | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop) - : QWidget(0, Qt::Window | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint ) // Possibly also Qt::X11BypassWindowManagerHint + //: QWidget(0, name, Qt::Window | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint ) // Possibly also Qt::X11BypassWindowManagerHint + : QWidget(parent, Qt::Window | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint ) // Possibly also Qt::X11BypassWindowManagerHint { setObjectName(name); setWindowTitle(QString("Muse: Transport")); @@ -500,6 +501,11 @@ Transport::Transport(QWidget*, const char* name) hbox->addWidget(righthandle); } +Transport::~Transport() +{ + //printf("Transport::~Transport\n"); +} + //--------------------------------------------------------- // configChanged //--------------------------------------------------------- @@ -561,9 +567,12 @@ void Transport::setPos(int idx, unsigned v, bool) case 0: time1->setValue(v); time2->setValue(v); - slider->blockSignals(true); - slider->setValue(v); - slider->blockSignals(false); + if(slider->value() != v) + { + slider->blockSignals(true); + slider->setValue(v); + slider->blockSignals(false); + } if (song->masterFlag()) setTempo(tempomap.tempo(v)); { diff --git a/muse2/muse/transport.h b/muse2/muse/transport.h index d9932bac..be352dfa 100644 --- a/muse2/muse/transport.h +++ b/muse2/muse/transport.h @@ -129,6 +129,7 @@ class Transport : public QWidget public: Transport(QWidget* parent, const char* name = 0); + ~Transport(); QColor getHandleColor() const { return lefthandle->palette().color(QPalette::Window); } }; #endif |