QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
26 QColor rectColor = QColor( 185, 84, 210, 60 );
27 mCanvasPreviewBand->
setColor( rectColor );
31 mCanvasCenterMarker->
setColor( QColor( 185, 84, 210 ) );
46 qDeleteAll( mLayers );
48 delete mCanvasPreviewBand;
49 delete mCanvasCenterMarker;
69 mPreviewBand->
setColor( QColor( 255, 0, 0, 65 ) );
92 mCanvasPreviewBand->show();
94 mCanvasCenterMarker->show();
OperationResult addPart(const QVector< QgsPointXY > &points, QgsWkbTypes::GeometryType geomType=QgsWkbTypes::UnknownGeometry)
Adds a new part to a the geometry.
QgsRectangle extent() const
Returns the current zoom extent of the map canvas.
void refresh()
Repaints the canvas map.
void setIconType(int iconType)
double xMaximum() const
Returns the x maximum value (right side of rectangle).
double area() const
Returns the area of the rectangle.
static QgsGeometry fromRect(const QgsRectangle &rect)
Creates a new geometry from a QgsRectangle.
void setPreviewJobsEnabled(bool enabled)
Sets whether canvas map preview jobs (low priority render jobs which render portions of the view just...
void scale(double scaleFactor, const QgsPointXY *c=nullptr)
Scale the rectangle around its center point.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
void setPenWidth(int width)
void setColor(const QColor &color)
Sets the color for the rubberband.
void setCenter(const QgsPointXY &point)
void setColor(const QColor &color)
Sets the stroke color for the marker.
void setDestinationCrs(const QgsCoordinateReferenceSystem &crs)
sets destination coordinate reference system
void zoomToFullExtent()
Zoom to the full extent of all layers.
static QString pkgDataPath()
Returns the common root path of all application data directories.
void setExtent(const QgsRectangle &r, bool magnified=false)
Sets the extent of the map canvas to the specified rectangle.
void setMapTool(QgsMapTool *mapTool, bool clean=false)
Sets the map tool currently being used on the canvas.
double yMaximum() const
Returns the y maximum value (top side of rectangle).
void setWidth(int width)
Sets the width of the line.
QgsPointXY center() const
Returns the center point of the rectangle.
double yMinimum() const
Returns the y minimum value (bottom side of rectangle).
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
void setToGeometry(const QgsGeometry &geom, QgsVectorLayer *layer)
Sets this rubber band to geom.
void setLayers(const QList< QgsMapLayer * > &layers)
Sets the list of layers that should be shown in the canvas.
double xMinimum() const
Returns the x minimum value (left side of rectangle).