QGIS/python/gui/qgsgeometryrubberband.sip
Denis Rouzaud 93971d5ed3 [sip] align pointer and reference in blacklisted files
this will facilitate sip diff checking
2017-05-01 17:49:43 +02:00

78 lines
2.7 KiB
Plaintext

/***************************************************************************
qgsgeometryrubberband.h
-----------------------
begin : December 2014
copyright : (C) 2014 by Marco Hugentobler
email : marco at sourcepole dot ch
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/** A rubberband class for QgsAbstractGeometry (considering curved geometries)*/
class QgsGeometryRubberBand: QgsMapCanvasItem
{
%TypeHeaderCode
#include "qgsgeometryrubberband.h"
%End
public:
enum IconType
{
/**
* No icon is used
*/
ICON_NONE,
/**
* A cross is used to highlight points (+)
*/
ICON_CROSS,
/**
* A cross is used to highlight points (x)
*/
ICON_X,
/**
* A box is used to highlight points (□)
*/
ICON_BOX,
/**
* A circle is used to highlight points (○)
*/
ICON_CIRCLE,
/**
* A full box is used to highlight points (■)
*/
ICON_FULL_BOX
};
QgsGeometryRubberBand( QgsMapCanvas *mapCanvas, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::LineGeometry );
~QgsGeometryRubberBand();
/** Sets geometry (takes ownership). Geometry is expected to be in map coordinates */
void setGeometry( QgsAbstractGeometry *geom /Transfer/ );
/** Returns a pointer to the geometry*/
const QgsAbstractGeometry *geometry();
/** Moves vertex to new position (in map coordinates)*/
void moveVertex( QgsVertexId id, const QgsPointV2 &newPos );
/** Sets fill color for vertex markers*/
void setFillColor( const QColor &c );
/** Sets stroke color for vertex markers*/
void setStrokeColor( const QColor &c );
/** Sets stroke width*/
void setStrokeWidth( int width );
/** Sets pen style*/
void setLineStyle( Qt::PenStyle penStyle );
/** Sets brush style*/
void setBrushStyle( Qt::BrushStyle brushStyle );
/** Sets vertex marker icon type*/
void setIconType( IconType iconType );
protected:
virtual void paint( QPainter *painter );
};