Mercurial > hg > svgui
comparison layer/Layer.h @ 1459:42c87368287c
Merge from branch single-point
author | Chris Cannam |
---|---|
date | Fri, 17 May 2019 10:02:52 +0100 |
parents | 98157ea8a3d2 |
children | 11a150e65ee1 |
comparison
equal
deleted
inserted
replaced
1441:8d5bf4ab98ef | 1459:42c87368287c |
---|---|
159 } | 159 } |
160 | 160 |
161 enum SnapType { | 161 enum SnapType { |
162 SnapLeft, | 162 SnapLeft, |
163 SnapRight, | 163 SnapRight, |
164 SnapNearest, | |
165 SnapNeighbouring | 164 SnapNeighbouring |
166 }; | 165 }; |
167 | 166 |
168 /** | 167 /** |
169 * Adjust the given frame to snap to the nearest feature, if | 168 * Adjust the given frame to snap to the nearest feature, if |
170 * possible. | 169 * possible. |
171 * | 170 * |
172 * If snap is SnapLeft or SnapRight, adjust the frame to match | 171 * If snap is SnapLeft or SnapRight, adjust the frame to match |
173 * that of the nearest feature in the given direction regardless | 172 * that of the nearest feature in the given direction regardless |
174 * of how far away it is. If snap is SnapNearest, adjust the | 173 * of how far away it is. If snap is SnapNeighbouring, adjust the |
175 * frame to that of the nearest feature in either direction. If | 174 * frame to that of the nearest feature in either direction if it |
176 * snap is SnapNeighbouring, adjust the frame to that of the | 175 * is close, and leave it alone (returning false) otherwise. |
177 * nearest feature if it is close, and leave it alone (returning | 176 * SnapNeighbouring should always choose the same feature that |
178 * false) otherwise. SnapNeighbouring should always choose the | 177 * would be used in an editing operation through calls to |
179 * same feature that would be used in an editing operation through | 178 * editStart etc. |
180 * calls to editStart etc. | |
181 * | 179 * |
182 * Return true if a suitable feature was found and frame adjusted | 180 * Return true if a suitable feature was found and frame adjusted |
183 * accordingly. Return false if no suitable feature was available | 181 * accordingly. Return false if no suitable feature was available |
184 * (and leave frame unmodified). If returning true, also return | 182 * (and leave frame unmodified). If returning true, also return |
185 * the resolution of the model in this layer in sample frames. | 183 * the resolution of the model in this layer in sample frames. |
549 * from a session if its model cannot be found. | 547 * from a session if its model cannot be found. |
550 */ | 548 */ |
551 virtual bool canExistWithoutModel() const { return false; } | 549 virtual bool canExistWithoutModel() const { return false; } |
552 | 550 |
553 public slots: | 551 public slots: |
552 /** | |
553 * Change the visibility status (dormancy) of the layer in the | |
554 * given view. | |
555 */ | |
554 void showLayer(LayerGeometryProvider *, bool show); | 556 void showLayer(LayerGeometryProvider *, bool show); |
555 | 557 |
556 signals: | 558 signals: |
557 void modelChanged(); | 559 void modelChanged(); |
558 void modelCompletionChanged(); | 560 void modelCompletionChanged(); |