summaryrefslogtreecommitdiff
path: root/attic/muse2-oom/muse2/muse/master/tscale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'attic/muse2-oom/muse2/muse/master/tscale.cpp')
-rw-r--r--attic/muse2-oom/muse2/muse/master/tscale.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/attic/muse2-oom/muse2/muse/master/tscale.cpp b/attic/muse2-oom/muse2/muse/master/tscale.cpp
deleted file mode 100644
index d37d5924..00000000
--- a/attic/muse2-oom/muse2/muse/master/tscale.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//=========================================================
-// MusE
-// Linux Music Editor
-// $Id: tscale.cpp,v 1.2 2003/12/17 11:04:14 wschweer Exp $
-// (C) Copyright 1999 Werner Schweer (ws@seh.de)
-//=========================================================
-
-#include <stdio.h>
-#include "tscale.h"
-#include "globals.h"
-#include "gconfig.h"
-
-#include <QMouseEvent>
-#include <QPainter>
-
-//---------------------------------------------------------
-// TScale
-//---------------------------------------------------------
-
-TScale::TScale(QWidget* parent, int ymag)
- : View(parent, 1, ymag)
- {
- setFont(config.fonts[3]);
- int w = 4 * QFontMetrics(config.fonts[4]).width('0');
- setFixedWidth(w);
- setMouseTracking(true);
- }
-
-//---------------------------------------------------------
-// draw
-//---------------------------------------------------------
-
-void TScale::pdraw(QPainter& p, const QRect& r)
- {
- int y = r.y();
- int h = r.height();
- p.setFont(config.fonts[4]);
- QString s;
- for (int i = 30000; i <= 250000; i += 10000) {
- int yy = mapy(280000 - i);
- if (yy < y)
- break;
- if (yy-15 > y+h)
- continue;
- p.drawLine(0, yy, width(), yy);
- s.setNum(i/1000);
- QFontMetrics fm(config.fonts[4]);
- p.drawText(width() - fm.width(s) - 1, yy-2, s);
- }
- }
-
-void TScale::viewMouseMoveEvent(QMouseEvent* event)
- {
- emit tempoChanged(280000 - event->y());
- }
-
-void TScale::leaveEvent(QEvent*)
- {
- emit tempoChanged(-1);
- }
-