Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsoverlayobject.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsoverlayobject.h - description
3  ------------------------------
4  begin : January 2007
5  copyright : (C) 2007 by Marco Hugentobler
6  email : marco dot hugentobler at karto dot baug dot ethz dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSOVERLAYOBJECT_H
19 #define QGSOVERLAYOBJECT_H
20 
21 #include "qgsgeometry.h"
22 #include "qgspoint.h"
23 #include <QList>
24 
25 class QgsGeometry;
26 
32 class CORE_EXPORT QgsOverlayObject
33 {
34  public:
35  QgsOverlayObject( int width = 0, int height = 0, double rotation = 0, QgsGeometry* geometry = 0 );
36  virtual ~QgsOverlayObject();
37 
38  //copy constructor and assignment operator necessary because of mGeometry
39  QgsOverlayObject( const QgsOverlayObject& other );
40  QgsOverlayObject& operator=( const QgsOverlayObject& other );
41 
42 
46  Q_DECL_DEPRECATED GEOSGeometry* getGeosGeometry();
50  Q_DECL_DEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
51 
52  //getters
53  int width() const {return mWidth;}
54  int height() const {return mHeight;}
55  double rotation() const {return mRotation;}
56  QgsGeometry* geometry() {return mGeometry;}
57  const QgsGeometry* geometry() const {return mGeometry;}
58  QgsPoint position() const;
59  QList<QgsPoint> positions() const {return mPositions;}
60 
61  //setters
62  void setHeight( int height ) {mHeight = height;}
63  void setWidth( int width ) {mWidth = width;}
64  void setRotation( double rotation ) {mRotation = rotation;}
66  void setGeometry( QgsGeometry* g );
68  void addPosition( const QgsPoint& position );
69 
70 
71  private:
72 
74  int mWidth;
76  int mHeight;
81  QList<QgsPoint> mPositions;
83  double mRotation;
87 
88 };
89 
90 #endif