diff layer/TimeInstantLayer.h @ 28:202d1dca67d2

* Rationalise the local feature identification API in Layer subclasses * Add segmentation mode to TimeInstantLayer
author Chris Cannam
date Mon, 06 Feb 2006 17:24:52 +0000
parents dcdb21b62dbb
children ea6fe8cfcdd5
line wrap: on
line diff
--- a/layer/TimeInstantLayer.h	Fri Feb 03 17:30:47 2006 +0000
+++ b/layer/TimeInstantLayer.h	Mon Feb 06 17:24:52 2006 +0000
@@ -30,9 +30,9 @@
 
     virtual QString getFeatureDescription(QPoint &) const;
 
-    virtual int getNearestFeatureFrame(int frame, 
-				       size_t &resolution,
-				       bool snapRight = true) const;
+    virtual bool snapToFeatureFrame(int &frame,
+				    size_t &resolution,
+				    SnapType snap) const;
 
     virtual void drawStart(QMouseEvent *);
     virtual void drawDrag(QMouseEvent *);
@@ -56,6 +56,14 @@
     void setBaseColour(QColor);
     QColor getBaseColour() const { return m_colour; }
 
+    enum PlotStyle {
+	PlotInstants,
+	PlotSegmentation
+    };
+
+    void setPlotStyle(PlotStyle style);
+    PlotStyle getPlotStyle() const { return m_plotStyle; }
+
     virtual bool isLayerScrollable() const;
 
     virtual bool isLayerEditable() const { return true; }
@@ -75,6 +83,7 @@
     SparseOneDimensionalModel::Point m_editingPoint;
     SparseOneDimensionalModel::EditCommand *m_editingCommand;
     QColor m_colour;
+    PlotStyle m_plotStyle;
 };
 
 #endif