2017-05-23 14:45:44 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsgeometryrubberband.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-13 09:37:16 +02:00
|
|
|
%ModuleHeaderCode
|
|
|
|
// For ConvertToSubClassCode.
|
|
|
|
#include <qgsgeometryrubberband.h>
|
|
|
|
%End
|
2017-05-23 14:45:44 +02:00
|
|
|
|
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
class QgsGeometryRubberBand: QgsMapCanvasItem
|
|
|
|
{
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A rubberband class for QgsAbstractGeometry (considering curved geometries)*
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsgeometryrubberband.h"
|
2019-09-13 09:37:16 +02:00
|
|
|
%End
|
|
|
|
%ConvertToSubClassCode
|
|
|
|
if ( dynamic_cast<QgsGeometryRubberBand *>( sipCpp ) )
|
|
|
|
sipType = sipType_QgsGeometryRubberBand;
|
|
|
|
else
|
|
|
|
sipType = nullptr;
|
2015-09-11 09:10:35 +02:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
enum IconType
|
|
|
|
{
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
ICON_NONE,
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
ICON_CROSS,
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
ICON_X,
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
ICON_BOX,
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
ICON_CIRCLE,
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
ICON_FULL_BOX
|
|
|
|
};
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsGeometryRubberBand( QgsMapCanvas *mapCanvas, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::LineGeometry );
|
2015-09-11 09:10:35 +02:00
|
|
|
~QgsGeometryRubberBand();
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setGeometry( QgsAbstractGeometry *geom /Transfer/ );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets geometry (takes ownership). Geometry is expected to be in map coordinates
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
const QgsAbstractGeometry *geometry();
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Returns a pointer to the geometry
|
|
|
|
%End
|
2017-06-01 12:18:43 +02:00
|
|
|
void moveVertex( QgsVertexId id, const QgsPoint &newPos );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Moves vertex to new position (in map coordinates)
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
void setFillColor( const QColor &c );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets fill color for vertex markers
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
void setStrokeColor( const QColor &c );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets stroke color for vertex markers
|
|
|
|
%End
|
2017-02-22 17:13:57 +10:00
|
|
|
void setStrokeWidth( int width );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets stroke width
|
|
|
|
%End
|
2015-09-11 09:10:35 +02:00
|
|
|
void setLineStyle( Qt::PenStyle penStyle );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets pen style
|
|
|
|
%End
|
2015-09-11 09:10:35 +02:00
|
|
|
void setBrushStyle( Qt::BrushStyle brushStyle );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets brush style
|
|
|
|
%End
|
2015-09-11 09:10:35 +02:00
|
|
|
void setIconType( IconType iconType );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
Sets vertex marker icon type
|
|
|
|
%End
|
2015-09-11 09:10:35 +02:00
|
|
|
|
|
|
|
protected:
|
2017-05-01 16:42:33 +02:00
|
|
|
virtual void paint( QPainter *painter );
|
2017-05-23 14:45:44 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2015-09-11 09:10:35 +02:00
|
|
|
};
|
2017-05-23 14:45:44 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsgeometryrubberband.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|