|
1 |
| -class CORE_EXPORT QgsOverlayObject: public pal::PalGeometry |
| 1 | +class QgsOverlayObject |
2 | 2 | {
|
3 | 3 | %TypeHeaderCode
|
4 | 4 | #include "qgsoverlayobject.h"
|
5 | 5 | %End
|
6 |
| - public: |
| 6 | + public: |
7 | 7 | QgsOverlayObject( int width = 0, int height = 0, double rotation = 0, QgsGeometry* geometry = 0 );
|
8 | 8 | virtual ~QgsOverlayObject();
|
9 | 9 |
|
10 | 10 | //copy constructor and assignment operator necessary because of mGeometry
|
11 | 11 | QgsOverlayObject( const QgsOverlayObject& other );
|
12 |
| - QgsOverlayObject& operator=( const QgsOverlayObject& other ); |
13 | 12 |
|
14 | 13 |
|
| 14 | + //this function fill not be wrapped to not depend on geos python bindings |
15 | 15 | /**Returns the feature geometry in geos format. The calling function does _not_ take
|
16 |
| - ownership of the generated object*/ |
17 |
| - GEOSGeometry* getGeosGeometry(); |
18 |
| - /**Feature geometry is released when object is destructed so this function is empty*/ |
19 |
| - void releaseGeosGeometry( GEOSGeometry *the_geom ) {} |
| 16 | + ownership of the generated object. The geometry is in map coordinates |
| 17 | + @note: this function is deprecated. Please use geometry() and QgsGeometry::asGeos instead*/ |
| 18 | + //GEOSGeometry* getGeosGeometry(); |
| 19 | + /**Feature geometry is released when object is destructed so this function is empty. This function is deprecated and does nothing*/ |
| 20 | + //void releaseGeosGeometry( GEOSGeometry *the_geom ) |
20 | 21 |
|
21 | 22 | //getters
|
22 |
| - int width() const {return mWidth;} |
23 |
| - int height() const {return mHeight;} |
24 |
| - double rotation() const {return mRotation;} |
25 |
| - QgsGeometry* geometry() {return mGeometry;} |
26 |
| - const QgsGeometry* geometry() const {return mGeometry;} |
| 23 | + int width() const; |
| 24 | + int height() const; |
| 25 | + double rotation() const; |
| 26 | + QgsGeometry* geometry(); |
| 27 | + //const QgsGeometry* geometry() const; |
27 | 28 | QgsPoint position() const;
|
28 |
| - QList<QgsPoint> positions() const {return mPositions;} |
| 29 | + QList<QgsPoint> positions() const; |
29 | 30 |
|
30 | 31 | //setters
|
31 |
| - void setHeight( int height ) {mHeight = height;} |
32 |
| - void setWidth( int width ) {mWidth = width;} |
33 |
| - void setRotation( double rotation ) {mRotation = rotation;} |
| 32 | + void setHeight( int height ); |
| 33 | + void setWidth( int width ); |
| 34 | + void setRotation( double rotation ); |
34 | 35 | /**Set geometry. This class takes ownership of the object*/
|
35 | 36 | void setGeometry( QgsGeometry* g );
|
36 | 37 | /**Adds a position in map coordinates*/
|
37 | 38 | void addPosition( const QgsPoint& position );
|
38 |
| - |
39 |
| - |
40 |
| - private: |
41 |
| - |
42 |
| - /**Width of the bounding box in pixels*/ |
43 |
| - int mWidth; |
44 |
| - /**Height of the bounding box in pixels*/ |
45 |
| - int mHeight; |
46 |
| - /**Position of the object in map coordinates. Note that it is possible that an object |
47 |
| - has several positions, e.g. a multiobject or an object that is split into multiple parts |
48 |
| - by the edge of the view extent*/ |
49 |
| - QList<QgsPoint> mPositions; |
50 |
| - /**Rotation of the object*/ |
51 |
| - double mRotation; |
52 |
| - /**Copy of the feature geometry. A copy is necessary because in QGIS geometries are deleted |
53 |
| - after drawing*/ |
54 |
| - QgsGeometry* mGeometry; |
55 |
| - |
56 | 39 | };
|
0 commit comments