summaryrefslogtreecommitdiff
path: root/muse2/muse/master
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2011-09-08 02:05:32 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2011-09-08 02:05:32 +0000
commitd3e8a1b4c98cb3ba8b73f367ea88ad23f8dbca66 (patch)
tree921e5193e46287f0c34f4eff1590efb1df18d20f /muse2/muse/master
parentff0c5e9154e7a3d71d2465639b5e0da1ea2c7242 (diff)
introducing namespaces
Diffstat (limited to 'muse2/muse/master')
-rw-r--r--muse2/muse/master/lmaster.cpp10
-rw-r--r--muse2/muse/master/master.cpp14
-rw-r--r--muse2/muse/master/master.h2
-rw-r--r--muse2/muse/master/masteredit.cpp4
-rw-r--r--muse2/muse/master/tscale.cpp8
5 files changed, 19 insertions, 19 deletions
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index dc98df42..46d1d446 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -158,7 +158,7 @@ LMaster::LMaster()
//---------Pulldown Menu----------------------------
menuEdit = menuBar()->addMenu(tr("&Edit"));
QSignalMapper *signalMapper = new QSignalMapper(this);
- menuEdit->addActions(undoRedo->actions());
+ menuEdit->addActions(MusEGlobal::undoRedo->actions());
menuEdit->addSeparator();
tempoAction = menuEdit->addAction(tr("Insert Tempo"));
signAction = menuEdit->addAction(tr("Insert Signature"));
@@ -186,7 +186,7 @@ LMaster::LMaster()
//---------ToolBar----------------------------------
tools = addToolBar(tr("Master tools"));
- tools->addActions(undoRedo->actions());
+ tools->addActions(MusEGlobal::undoRedo->actions());
QToolBar* edit = addToolBar(tr("Edit tools"));
QToolButton* tempoButton = new QToolButton();
@@ -802,7 +802,7 @@ LMasterKeyEventItem::LMasterKeyEventItem(QTreeWidget* parent, const KeyEvent& ev
AL::sigmap.tickValues(t, &bar, &beat, &tick);
c1.sprintf("%04d.%02d.%03d", bar+1, beat+1, tick);
- double time = double(tempomap.tick2frame(t)) / double(sampleRate);
+ double time = double(tempomap.tick2frame(t)) / double(MusEGlobal::sampleRate);
int min = int(time) / 60;
int sec = int(time) % 60;
int msec = int((time - (min*60 + sec)) * 1000.0);
@@ -833,7 +833,7 @@ LMasterTempoItem::LMasterTempoItem(QTreeWidget* parent, const TEvent* ev)
AL::sigmap.tickValues(t, &bar, &beat, &tick);
c1.sprintf("%04d.%02d.%03d", bar+1, beat+1, tick);
- double time = double(tempomap.tick2frame(t) /*ev->frame*/) / double(sampleRate);
+ double time = double(tempomap.tick2frame(t) /*ev->frame*/) / double(MusEGlobal::sampleRate);
int min = int(time) / 60;
int sec = int(time) % 60;
int msec = int((time - (min*60 + sec)) * 1000.0);
@@ -861,7 +861,7 @@ LMasterSigEventItem::LMasterSigEventItem(QTreeWidget* parent, const AL::SigEvent
AL::sigmap.tickValues(t, &bar, &beat, &tick);
c1.sprintf("%04d.%02d.%03d", bar+1, beat+1, tick);
- double time = double(tempomap.tick2frame(t)) / double (sampleRate);
+ double time = double(tempomap.tick2frame(t)) / double (MusEGlobal::sampleRate);
int min = int(time) / 60;
int sec = int(time) % 60;
int msec = int((time - (min*60 + sec)) * 1000.0);
diff --git a/muse2/muse/master/master.cpp b/muse2/muse/master/master.cpp
index 284692a4..e9212be9 100644
--- a/muse2/muse/master/master.cpp
+++ b/muse2/muse/master/master.cpp
@@ -206,21 +206,21 @@ void Master::draw(QPainter& p, const QRect& rect)
void Master::viewMousePressEvent(QMouseEvent* event)
{
start = event->pos();
- Tool activeTool = tool;
+ MusEWidget::Tool activeTool = tool;
// bool shift = event->state() & ShiftButton;
switch (activeTool) {
- case PointerTool:
+ case MusEWidget::PointerTool:
drag = DRAG_LASSO_START;
break;
- case PencilTool:
+ case MusEWidget::PencilTool:
drag = DRAG_NEW;
song->startUndo();
newVal(start.x(), start.x(), start.y());
break;
- case RubberTool:
+ case MusEWidget::RubberTool:
drag = DRAG_DELETE;
song->startUndo();
deleteVal(start.x(), start.x());
@@ -317,11 +317,11 @@ void Master::deleteVal(int x1, int x2)
void Master::setTool(int t)
{
- if (tool == Tool(t))
+ if (tool == MusEWidget::Tool(t))
return;
- tool = Tool(t);
+ tool = MusEWidget::Tool(t);
switch(tool) {
- case PencilTool:
+ case MusEWidget::PencilTool:
setCursor(QCursor(*pencilIcon, 4, 15));
break;
default:
diff --git a/muse2/muse/master/master.h b/muse2/muse/master/master.h
index 796c0e46..9cdbf6cc 100644
--- a/muse2/muse/master/master.h
+++ b/muse2/muse/master/master.h
@@ -49,7 +49,7 @@ class Master : public View {
ScrollScale* vscroll;
unsigned pos[3];
QPoint start;
- Tool tool;
+ MusEWidget::Tool tool;
DragMode drag;
MidiEditor* editor;
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index beb7090e..3e400399 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -115,9 +115,9 @@ MasterEdit::MasterEdit()
tools = addToolBar(tr("Master tools"));
tools->setObjectName("Master tools");
- tools->addActions(undoRedo->actions());
+ tools->addActions(MusEGlobal::undoRedo->actions());
- EditToolBar* tools2 = new EditToolBar(this, PointerTool | PencilTool | RubberTool);
+ MusEWidget::EditToolBar* tools2 = new MusEWidget::EditToolBar(this, MusEWidget::PointerTool | MusEWidget::PencilTool | MusEWidget::RubberTool);
addToolBar(tools2);
QToolBar* enableMaster = addToolBar(tr("Enable master"));
diff --git a/muse2/muse/master/tscale.cpp b/muse2/muse/master/tscale.cpp
index b1a33970..e25c3454 100644
--- a/muse2/muse/master/tscale.cpp
+++ b/muse2/muse/master/tscale.cpp
@@ -35,8 +35,8 @@
TScale::TScale(QWidget* parent, int ymag)
: View(parent, 1, ymag)
{
- setFont(config.fonts[4]);
- //int w = 4 * QFontMetrics(config.fonts[4]).width('0');
+ setFont(MusEConfig::config.fonts[4]);
+ //int w = 4 * QFontMetrics(MusEConfig::config.fonts[4]).width('0');
int w = 4 * fontMetrics().width('0');
setFixedWidth(w);
setMouseTracking(true);
@@ -50,7 +50,7 @@ void TScale::pdraw(QPainter& p, const QRect& r)
{
int y = r.y();
int h = r.height();
- //p.setFont(config.fonts[4]);
+ //p.setFont(MusEConfig::config.fonts[4]);
QString s;
for (int i = 30000; i <= 250000; i += 10000) {
int yy = mapy(280000 - i);
@@ -60,7 +60,7 @@ void TScale::pdraw(QPainter& p, const QRect& r)
continue;
p.drawLine(0, yy, width(), yy);
s.setNum(i/1000);
- //QFontMetrics fm(config.fonts[4]);
+ //QFontMetrics fm(MusEConfig::config.fonts[4]);
//p.drawText(width() - fm.width(s) - 1, yy-2, s);
p.drawText(width() - fontMetrics().width(s) - 1, yy-2, s); // Use the window font. Tim p4.0.31
}