Skip to content

Commit c9d5a58

Browse files
author
timlinux
committed
API cleanup for raster data provider
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9539 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c14bf13 commit c9d5a58

10 files changed

+18
-18
lines changed

python/core/qgsrasterdataprovider.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public:
8181
* Get metadata in a format suitable for feeding directly
8282
* into a subset of the GUI raster properties "Metadata" tab.
8383
*/
84-
virtual QString getMetadata() = 0;
84+
virtual QString metadata() = 0;
8585

8686
/**
8787
* \brief Identify details from a server (e.g. WMS) from the last screen update

python/core/qgsrasterlayer.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public:
381381
/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
382382
void triggerRepaint();
383383
/** \brief Obtain GDAL Metadata for this layer */
384-
QString getMetadata();
384+
QString metadata();
385385
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the
386386
* POTENTIAL pyramids that can be in a raster. To know which of the pyramid layers
387387
* ACTUALLY exists you need to look at the existsFlag member in each struct stored in the

src/app/qgsrasterlayerproperties.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ void QgsRasterLayerProperties::sync()
833833
//populate the metadata tab's text browser widget with gdal metadata info
834834
QString myStyle = QgsApplication::reportStyleSheet();
835835
txtbMetadata->document()->setDefaultStyleSheet( myStyle );
836-
txtbMetadata->setHtml( mRasterLayer->getMetadata() );
836+
txtbMetadata->setHtml( mRasterLayer->metadata() );
837837

838838
} // QgsRasterLayerProperties::sync()
839839

@@ -1629,7 +1629,7 @@ void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
16291629
pixmapLegend->repaint();
16301630
//populate the metadata tab's text browser widget with gdal metadata info
16311631
QString myStyle = QgsApplication::reportStyleSheet();
1632-
txtbMetadata->setHtml( mRasterLayer->getMetadata() );
1632+
txtbMetadata->setHtml( mRasterLayer->metadata() );
16331633
txtbMetadata->document()->setDefaultStyleSheet( myStyle );
16341634
}
16351635

src/app/qgsvectorlayerproperties.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ void QgsVectorLayerProperties::reset( void )
441441
QString myStyle = QgsApplication::reportStyleSheet();
442442
teMetadata->clear();
443443
teMetadata->document()->setDefaultStyleSheet( myStyle );
444-
teMetadata->setHtml( getMetadata() );
444+
teMetadata->setHtml( metadata() );
445445
actionDialog->init();
446446
labelDialog->init();
447447
labelCheckBox->setChecked( layer->hasLabelsEnabled() );
@@ -478,7 +478,7 @@ void QgsVectorLayerProperties::apply()
478478
QString myStyle = QgsApplication::reportStyleSheet();
479479
teMetadata->clear();
480480
teMetadata->document()->setDefaultStyleSheet( myStyle );
481-
teMetadata->setHtml( getMetadata() );
481+
teMetadata->setHtml( metadata() );
482482
// update the extents of the layer (fetched from the provider)
483483
layer->updateExtents();
484484
}
@@ -655,7 +655,7 @@ void QgsVectorLayerProperties::on_pbnIndex_clicked()
655655
}
656656
}
657657

658-
QString QgsVectorLayerProperties::getMetadata()
658+
QString QgsVectorLayerProperties::metadata()
659659
{
660660
QString myMetadata = "<html><body>";
661661
myMetadata += "<table width=\"100%\">";

src/app/qgsvectorlayerproperties.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
6666
void reset();
6767

6868
/** Get metadata about the layer in nice formatted html */
69-
QString getMetadata();
69+
QString metadata();
7070

7171
/** Set transparency based on slider position */
7272
void sliderTransparency_valueChanged( int theValue );

src/core/qgsrasterdataprovider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
113113
* Get metadata in a format suitable for feeding directly
114114
* into a subset of the GUI raster properties "Metadata" tab.
115115
*/
116-
virtual QString getMetadata() = 0;
116+
virtual QString metadata() = 0;
117117

118118
/**
119119
* \brief Identify details from a server (e.g. WMS) from the last screen update

src/core/raster/qgsrasterlayer.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ bool QgsRasterLayer::readFile( QString const & fileName )
441441

442442
// Get the layer's projection info and set up the
443443
// QgsCoordinateTransform for this layer
444-
// NOTE: we must do this before getMetadata is called
444+
// NOTE: we must do this before metadata is called
445445

446446
QString mySourceWkt = getProjectionWkt();
447447

@@ -462,7 +462,7 @@ bool QgsRasterLayer::readFile( QString const & fileName )
462462
//that they match the coordinate system of this layer
463463
QgsDebugMsg( "Layer registry has " + QString::number( QgsMapLayerRegistry::instance()->count() ) + "layers" );
464464

465-
getMetadata();
465+
metadata();
466466

467467
// Use the affine transform to get geo coordinates for
468468
// the corners of the raster
@@ -3010,7 +3010,7 @@ void QgsRasterLayer::updateProgress( int theProgress, int theMax )
30103010

30113011

30123012

3013-
// convenience function for building getMetadata() HTML table cells
3013+
// convenience function for building metadata() HTML table cells
30143014
static
30153015
QString
30163016
makeTableCell_( QString const & value )
@@ -3020,7 +3020,7 @@ makeTableCell_( QString const & value )
30203020

30213021

30223022

3023-
// convenience function for building getMetadata() HTML table cells
3023+
// convenience function for building metadata() HTML table cells
30243024
static
30253025
QString
30263026
makeTableCells_( QStringList const & values )
@@ -3061,7 +3061,7 @@ cStringList2Q_( char ** stringList )
30613061

30623062

30633063

3064-
QString QgsRasterLayer::getMetadata()
3064+
QString QgsRasterLayer::metadata()
30653065
{
30663066
QString myMetadata ;
30673067
myMetadata += "<p class=\"glossy\">" + tr( "Driver:" ) + "</p>\n";
@@ -3081,7 +3081,7 @@ QString QgsRasterLayer::getMetadata()
30813081
if ( !mProviderKey.isEmpty() )
30823082
{
30833083
// Insert provider-specific (e.g. WMS-specific) metadata
3084-
myMetadata += mDataProvider->getMetadata();
3084+
myMetadata += mDataProvider->metadata();
30853085
}
30863086
else
30873087
{

src/core/raster/qgsrasterlayer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
710710
/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
711711
void triggerRepaint();
712712
/** \brief Obtain GDAL Metadata for this layer */
713-
QString getMetadata();
713+
QString metadata();
714714
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the
715715
* POTENTIAL pyramids that can be in a raster. To know which of the pyramid layers
716716
* ACTUALLY exists you need to look at the existsFlag member in each struct stored in the

src/providers/wms/qgswmsprovider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,7 @@ int QgsWmsProvider::capabilities() const
18231823
}
18241824

18251825

1826-
QString QgsWmsProvider::getMetadata()
1826+
QString QgsWmsProvider::metadata()
18271827
{
18281828

18291829
QString myMetadataQString = "";

src/providers/wms/qgswmsprovider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
496496
* Get metadata in a format suitable for feeding directly
497497
* into a subset of the GUI raster properties "Metadata" tab.
498498
*/
499-
QString getMetadata();
499+
QString metadata();
500500

501501

502502
/**

0 commit comments

Comments
 (0)