comparison layer/RegionLayer.h @ 1428:c9fa16e41664 single-point

Update RegionLayer to updated RegionModel
author Chris Cannam
date Fri, 15 Mar 2019 14:24:22 +0000
parents a18e78b9c78b
children 31499c3520ee
comparison
equal deleted inserted replaced
1427:f792a5001d80 1428:c9fa16e41664
139 double getValueForY(LayerGeometryProvider *v, int y, int avoid) const; 139 double getValueForY(LayerGeometryProvider *v, int y, int avoid) const;
140 void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const; 140 void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const;
141 141
142 int getDefaultColourHint(bool dark, bool &impose) override; 142 int getDefaultColourHint(bool dark, bool &impose) override;
143 143
144 RegionModel::PointList getLocalPoints(LayerGeometryProvider *v, int x) const; 144 EventVector getLocalPoints(LayerGeometryProvider *v, int x) const;
145 145
146 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, RegionModel::Point &) const; 146 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, Event &) const;
147 147
148 RegionModel *m_model; 148 RegionModel *m_model;
149 bool m_editing; 149 bool m_editing;
150 int m_dragPointX; 150 int m_dragPointX;
151 int m_dragPointY; 151 int m_dragPointY;
152 int m_dragStartX; 152 int m_dragStartX;
153 int m_dragStartY; 153 int m_dragStartY;
154 RegionModel::Point m_originalPoint; 154 Event m_originalPoint;
155 RegionModel::Point m_editingPoint; 155 Event m_editingPoint;
156 RegionModel::EditCommand *m_editingCommand; 156 ChangeEventsCommand *m_editingCommand;
157 VerticalScale m_verticalScale; 157 VerticalScale m_verticalScale;
158 int m_colourMap; 158 int m_colourMap;
159 bool m_colourInverted; 159 bool m_colourInverted;
160 PlotStyle m_plotStyle; 160 PlotStyle m_plotStyle;
161 161
168 SpacingMap m_distributionMap; 168 SpacingMap m_distributionMap;
169 169
170 int spacingIndexToY(LayerGeometryProvider *v, int i) const; 170 int spacingIndexToY(LayerGeometryProvider *v, int i) const;
171 double yToSpacingIndex(LayerGeometryProvider *v, int y) const; 171 double yToSpacingIndex(LayerGeometryProvider *v, int y) const;
172 172
173 void finish(RegionModel::EditCommand *command) { 173 void finish(ChangeEventsCommand *command) {
174 Command *c = command->finish(); 174 Command *c = command->finish();
175 if (c) CommandHistory::getInstance()->addCommand(c, false); 175 if (c) CommandHistory::getInstance()->addCommand(c, false);
176 } 176 }
177 }; 177 };
178 178