Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 qgsoverlayobject.h - description 00003 ------------------------------ 00004 begin : January 2007 00005 copyright : (C) 2007 by Marco Hugentobler 00006 email : marco dot hugentobler at karto dot baug dot ethz dot ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 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 //copy constructor and assignment operator necessary because of mGeometry 00039 QgsOverlayObject( const QgsOverlayObject& other ); 00040 QgsOverlayObject& operator=( const QgsOverlayObject& other ); 00041 00042 00046 Q_DECL_DEPRECATED GEOSGeometry* getGeosGeometry(); 00050 Q_DECL_DEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); } 00051 00052 //getters 00053 int width() const {return mWidth;} 00054 int height() const {return mHeight;} 00055 double rotation() const {return mRotation;} 00056 QgsGeometry* geometry() {return mGeometry;} 00057 const QgsGeometry* geometry() const {return mGeometry;} 00058 QgsPoint position() const; 00059 QList<QgsPoint> positions() const {return mPositions;} 00060 00061 //setters 00062 void setHeight( int height ) {mHeight = height;} 00063 void setWidth( int width ) {mWidth = width;} 00064 void setRotation( double rotation ) {mRotation = rotation;} 00066 void setGeometry( QgsGeometry* g ); 00068 void addPosition( const QgsPoint& position ); 00069 00070 00071 private: 00072 00074 int mWidth; 00076 int mHeight; 00081 QList<QgsPoint> mPositions; 00083 double mRotation; 00086 QgsGeometry* mGeometry; 00087 00088 }; 00089 00090 #endif