comparison layer/TimeInstantLayer.h @ 978:64c2b3a4435a 3.0-integration

Merge from branch osx-retina
author Chris Cannam
date Fri, 26 Jun 2015 14:10:40 +0100
parents 4fe7a09be0fe
children a34a2a25907c
comparison
equal deleted inserted replaced
977:f40ccbf228c2 978:64c2b3a4435a
31 31
32 public: 32 public:
33 TimeInstantLayer(); 33 TimeInstantLayer();
34 virtual ~TimeInstantLayer(); 34 virtual ~TimeInstantLayer();
35 35
36 virtual void paint(View *v, QPainter &paint, QRect rect) const; 36 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
37 37
38 virtual QString getLabelPreceding(sv_frame_t) const; 38 virtual QString getLabelPreceding(sv_frame_t) const;
39 virtual QString getFeatureDescription(View *v, QPoint &) const; 39 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const;
40 40
41 virtual bool snapToFeatureFrame(View *v, sv_frame_t &frame, 41 virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
42 int &resolution, 42 int &resolution,
43 SnapType snap) const; 43 SnapType snap) const;
44 44
45 virtual void drawStart(View *v, QMouseEvent *); 45 virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *);
46 virtual void drawDrag(View *v, QMouseEvent *); 46 virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *);
47 virtual void drawEnd(View *v, QMouseEvent *); 47 virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *);
48 48
49 virtual void eraseStart(View *v, QMouseEvent *); 49 virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *);
50 virtual void eraseDrag(View *v, QMouseEvent *); 50 virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *);
51 virtual void eraseEnd(View *v, QMouseEvent *); 51 virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *);
52 52
53 virtual void editStart(View *v, QMouseEvent *); 53 virtual void editStart(LayerGeometryProvider *v, QMouseEvent *);
54 virtual void editDrag(View *v, QMouseEvent *); 54 virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *);
55 virtual void editEnd(View *v, QMouseEvent *); 55 virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *);
56 56
57 virtual bool editOpen(View *, QMouseEvent *); 57 virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *);
58 58
59 virtual void moveSelection(Selection s, sv_frame_t newStartFrame); 59 virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
60 virtual void resizeSelection(Selection s, Selection newSize); 60 virtual void resizeSelection(Selection s, Selection newSize);
61 virtual void deleteSelection(Selection s); 61 virtual void deleteSelection(Selection s);
62 62
63 virtual void copy(View *v, Selection s, Clipboard &to); 63 virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to);
64 virtual bool paste(View *v, const Clipboard &from, sv_frame_t frameOffset, 64 virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
65 bool interactive); 65 bool interactive);
66 66
67 virtual const Model *getModel() const { return m_model; } 67 virtual const Model *getModel() const { return m_model; }
68 void setModel(SparseOneDimensionalModel *model); 68 void setModel(SparseOneDimensionalModel *model);
69 69
82 }; 82 };
83 83
84 void setPlotStyle(PlotStyle style); 84 void setPlotStyle(PlotStyle style);
85 PlotStyle getPlotStyle() const { return m_plotStyle; } 85 PlotStyle getPlotStyle() const { return m_plotStyle; }
86 86
87 virtual bool isLayerScrollable(const View *v) const; 87 virtual bool isLayerScrollable(const LayerGeometryProvider *v) const;
88 88
89 virtual bool isLayerEditable() const { return true; } 89 virtual bool isLayerEditable() const { return true; }
90 90
91 virtual int getCompletion(View *) const { return m_model->getCompletion(); } 91 virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); }
92 92
93 virtual bool needsTextLabelHeight() const { return m_model->hasTextLabels(); } 93 virtual bool needsTextLabelHeight() const { return m_model->hasTextLabels(); }
94 94
95 virtual bool getValueExtents(double &, double &, bool &, QString &) const { 95 virtual bool getValueExtents(double &, double &, bool &, QString &) const {
96 return false; 96 return false;
107 } else { 107 } else {
108 return ColourDistinguishes; 108 return ColourDistinguishes;
109 } 109 }
110 } 110 }
111 111
112 virtual int getVerticalScaleWidth(View *, bool, QPainter &) const { return 0; } 112 virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; }
113 113
114 protected: 114 protected:
115 SparseOneDimensionalModel::PointList getLocalPoints(View *v, int) const; 115 SparseOneDimensionalModel::PointList getLocalPoints(LayerGeometryProvider *v, int) const;
116 116
117 virtual int getDefaultColourHint(bool dark, bool &impose); 117 virtual int getDefaultColourHint(bool dark, bool &impose);
118 118
119 bool clipboardAlignmentDiffers(View *v, const Clipboard &) const; 119 bool clipboardAlignmentDiffers(LayerGeometryProvider *v, const Clipboard &) const;
120 120
121 SparseOneDimensionalModel *m_model; 121 SparseOneDimensionalModel *m_model;
122 bool m_editing; 122 bool m_editing;
123 SparseOneDimensionalModel::Point m_editingPoint; 123 SparseOneDimensionalModel::Point m_editingPoint;
124 SparseOneDimensionalModel::EditCommand *m_editingCommand; 124 SparseOneDimensionalModel::EditCommand *m_editingCommand;