diff layer/FlexiNoteLayer.h @ 646:ba76130ed7e5 tonioni

added context sensitive mouse pointers in note edit tool mode
author gyorgyf
date Sat, 15 Jun 2013 17:04:03 +0100
parents 5c9dcec5f3e9
children 2ad082c5a090 12d570c27d85
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.h	Sat Jun 15 16:16:24 2013 +0100
+++ b/layer/FlexiNoteLayer.h	Sat Jun 15 17:04:03 2013 +0100
@@ -16,6 +16,8 @@
 #ifndef _FLEXINOTE_LAYER_H_
 #define _FLEXINOTE_LAYER_H_
 
+#define NOTE_HEIGHT 8
+
 #include "SingleColourLayer.h"
 #include "data/model/FlexiNoteModel.h"
 
@@ -37,8 +39,8 @@
     virtual QString getFeatureDescription(View *v, QPoint &) const;
 
     virtual bool snapToFeatureFrame(View *v, int &frame,
-				    size_t &resolution,
-				    SnapType snap) const;
+                    size_t &resolution,
+                    SnapType snap) const;
 
     virtual void drawStart(View *v, QMouseEvent *);
     virtual void drawDrag(View *v, QMouseEvent *);
@@ -55,6 +57,8 @@
     virtual void splitStart(View *v, QMouseEvent *);
     virtual void splitEnd(View *v, QMouseEvent *);
 
+    virtual void mouseMoveEvent(View *v, QMouseEvent *);
+
     virtual bool editOpen(View *v, QMouseEvent *);
 
     virtual void moveSelection(Selection s, size_t newStartFrame);
@@ -75,7 +79,7 @@
     virtual int getPropertyRangeAndValue(const PropertyName &,
                                          int *min, int *max, int *deflt) const;
     virtual QString getPropertyValueLabel(const PropertyName &,
-					  int value) const;
+                      int value) const;
     virtual void setProperty(const PropertyName &, int value);
 
     enum VerticalScale {
@@ -141,6 +145,8 @@
     FlexiNoteModel::PointList getLocalPoints(View *v, int) const;
 
     bool getPointToDrag(View *v, int x, int y, FlexiNoteModel::Point &) const;
+    bool getNoteToEdit(View *v, int x, int y, FlexiNoteModel::Point &) const;
+    void getRelativeMousePosition(View *v, FlexiNoteModel::Point &note, int x, int y, bool &closeToLeft, bool &closeToRight, bool &closeToTop, bool &closeToBottom) const;
 
     FlexiNoteModel *m_model;
     bool m_editing;