26 const QColor rectColor = QColor( 185, 84, 210, 60 );
27 mCanvasPreviewBand->
setColor( rectColor );
31 mCanvasCenterMarker->
setColor( QColor( 185, 84, 210 ) );
40 mLayers <<
new QgsVectorLayer( layerPath, tr(
"World Map" ), QStringLiteral(
"ogr" ), options );
53 qDeleteAll( mLayers );
55 delete mCanvasPreviewBand;
56 delete mCanvasCenterMarker;
76 mPreviewBand->
setColor( QColor( 255, 0, 0, 65 ) );
99 mCanvasPreviewBand->show();
101 mCanvasCenterMarker->show();
static QString pkgDataPath()
Returns the common root path of all application data directories.
This class represents a coordinate reference system (CRS).
A geometry is the spatial representation of a feature.
Qgis::GeometryOperationResult addPart(const QVector< QgsPointXY > &points, QgsWkbTypes::GeometryType geomType=QgsWkbTypes::UnknownGeometry)
Adds a new part to a the geometry.
static QgsGeometry fromRect(const QgsRectangle &rect) SIP_HOLDGIL
Creates a new geometry from a QgsRectangle.
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
Map canvas is a class for displaying all GIS data types on a canvas.
void zoomToFullExtent()
Zoom to the full extent of all layers currently visible in the canvas.
void setLayers(const QList< QgsMapLayer * > &layers)
Sets the list of layers that should be shown in the canvas.
void setExtent(const QgsRectangle &r, bool magnified=false)
Sets the extent of the map canvas to the specified rectangle.
void setPreviewJobsEnabled(bool enabled)
Sets whether canvas map preview jobs (low priority render jobs which render portions of the view just...
void setDestinationCrs(const QgsCoordinateReferenceSystem &crs)
Sets destination coordinate reference system.
void setMapTool(QgsMapTool *mapTool, bool clean=false)
Sets the map tool currently being used on the canvas.
QgsRectangle extent() const
Returns the current zoom extent of the map canvas.
void refresh()
Repaints the canvas map.
A rectangle specified with double values.
void scale(double scaleFactor, const QgsPointXY *c=nullptr)
Scale the rectangle around its center point.
double yMaximum() const SIP_HOLDGIL
Returns the y maximum value (top side of rectangle).
double xMaximum() const SIP_HOLDGIL
Returns the x maximum value (right side of rectangle).
double xMinimum() const SIP_HOLDGIL
Returns the x minimum value (left side of rectangle).
double yMinimum() const SIP_HOLDGIL
Returns the y minimum value (bottom side of rectangle).
double area() const SIP_HOLDGIL
Returns the area of the rectangle.
QgsPointXY center() const SIP_HOLDGIL
Returns the center point of the rectangle.
A class for drawing transient features (e.g.
void setWidth(int width)
Sets the width of the line.
void setColor(const QColor &color)
Sets the color for the rubberband.
void setToGeometry(const QgsGeometry &geom, QgsVectorLayer *layer)
Sets this rubber band to geom.
Represents a vector layer which manages a vector based data sets.
A class for marking vertices of features using e.g.
void setPenWidth(int width)
void setCenter(const QgsPointXY &point)
Sets the center point of the marker, in map coordinates.
void setIconType(int iconType)
void setColor(const QColor &color)
Sets the stroke color for the marker.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
Setting options for loading vector layers.
bool forceReadOnly
Controls whether the layer is forced to be load as Read Only.