diff layer/FlexiNoteLayer.h @ 650:12d570c27d85 tonioni

split drag delete
author matthiasm
date Sun, 16 Jun 2013 00:16:37 +0100
parents ba76130ed7e5
children
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.h	Sat Jun 15 19:52:06 2013 +0100
+++ b/layer/FlexiNoteLayer.h	Sun Jun 16 00:16:37 2013 +0100
@@ -27,6 +27,14 @@
 class View;
 class QPainter;
 
+enum MultiEditMode
+{
+    MoveLeftBoundary,
+    MoveRightBoundary,
+    Delete,
+    Split
+};
+
 class FlexiNoteLayer : public SingleColourLayer
 {
     Q_OBJECT
@@ -54,8 +62,9 @@
     virtual void editDrag(View *v, QMouseEvent *);
     virtual void editEnd(View *v, QMouseEvent *);
 
-    virtual void splitStart(View *v, QMouseEvent *);
-    virtual void splitEnd(View *v, QMouseEvent *);
+    virtual void multiStart(View *v, QMouseEvent *);
+    virtual void multiDrag(View *v, QMouseEvent *);
+    virtual void multiEnd(View *v, QMouseEvent *);
 
     virtual void mouseMoveEvent(View *v, QMouseEvent *);
 
@@ -146,10 +155,13 @@
 
     bool getPointToDrag(View *v, int x, int y, FlexiNoteModel::Point &) const;
     bool getNoteToEdit(View *v, int x, int y, FlexiNoteModel::Point &) const;
+    bool getLeftNeighbour(View *v, FlexiNote note, FlexiNote &leftNeighbour) const;
+    bool getRightNeighbour(View *v, FlexiNote note, FlexiNote &rightNeighbour) 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;
+    MultiEditMode m_multiEditMode;
     int m_dragPointX;
     int m_dragPointY;
     int m_dragStartX;