Mercurial > hg > svgui
comparison layer/Layer.h @ 137:10a82b2bbb8b
* experiment with finer zoom level changes when using h thumbwheel
author | Chris Cannam |
---|---|
date | Tue, 22 Aug 2006 14:18:28 +0000 |
parents | 9e6b3e239b9d |
children | 29f01de27db4 |
comparison
equal
deleted
inserted
replaced
136:a859b87162ca | 137:10a82b2bbb8b |
---|---|
53 virtual const Model *getModel() const = 0; | 53 virtual const Model *getModel() const = 0; |
54 virtual Model *getModel() { | 54 virtual Model *getModel() { |
55 return const_cast<Model *>(const_cast<const Layer *>(this)->getModel()); | 55 return const_cast<Model *>(const_cast<const Layer *>(this)->getModel()); |
56 } | 56 } |
57 | 57 |
58 /** | |
59 * Return a zoom constraint object defining the supported zoom | |
60 * levels for this layer. If this returns zero, the layer will | |
61 * support any integer zoom level. | |
62 */ | |
58 virtual const ZoomConstraint *getZoomConstraint() const { return 0; } | 63 virtual const ZoomConstraint *getZoomConstraint() const { return 0; } |
64 | |
65 /** | |
66 * Return true if this layer can handle zoom levels other than | |
67 * those supported by its zoom constraint (presumably less | |
68 * efficiently or accurately than the officially supported zoom | |
69 * levels). If true, the layer will unenthusistically accept any | |
70 * integer zoom level from 1 to the maximum returned by its zoom | |
71 * constraint. | |
72 */ | |
73 virtual bool supportsOtherZoomLevels() const { return true; } | |
74 | |
59 virtual void paint(View *, QPainter &, QRect) const = 0; | 75 virtual void paint(View *, QPainter &, QRect) const = 0; |
60 | 76 |
61 enum VerticalPosition { | 77 enum VerticalPosition { |
62 PositionTop, PositionMiddle, PositionBottom | 78 PositionTop, PositionMiddle, PositionBottom |
63 }; | 79 }; |