Skip to content

Commit

Permalink
API cleanup for raster data provider
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9539 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 24, 2008
1 parent bb9c89a commit 6eb5e8c
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsrasterdataprovider.sip
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public:
* Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab.
*/
virtual QString getMetadata() = 0;
virtual QString metadata() = 0;

/**
* \brief Identify details from a server (e.g. WMS) from the last screen update
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsrasterlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public:
/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
void triggerRepaint();
/** \brief Obtain GDAL Metadata for this layer */
QString getMetadata();
QString metadata();
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the
* POTENTIAL pyramids that can be in a raster. To know which of the pyramid layers
* ACTUALLY exists you need to look at the existsFlag member in each struct stored in the
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ void QgsRasterLayerProperties::sync()
//populate the metadata tab's text browser widget with gdal metadata info
QString myStyle = QgsApplication::reportStyleSheet();
txtbMetadata->document()->setDefaultStyleSheet( myStyle );
txtbMetadata->setHtml( mRasterLayer->getMetadata() );
txtbMetadata->setHtml( mRasterLayer->metadata() );

} // QgsRasterLayerProperties::sync()

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

Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsvectorlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ void QgsVectorLayerProperties::reset( void )
QString myStyle = QgsApplication::reportStyleSheet();
teMetadata->clear();
teMetadata->document()->setDefaultStyleSheet( myStyle );
teMetadata->setHtml( getMetadata() );
teMetadata->setHtml( metadata() );
actionDialog->init();
labelDialog->init();
labelCheckBox->setChecked( layer->hasLabelsEnabled() );
Expand Down Expand Up @@ -478,7 +478,7 @@ void QgsVectorLayerProperties::apply()
QString myStyle = QgsApplication::reportStyleSheet();
teMetadata->clear();
teMetadata->document()->setDefaultStyleSheet( myStyle );
teMetadata->setHtml( getMetadata() );
teMetadata->setHtml( metadata() );
// update the extents of the layer (fetched from the provider)
layer->updateExtents();
}
Expand Down Expand Up @@ -655,7 +655,7 @@ void QgsVectorLayerProperties::on_pbnIndex_clicked()
}
}

QString QgsVectorLayerProperties::getMetadata()
QString QgsVectorLayerProperties::metadata()
{
QString myMetadata = "<html><body>";
myMetadata += "<table width=\"100%\">";
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
void reset();

/** Get metadata about the layer in nice formatted html */
QString getMetadata();
QString metadata();

/** Set transparency based on slider position */
void sliderTransparency_valueChanged( int theValue );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrasterdataprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
* Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab.
*/
virtual QString getMetadata() = 0;
virtual QString metadata() = 0;

/**
* \brief Identify details from a server (e.g. WMS) from the last screen update
Expand Down
12 changes: 6 additions & 6 deletions src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ bool QgsRasterLayer::readFile( QString const & fileName )

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

QString mySourceWkt = getProjectionWkt();

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

getMetadata();
metadata();

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



// convenience function for building getMetadata() HTML table cells
// convenience function for building metadata() HTML table cells
static
QString
makeTableCell_( QString const & value )
Expand All @@ -3020,7 +3020,7 @@ makeTableCell_( QString const & value )



// convenience function for building getMetadata() HTML table cells
// convenience function for building metadata() HTML table cells
static
QString
makeTableCells_( QStringList const & values )
Expand Down Expand Up @@ -3061,7 +3061,7 @@ cStringList2Q_( char ** stringList )



QString QgsRasterLayer::getMetadata()
QString QgsRasterLayer::metadata()
{
QString myMetadata ;
myMetadata += "<p class=\"glossy\">" + tr( "Driver:" ) + "</p>\n";
Expand All @@ -3081,7 +3081,7 @@ QString QgsRasterLayer::getMetadata()
if ( !mProviderKey.isEmpty() )
{
// Insert provider-specific (e.g. WMS-specific) metadata
myMetadata += mDataProvider->getMetadata();
myMetadata += mDataProvider->metadata();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
void triggerRepaint();
/** \brief Obtain GDAL Metadata for this layer */
QString getMetadata();
QString metadata();
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the
* POTENTIAL pyramids that can be in a raster. To know which of the pyramid layers
* ACTUALLY exists you need to look at the existsFlag member in each struct stored in the
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ int QgsWmsProvider::capabilities() const
}


QString QgsWmsProvider::getMetadata()
QString QgsWmsProvider::metadata()
{

QString myMetadataQString = "";
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
* Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab.
*/
QString getMetadata();
QString metadata();


/**
Expand Down

0 comments on commit 6eb5e8c

Please sign in to comment.