diff options
-rw-r--r-- | dgedit/Makefile.am | 4 | ||||
-rw-r--r-- | dgedit/canvas.cc | 4 | ||||
-rw-r--r-- | dgedit/canvastoolselections.cc | 1 | ||||
-rw-r--r-- | dgedit/canvastoolthreshold.cc | 2 |
4 files changed, 8 insertions, 3 deletions
diff --git a/dgedit/Makefile.am b/dgedit/Makefile.am index 01187f1..6f6f23f 100644 --- a/dgedit/Makefile.am +++ b/dgedit/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = dgedit -dgedit_LDADD = $(SNDFILE_LIBS) $(QT_LIBS) $(shell ../tools/MocList o ) +dgedit_LDADD = $(SNDFILE_LIBS) $(QT_LIBS) $(shell ../tools/MocList o ) -lao dgedit_CXXFLAGS = $(SNDFILE_CXXFLAGS) $(QT_CFLAGS) AM_CXXFLAGS = $(QT_CFLAGS) @@ -10,6 +10,7 @@ dgedit_SOURCES = $(shell ../tools/MocList cc ) \ audioextractor.cc \ canvas.cc \ canvastool.cc \ + canvastoollisten.cc \ canvastoolselections.cc \ canvastoolthreshold.cc \ filelist.cc \ @@ -24,6 +25,7 @@ EXTRA_DIST = \ audioextractor.h \ canvas.h \ canvastool.h \ + canvastoollisten.cc \ canvastoolselections.h \ canvastoolthreshold.h \ filelist.h \ diff --git a/dgedit/canvas.cc b/dgedit/canvas.cc index 8249dd2..c70f730 100644 --- a/dgedit/canvas.cc +++ b/dgedit/canvas.cc @@ -36,6 +36,7 @@ #include "canvastoolselections.h" #include "canvastoolthreshold.h" +#include "canvastoollisten.h" #define DEFYSCALE 200 @@ -67,6 +68,7 @@ Canvas::Canvas(QWidget *parent) wav = QImage(width(), height(), QImage::Format_RGB32); + tools.push_back(new CanvasToolListen(this)); tools.push_back(new CanvasToolThreshold(this)); tools.push_back(new CanvasToolSelections(this)); } @@ -146,6 +148,8 @@ void Canvas::mouseMoveEvent(QMouseEvent *event) for(int i = 0; i < tools.size(); i++) { if(tools[i]->mouseMoveEvent(event)) return; } + + setCursor(Qt::ArrowCursor); } void Canvas::mousePressEvent(QMouseEvent *event) diff --git a/dgedit/canvastoolselections.cc b/dgedit/canvastoolselections.cc index 7492b9b..51cc1ad 100644 --- a/dgedit/canvastoolselections.cc +++ b/dgedit/canvastoolselections.cc @@ -77,6 +77,7 @@ bool CanvasToolSelections::mouseMoveEvent(QMouseEvent *event) if(abs(event->x() - mapX(i.value().from)) < 2 || abs(event->x() - mapX(i.value().to)) < 2) { canvas->setCursor(Qt::SplitHCursor); + return true; } i++; } diff --git a/dgedit/canvastoolthreshold.cc b/dgedit/canvastoolthreshold.cc index 6fa1b2e..e933592 100644 --- a/dgedit/canvastoolthreshold.cc +++ b/dgedit/canvastoolthreshold.cc @@ -50,8 +50,6 @@ bool CanvasToolThreshold::mouseMoveEvent(QMouseEvent *event) abs(event->y() - mapY(-threshold)) < 2 ) { canvas->setCursor(Qt::SplitVCursor); return true; - } else { - canvas->setCursor(Qt::ArrowCursor); } } |