diff options
author | Florian Jung <flo@windfisch.org> | 2012-03-15 18:21:23 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-03-15 18:21:23 +0000 |
commit | 27b7bf6815cda7abb67026c37b3e44daee1803cb (patch) | |
tree | 0b9d1c0bc84ac7ff8032e707f2b5fb4e0aaabb5c /muse2/muse/transport.cpp | |
parent | 2d6f113a10eb485694e20a78500f650776d701e3 (diff) |
merged with trunk
Diffstat (limited to 'muse2/muse/transport.cpp')
-rw-r--r-- | muse2/muse/transport.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp index 96ca599d..aa0036e5 100644 --- a/muse2/muse/transport.cpp +++ b/muse2/muse/transport.cpp @@ -37,11 +37,11 @@ #include "siglabel.h" #include "globals.h" #include "icons.h" -///#include "posedit.h" #include "sync.h" #include "shortcuts.h" #include "gconfig.h" #include "app.h" +#include "audio.h" namespace MusEGui { @@ -76,8 +76,7 @@ static QToolButton* newButton(const QPixmap* pm, const QString& tt, //--------------------------------------------------------- // Handle -// erlaubt das Verschieben eines Root-Windows mit der -// Maus +// allows moving a root-window with the mouse //--------------------------------------------------------- Handle::Handle(QWidget* r, QWidget* parent) @@ -114,7 +113,7 @@ void Handle::mousePressEvent(QMouseEvent* ev) //--------------------------------------------------------- // TempoSig -// Widget f�r Tempo + Signature +// Widget for Tempo + Signature //--------------------------------------------------------- TempoSig::TempoSig(QWidget* parent) @@ -228,10 +227,6 @@ void Transport::setRecord(bool flag) //--------------------------------------------------------- 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, 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); @@ -326,7 +321,6 @@ Transport::Transport(QWidget* parent, const char* name) marken->setSpacing(0); marken->setContentsMargins(0, 0, 0, 0); - ///tl1 = new PosEdit(0); tl1 = new Awl::PosEdit(0); tl1->setMinimumSize(105,0); tl1->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); @@ -339,7 +333,6 @@ Transport::Transport(QWidget* parent, const char* name) l5->setAlignment(Qt::AlignCenter); marken->addWidget(l5); - ///tl2 = new PosEdit(0); tl2 = new Awl::PosEdit(0); tl2->setMinimumSize(105,0); tl2->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); @@ -364,9 +357,7 @@ Transport::Transport(QWidget* parent, const char* name) QHBoxLayout *hbox1 = new QHBoxLayout; hbox1->setContentsMargins(0, 0, 0, 0); - ///time1 = new PosEdit(0); time1 = new Awl::PosEdit(0); - ///time2 = new PosEdit(0); time2 = new Awl::PosEdit(0); time2->setSmpte(true); time1->setMinimumSize(105,0); @@ -508,8 +499,7 @@ Transport::Transport(QWidget* parent, const char* name) connect(slider,SIGNAL(valueChanged(int)), SLOT(cposChanged(int))); connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool))); connect(tempo, SIGNAL(tempoChanged(int)), MusEGlobal::song, SLOT(setTempo(int))); - ///connect(tempo, SIGNAL(sigChanged(int, int)), MusEGlobal::song, SLOT(setSig(int, int))); - connect(tempo, SIGNAL(sigChanged(const AL::TimeSignature&)), MusEGlobal::song, SLOT(setSig(const AL::TimeSignature&))); + 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)), this, SLOT(songChanged(int))); connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged())); @@ -801,5 +791,11 @@ void Transport::playToggled(bool val) buttons[4]->blockSignals(false); } } + +void Transport::sigChange(const AL::TimeSignature& sig) +{ + MusEGlobal::audio->msgAddSig(MusEGlobal::song->cPos().tick(), sig.z, sig.n); // Add will replace if found. +} + } // namespace MusEGui |