summaryrefslogtreecommitdiff
path: root/muse2/awl
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/awl')
-rw-r--r--muse2/awl/CMakeLists.txt6
-rw-r--r--muse2/awl/posedit.cpp10
-rw-r--r--muse2/awl/posedit.h5
-rw-r--r--muse2/awl/sigedit.cpp9
-rw-r--r--muse2/awl/sigedit.h2
5 files changed, 26 insertions, 6 deletions
diff --git a/muse2/awl/CMakeLists.txt b/muse2/awl/CMakeLists.txt
index 9045e028..7e36ba87 100644
--- a/muse2/awl/CMakeLists.txt
+++ b/muse2/awl/CMakeLists.txt
@@ -4,7 +4,7 @@
# $Id:$
#
# Copyright (C) 2002-2006 by Werner Schweer and others
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.
#
@@ -36,11 +36,11 @@ set(mocs
aslider knob panknob slider volknob volslider floatentry
volentry panentry midivolentry midipanentry midipanknob
mslider midimslider midimeter combobox checkbox
- # posedit
+ posedit
pitchedit
# poslabel
pitchlabel tempolabel
- # sigedit
+ sigedit
# tcanvas
tempoedit drawbar
)
diff --git a/muse2/awl/posedit.cpp b/muse2/awl/posedit.cpp
index 4f8b19b2..51cea634 100644
--- a/muse2/awl/posedit.cpp
+++ b/muse2/awl/posedit.cpp
@@ -22,10 +22,13 @@
#include "awl.h"
#include "posedit.h"
#include "al/sig.h"
+//#include "sig.h"
+
+//#include "sync.h" // Tim.
namespace Awl {
- using AL::mtcType;
+ ///using AL::mtcType;
using AL::sigmap;
//---------------------------------------------------------
@@ -239,8 +242,11 @@ QAbstractSpinBox::StepEnabled PosEdit::stepEnabled() const
int bar, beat;
unsigned tick;
AL::sigmap.tickValues(_pos.tick(), &bar, &beat, &tick);
+ //sigmap.tickValues(_pos.tick(), &bar, &beat, &tick);
unsigned tb = AL::sigmap.ticksBeat(_pos.tick());
+ //unsigned tb = sigmap.ticksBeat(_pos.tick());
unsigned tm = AL::sigmap.ticksMeasure(_pos.tick());
+ //unsigned tm = sigmap.ticksMeasure(_pos.tick());
int bm = tm / tb;
switch (segment) {
@@ -386,7 +392,9 @@ void PosEdit::stepBy(int steps)
_pos.mbt(&bar, &beat, &tick);
int tb = AL::sigmap.ticksBeat(_pos.tick());
+ //int tb = sigmap.ticksBeat(_pos.tick());
unsigned tm = AL::sigmap.ticksMeasure(_pos.tick());
+ //unsigned tm = sigmap.ticksMeasure(_pos.tick());
int bm = tm / tb;
switch(segment) {
diff --git a/muse2/awl/posedit.h b/muse2/awl/posedit.h
index effa0537..314b2b9d 100644
--- a/muse2/awl/posedit.h
+++ b/muse2/awl/posedit.h
@@ -21,11 +21,12 @@
#ifndef __POSEDIT_H__
#define __POSEDIT_H__
-#include "al/pos.h"
+///#include "al/pos.h"
+#include "pos.h"
namespace Awl {
- using AL::Pos;
+ ///using AL::Pos;
//---------------------------------------------------------
// PosEdit
diff --git a/muse2/awl/sigedit.cpp b/muse2/awl/sigedit.cpp
index 6493ad6c..193a9bd7 100644
--- a/muse2/awl/sigedit.cpp
+++ b/muse2/awl/sigedit.cpp
@@ -22,6 +22,7 @@
#include "awl.h"
#include "sigedit.h"
#include "al/sig.h"
+//#include "sig.h"
namespace Awl {
@@ -99,6 +100,14 @@ void SigEdit::setValue(const AL::TimeSignature& s)
updateValue();
}
+void SigEdit::setValue(const QString& s)
+ {
+ int z = 4, n = 4;
+ sscanf(s.latin1(), "%d/%d", &z, &n);
+ AL::TimeSignature sig(z, n);
+ setValue(sig);
+ }
+
//---------------------------------------------------------
// updateValue
//---------------------------------------------------------
diff --git a/muse2/awl/sigedit.h b/muse2/awl/sigedit.h
index 35e762ca..35cb0f12 100644
--- a/muse2/awl/sigedit.h
+++ b/muse2/awl/sigedit.h
@@ -22,6 +22,7 @@
#define __SIGEDIT_H__
#include "al/sig.h"
+//#include "sig.h"
namespace AL {
class TimeSignature;
@@ -54,6 +55,7 @@ class SigEdit : public QAbstractSpinBox
public slots:
void setValue(const AL::TimeSignature&);
+ void setValue(const QString& s);
public:
SigEdit(QWidget* parent = 0);