Skip to content
Permalink
Browse files

Merge pull request #5684 from Gustry/provider_metadata

rename metadata() to htmlMetadata() in QgsRasterDataProvider
  • Loading branch information
nyalldawson committed Nov 21, 2017
2 parents 4bc4494 + 3734712 commit a29fad4408f8ed7c3767b563838236402a4b66e1
@@ -560,8 +560,8 @@ QgsAuthManager {#qgis_api_break_3_0_QgsAuthManager}
- getCertIdentity() was renamed to certIdentity()
- getCertIdentityBundle() was renamed to certIdentityBundle()
- getCertIdentityBundleToPem() was renamed to certIdentityBundleToPem()
- getCertIdentities() was renamed to certIdentities()
- getCertIdentityIds() was renamed to certIdentityIds()
- getCertIdentities() was renamed to certIdentities()
- getCertIdentityIds() was renamed to certIdentityIds()
- getSslCertCustomConfig() was renamed to sslCertCustomConfig()
- getSslCertCustomConfigByHost() was renamed to sslCertCustomConfigByHost()
- getSslCertCustomConfigs() was renamed to sslCertCustomConfigs()
@@ -573,8 +573,8 @@ QgsAuthManager {#qgis_api_break_3_0_QgsAuthManager}
- getMappedDatabaseCAs() was renamed to mappedDatabaseCAs()
- getCaCertsCache() was renamed to caCertsCache()
- getCertTrustPolicy() was renamed to certTrustPolicy()
- getCertificateTrustPolicy() was renamed to certificateTrustPolicy()
- getCertTrustCache() was renamed to certTrustCache()
- getCertificateTrustPolicy() was renamed to certificateTrustPolicy()
- getCertTrustCache() was renamed to certTrustCache()
- getTrustedCaCerts() was renamed to trustedCaCerts()
- getUntrustedCaCerts() was renamed to untrustedCaCerts()
- getTrustedCaCertsCache() was renamed to trustedCaCertsCache()
@@ -1406,7 +1406,7 @@ QgsGraphEdge {#qgis_api_break_3_0_QgsGraphEdge}
------------

- outVertex() was renamed as toVertex() (yes, the original name was the opposite of the returned value!)
- inVertex() was renamed as fromVertex() (yes, the original name was the opposite of the returned value!)
- inVertex() was renamed as fromVertex() (yes, the original name was the opposite of the returned value!)


QgsGraphVertex {#qgis_api_break_3_0_QgsGraphVertex}
@@ -1669,7 +1669,7 @@ screenUpdateRequested() were removed. These members have had no effect for a num
- readStyle() and writeStyle() expect QgsReadWriteContext reference as the last argument
- readXml() and writeXml() expect QgsReadWriteContext reference as the last argument
- the invalidTransformInput() slot was removed - calling this slot had no effect
- metadata() was renamed to htmlMetadata()
- metadata() was renamed to htmlMetadata() in both QgsMapLayer and QgsRasterDataProvider
- setMaximumScale() and setMinimumScale(), maximumScale() and minimumScale() had the opposite meaning to other min/max scales in the API, and their definitions have now been swapped. setMaximumScale
now sets the maximum (i.e. largest scale, or most zoomed in) at which the layer will appear, and setMinimumScale now sets the minimum (i.e. smallest scale,
or most zoomed out) at which the layer will appear. The same is true for the maximumScale and minimumScale getters.
@@ -227,7 +227,7 @@ Get list of user no data value ranges
:rtype: bool
%End

virtual QString metadata() = 0;
virtual QString htmlMetadata() = 0;
%Docstring
Get metadata in a format suitable for feeding directly
into a subset of the GUI raster properties "Metadata" tab.
@@ -258,7 +258,7 @@ QString QgsRasterDataProvider::makeTableCells( QStringList const &values )
return s;
} // makeTableCell_

QString QgsRasterDataProvider::metadata()
QString QgsRasterDataProvider::htmlMetadata()
{
QString s;
return s;
@@ -300,7 +300,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
* Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab.
*/
virtual QString metadata() = 0;
virtual QString htmlMetadata() = 0;

/**
* \brief Identify raster value(s) found on the point position. The context
@@ -237,7 +237,7 @@ static inline QString dumpVariantMap( const QVariantMap &variantMap, const QStri
return result;
}

QString QgsAmsProvider::metadata()
QString QgsAmsProvider::htmlMetadata()
{
return dumpVariantMap( mServiceInfo, tr( "Service Info" ) ) + dumpVariantMap( mLayerInfo, tr( "Layer Info" ) );
}
@@ -79,7 +79,7 @@ class QgsAmsProvider : public QgsRasterDataProvider
Qgis::DataType dataType( int /*bandNo*/ ) const override { return Qgis::ARGB32; }
Qgis::DataType sourceDataType( int /*bandNo*/ ) const override { return Qgis::ARGB32; }
QgsRasterInterface *clone() const override;
QString metadata() override;
QString htmlMetadata() override;
bool supportsLegendGraphic() const override { return true; }
QImage getLegendGraphic( double scale = 0, bool forceRefresh = false, const QgsRectangle *visibleExtent = 0 ) override;
QgsImageFetcher *getLegendGraphicFetcher( const QgsMapSettings *mapSettings ) override;
@@ -474,7 +474,7 @@ void QgsGdalProvider::closeDataset()
mGdalDataset = nullptr;
}

QString QgsGdalProvider::metadata()
QString QgsGdalProvider::htmlMetadata()
{
QMutexLocker locker( mpMutex );
if ( !initIfNeeded() )
@@ -113,7 +113,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
double bandScale( int bandNo ) const override;
double bandOffset( int bandNo ) const override;
QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo )const override;
QString metadata() override;
QString htmlMetadata() override;
QStringList subLayers() const override;
static QStringList subLayers( GDALDatasetH dataset );

@@ -1230,7 +1230,7 @@ QString QgsWcsProvider::coverageMetadata( const QgsWcsCoverageSummary &coverage
return metadata;
}

QString QgsWcsProvider::metadata()
QString QgsWcsProvider::htmlMetadata()
{
QString metadata;

@@ -173,7 +173,7 @@ class QgsWcsProvider : public QgsRasterDataProvider, QgsGdalProviderBase
int yBlockSize() const override;
int xSize() const override;
int ySize() const override;
QString metadata() override;
QString htmlMetadata() override;
QgsRasterIdentifyResult identify( const QgsPointXY &point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override;
QString lastErrorTitle() override;
QString lastError() override;
@@ -1848,7 +1848,7 @@ QString QgsWmsProvider::layerMetadata( QgsWmsLayerProperty &layer )
return metadata;
}

QString QgsWmsProvider::metadata()
QString QgsWmsProvider::htmlMetadata()
{
QString metadata;

@@ -200,7 +200,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
Qgis::DataType dataType( int bandNo ) const override;
Qgis::DataType sourceDataType( int bandNo ) const override;
int bandCount() const override;
QString metadata() override;
QString htmlMetadata() override;
QgsRasterIdentifyResult identify( const QgsPointXY &point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override;
QString lastErrorTitle() override;
QString lastError() override;
@@ -115,7 +115,7 @@ bool TestQgsRasterFileWriter::writeTest( const QString &rasterName )

std::unique_ptr<QgsRasterLayer> mpRasterLayer( new QgsRasterLayer( myRasterFileInfo.filePath(),
myRasterFileInfo.completeBaseName() ) );
qDebug() << rasterName << " metadata: " << mpRasterLayer->dataProvider()->metadata();
qDebug() << rasterName << " metadata: " << mpRasterLayer->dataProvider()->htmlMetadata();

if ( !mpRasterLayer->isValid() ) return false;

@@ -148,17 +148,17 @@ void TestQgsRasterLayer::initTestCase()
QFileInfo myRasterFileInfo( myFileName );
mpRasterLayer = new QgsRasterLayer( myRasterFileInfo.filePath(),
myRasterFileInfo.completeBaseName() );
qDebug() << "tenbyteraster metadata: " << mpRasterLayer->dataProvider()->metadata();
qDebug() << "tenbyteraster metadata: " << mpRasterLayer->dataProvider()->htmlMetadata();

QFileInfo myLandsatRasterFileInfo( myLandsatFileName );
mpLandsatRasterLayer = new QgsRasterLayer( myLandsatRasterFileInfo.filePath(),
myLandsatRasterFileInfo.completeBaseName() );
qDebug() << "landsat metadata: " << mpLandsatRasterLayer->dataProvider()->metadata();
qDebug() << "landsat metadata: " << mpLandsatRasterLayer->dataProvider()->htmlMetadata();

QFileInfo myFloat32RasterFileInfo( myFloat32FileName );
mpFloat32RasterLayer = new QgsRasterLayer( myFloat32RasterFileInfo.filePath(),
myFloat32RasterFileInfo.completeBaseName() );
qDebug() << "float32raster metadata: " << mpFloat32RasterLayer->dataProvider()->metadata();
qDebug() << "float32raster metadata: " << mpFloat32RasterLayer->dataProvider()->htmlMetadata();

QFileInfo pngRasterFileInfo( pngRasterFileName );
mPngRasterLayer = new QgsRasterLayer( pngRasterFileInfo.filePath(),
@@ -96,8 +96,8 @@ void TestQgsRasterSubLayer::initTestCase()
QFileInfo myRasterFileInfo( mFileName );
mpRasterLayer = new QgsRasterLayer( myRasterFileInfo.filePath(),
myRasterFileInfo.completeBaseName() );
qDebug() << "raster metadata: " << mpRasterLayer->dataProvider()->metadata();
mReport += "raster metadata: " + mpRasterLayer->dataProvider()->metadata();
qDebug() << "raster metadata: " << mpRasterLayer->dataProvider()->htmlMetadata();
mReport += "raster metadata: " + mpRasterLayer->dataProvider()->htmlMetadata();
}
else
{

0 comments on commit a29fad4

Please sign in to comment.
You can’t perform that action at this time.