comparison 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
comparison
equal deleted inserted replaced
27:38fe0ea9e46e 28:202d1dca67d2
28 28
29 virtual void paint(QPainter &paint, QRect rect) const; 29 virtual void paint(QPainter &paint, QRect rect) const;
30 30
31 virtual QString getFeatureDescription(QPoint &) const; 31 virtual QString getFeatureDescription(QPoint &) const;
32 32
33 virtual int getNearestFeatureFrame(int frame, 33 virtual bool snapToFeatureFrame(int &frame,
34 size_t &resolution, 34 size_t &resolution,
35 bool snapRight = true) const; 35 SnapType snap) const;
36 36
37 virtual void drawStart(QMouseEvent *); 37 virtual void drawStart(QMouseEvent *);
38 virtual void drawDrag(QMouseEvent *); 38 virtual void drawDrag(QMouseEvent *);
39 virtual void drawEnd(QMouseEvent *); 39 virtual void drawEnd(QMouseEvent *);
40 40
54 virtual void setProperty(const PropertyName &, int value); 54 virtual void setProperty(const PropertyName &, int value);
55 55
56 void setBaseColour(QColor); 56 void setBaseColour(QColor);
57 QColor getBaseColour() const { return m_colour; } 57 QColor getBaseColour() const { return m_colour; }
58 58
59 enum PlotStyle {
60 PlotInstants,
61 PlotSegmentation
62 };
63
64 void setPlotStyle(PlotStyle style);
65 PlotStyle getPlotStyle() const { return m_plotStyle; }
66
59 virtual bool isLayerScrollable() const; 67 virtual bool isLayerScrollable() const;
60 68
61 virtual bool isLayerEditable() const { return true; } 69 virtual bool isLayerEditable() const { return true; }
62 70
63 virtual int getCompletion() const { return m_model->getCompletion(); } 71 virtual int getCompletion() const { return m_model->getCompletion(); }
73 SparseOneDimensionalModel *m_model; 81 SparseOneDimensionalModel *m_model;
74 bool m_editing; 82 bool m_editing;
75 SparseOneDimensionalModel::Point m_editingPoint; 83 SparseOneDimensionalModel::Point m_editingPoint;
76 SparseOneDimensionalModel::EditCommand *m_editingCommand; 84 SparseOneDimensionalModel::EditCommand *m_editingCommand;
77 QColor m_colour; 85 QColor m_colour;
86 PlotStyle m_plotStyle;
78 }; 87 };
79 88
80 #endif 89 #endif
81 90