23#include <QNetworkRequest>
25#include "moc_qgsowssourcewidget.cpp"
29 , mProviderKey( providerKey )
35 mSpatialExtentBox->setOutputCrs( crs );
51 mSpatialExtentBox->setOutputCrs( destinationCrs );
52 mSpatialExtentBox->setMapCanvas(
mapCanvas() );
60 mSpatialExtentBox->setOutputCrs( crs );
66 mSpatialExtentBox->setCurrentExtent(
extent, destinationCrs );
67 mSpatialExtentBox->setOutputExtentFromCurrent();
68 mSpatialExtentBox->setMapCanvas(
mapCanvas() );
73 return mSpatialExtentBox->outputExtent();
79 bool inverted = mSourceParts.value( QStringLiteral(
"InvertAxisOrientation" ) ).toBool();
81 QString bbox = mSourceParts.value( QStringLiteral(
"bbox" ) ).toString();
83 if ( !bbox.isEmpty() )
85 QStringList coords = bbox.split(
',' );
87 coords.at( 1 ).toDouble(),
88 coords.at( 0 ).toDouble(),
89 coords.at( 3 ).toDouble(),
90 coords.at( 2 ).toDouble()
93 coords.at( 0 ).toDouble(),
94 coords.at( 1 ).toDouble(),
95 coords.at( 2 ).toDouble(),
96 coords.at( 3 ).toDouble()
105 mSpatialExtentBox->setChecked( !
extent.isNull() );
110 QVariantMap parts = mSourceParts;
114 if ( mSpatialExtentBox->isChecked() && !spatialExtent.
isNull() )
116 bool inverted = parts.value( QStringLiteral(
"InvertAxisOrientation" ) ).toBool();
118 QString bbox = QString( inverted ?
"%2,%1,%4,%3" :
"%1,%2,%3,%4" )
121 parts.insert( QStringLiteral(
"bbox" ), bbox );
Represents a coordinate reference system (CRS).
Map canvas is a class for displaying all GIS data types on a canvas.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
QgsCoordinateReferenceSystem destinationCrs() const
Returns the destination coordinate reference system for the map render.
QVariantMap decodeUri(const QString &providerKey, const QString &uri)
Breaks a provider data source URI into its component paths (e.g.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
QString encodeUri(const QString &providerKey, const QVariantMap &parts)
Reassembles a provider data source URI from its component paths (e.g.
A rectangle specified with double values.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.