Mercurial > hg > svgui
comparison view/View.h @ 916:94e4952a6774 osx-retina
Start trying to introduce LayerGeometryProvider as proxyable interface for View methods that the Layer wants to use
author | Chris Cannam |
---|---|
date | Tue, 17 Mar 2015 15:05:25 +0000 |
parents | f6d9f28f37cb |
children | 4fe7a09be0fe |
comparison
equal
deleted
inserted
replaced
915:f6d9f28f37cb | 916:94e4952a6774 |
---|---|
17 #define _VIEW_H_ | 17 #define _VIEW_H_ |
18 | 18 |
19 #include <QFrame> | 19 #include <QFrame> |
20 #include <QProgressBar> | 20 #include <QProgressBar> |
21 | 21 |
22 #include "LayerGeometryProvider.h" | |
23 | |
22 #include "base/ZoomConstraint.h" | 24 #include "base/ZoomConstraint.h" |
23 #include "base/PropertyContainer.h" | 25 #include "base/PropertyContainer.h" |
24 #include "ViewManager.h" | 26 #include "ViewManager.h" |
25 #include "base/XmlExportable.h" | 27 #include "base/XmlExportable.h" |
26 #include "base/BaseTypes.h" | 28 #include "base/BaseTypes.h" |
47 * mechanisms for doing so (as well as any other operations and | 49 * mechanisms for doing so (as well as any other operations and |
48 * properties available) depend on the subclass. | 50 * properties available) depend on the subclass. |
49 */ | 51 */ |
50 | 52 |
51 class View : public QFrame, | 53 class View : public QFrame, |
52 public XmlExportable | 54 public XmlExportable, |
55 public LayerGeometryProvider | |
53 { | 56 { |
54 Q_OBJECT | 57 Q_OBJECT |
55 | 58 |
56 public: | 59 public: |
57 /** | 60 /** |
240 virtual bool getFollowGlobalZoom() const { return m_followZoom; } | 243 virtual bool getFollowGlobalZoom() const { return m_followZoom; } |
241 | 244 |
242 virtual bool hasLightBackground() const; | 245 virtual bool hasLightBackground() const; |
243 virtual QColor getForeground() const; | 246 virtual QColor getForeground() const; |
244 virtual QColor getBackground() const; | 247 virtual QColor getBackground() const; |
245 | |
246 enum TextStyle { | |
247 BoxedText, | |
248 OutlinedText, | |
249 OutlinedItalicText | |
250 }; | |
251 | 248 |
252 virtual void drawVisibleText(QPainter &p, int x, int y, | 249 virtual void drawVisibleText(QPainter &p, int x, int y, |
253 QString text, TextStyle style) const; | 250 QString text, TextStyle style) const; |
254 | 251 |
255 virtual void drawMeasurementRect(QPainter &p, const Layer *, | 252 virtual void drawMeasurementRect(QPainter &p, const Layer *, |