00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QGSOVERLAYOBJECT_H
00019 #define QGSOVERLAYOBJECT_H
00020
00021 #include "qgsgeometry.h"
00022 #include "qgspoint.h"
00023 #include <QList>
00024
00025 class QgsGeometry;
00026
00032 class CORE_EXPORT QgsOverlayObject
00033 {
00034 public:
00035 QgsOverlayObject( int width = 0, int height = 0, double rotation = 0, QgsGeometry* geometry = 0 );
00036 virtual ~QgsOverlayObject();
00037
00038
00039 QgsOverlayObject( const QgsOverlayObject& other );
00040 QgsOverlayObject& operator=( const QgsOverlayObject& other );
00041
00042
00046 GEOSGeometry* getGeosGeometry();
00048 void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
00049
00050
00051 int width() const {return mWidth;}
00052 int height() const {return mHeight;}
00053 double rotation() const {return mRotation;}
00054 QgsGeometry* geometry() {return mGeometry;}
00055 const QgsGeometry* geometry() const {return mGeometry;}
00056 QgsPoint position() const;
00057 QList<QgsPoint> positions() const {return mPositions;}
00058
00059
00060 void setHeight( int height ) {mHeight = height;}
00061 void setWidth( int width ) {mWidth = width;}
00062 void setRotation( double rotation ) {mRotation = rotation;}
00064 void setGeometry( QgsGeometry* g );
00066 void addPosition( const QgsPoint& position );
00067
00068
00069 private:
00070
00072 int mWidth;
00074 int mHeight;
00079 QList<QgsPoint> mPositions;
00081 double mRotation;
00084 QgsGeometry* mGeometry;
00085
00086 };
00087
00088 #endif