2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
class QgsRubberBand: QgsMapCanvasItem
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsrubberband.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
2007-04-23 14:58:15 +00:00
|
|
|
QgsRubberBand(QgsMapCanvas* mapCanvas /TransferThis/, bool isPolygon = false);
|
2007-01-09 02:39:15 +00:00
|
|
|
~QgsRubberBand();
|
|
|
|
|
|
|
|
void setColor(const QColor & color);
|
|
|
|
void setWidth(int width);
|
|
|
|
|
|
|
|
void reset(bool isPolygon = false);
|
2007-09-30 23:45:36 +00:00
|
|
|
|
2008-01-09 14:40:21 +00:00
|
|
|
void addPoint(const QgsPoint & p, int geometryIndex);
|
|
|
|
void movePoint(const QgsPoint & p, int geometryIndex);
|
|
|
|
void movePoint(int index, const QgsPoint& p, int geometryIndex);
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2007-09-30 23:45:36 +00:00
|
|
|
int size() const;
|
|
|
|
const QList<QgsPoint>& getPoints() const;
|
|
|
|
const QgsPoint& getPoint(int index) const;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
protected:
|
|
|
|
virtual void paint(QPainter* p);
|
|
|
|
|
|
|
|
//! recalculates needed rectangle
|
|
|
|
void updateRect();
|
|
|
|
|
|
|
|
};
|
|
|
|
|