API cleanup for raster data provider

git-svn-id: http://svn.osgeo.org/qgis/trunk@9539 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2008-10-24 22:31:31 +00:00
parent bb9c89abbb
commit 6eb5e8ce1a
10 changed files with 18 additions and 18 deletions

View File

@ -81,7 +81,7 @@ public:
* Get metadata in a format suitable for feeding directly * Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab. * 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 * \brief Identify details from a server (e.g. WMS) from the last screen update

View File

@ -381,7 +381,7 @@ public:
/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */ /** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
void triggerRepaint(); void triggerRepaint();
/** \brief Obtain GDAL Metadata for this layer */ /** \brief Obtain GDAL Metadata for this layer */
QString getMetadata(); QString metadata();
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the /** \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 * 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 * ACTUALLY exists you need to look at the existsFlag member in each struct stored in the

View File

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

View File

@ -441,7 +441,7 @@ void QgsVectorLayerProperties::reset( void )
QString myStyle = QgsApplication::reportStyleSheet(); QString myStyle = QgsApplication::reportStyleSheet();
teMetadata->clear(); teMetadata->clear();
teMetadata->document()->setDefaultStyleSheet( myStyle ); teMetadata->document()->setDefaultStyleSheet( myStyle );
teMetadata->setHtml( getMetadata() ); teMetadata->setHtml( metadata() );
actionDialog->init(); actionDialog->init();
labelDialog->init(); labelDialog->init();
labelCheckBox->setChecked( layer->hasLabelsEnabled() ); labelCheckBox->setChecked( layer->hasLabelsEnabled() );
@ -478,7 +478,7 @@ void QgsVectorLayerProperties::apply()
QString myStyle = QgsApplication::reportStyleSheet(); QString myStyle = QgsApplication::reportStyleSheet();
teMetadata->clear(); teMetadata->clear();
teMetadata->document()->setDefaultStyleSheet( myStyle ); teMetadata->document()->setDefaultStyleSheet( myStyle );
teMetadata->setHtml( getMetadata() ); teMetadata->setHtml( metadata() );
// update the extents of the layer (fetched from the provider) // update the extents of the layer (fetched from the provider)
layer->updateExtents(); layer->updateExtents();
} }
@ -655,7 +655,7 @@ void QgsVectorLayerProperties::on_pbnIndex_clicked()
} }
} }
QString QgsVectorLayerProperties::getMetadata() QString QgsVectorLayerProperties::metadata()
{ {
QString myMetadata = "<html><body>"; QString myMetadata = "<html><body>";
myMetadata += "<table width=\"100%\">"; myMetadata += "<table width=\"100%\">";

View File

@ -66,7 +66,7 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
void reset(); void reset();
/** Get metadata about the layer in nice formatted html */ /** Get metadata about the layer in nice formatted html */
QString getMetadata(); QString metadata();
/** Set transparency based on slider position */ /** Set transparency based on slider position */
void sliderTransparency_valueChanged( int theValue ); void sliderTransparency_valueChanged( int theValue );

View File

@ -113,7 +113,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
* Get metadata in a format suitable for feeding directly * Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab. * 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 * \brief Identify details from a server (e.g. WMS) from the last screen update

View File

@ -441,7 +441,7 @@ bool QgsRasterLayer::readFile( QString const & fileName )
// Get the layer's projection info and set up the // Get the layer's projection info and set up the
// QgsCoordinateTransform for this layer // 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(); QString mySourceWkt = getProjectionWkt();
@ -462,7 +462,7 @@ bool QgsRasterLayer::readFile( QString const & fileName )
//that they match the coordinate system of this layer //that they match the coordinate system of this layer
QgsDebugMsg( "Layer registry has " + QString::number( QgsMapLayerRegistry::instance()->count() ) + "layers" ); QgsDebugMsg( "Layer registry has " + QString::number( QgsMapLayerRegistry::instance()->count() ) + "layers" );
getMetadata(); metadata();
// Use the affine transform to get geo coordinates for // Use the affine transform to get geo coordinates for
// the corners of the raster // the corners of the raster
@ -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 static
QString QString
makeTableCell_( QString const & value ) makeTableCell_( QString const & value )
@ -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 static
QString QString
makeTableCells_( QStringList const & values ) makeTableCells_( QStringList const & values )
@ -3061,7 +3061,7 @@ cStringList2Q_( char ** stringList )
QString QgsRasterLayer::getMetadata() QString QgsRasterLayer::metadata()
{ {
QString myMetadata ; QString myMetadata ;
myMetadata += "<p class=\"glossy\">" + tr( "Driver:" ) + "</p>\n"; myMetadata += "<p class=\"glossy\">" + tr( "Driver:" ) + "</p>\n";
@ -3081,7 +3081,7 @@ QString QgsRasterLayer::getMetadata()
if ( !mProviderKey.isEmpty() ) if ( !mProviderKey.isEmpty() )
{ {
// Insert provider-specific (e.g. WMS-specific) metadata // Insert provider-specific (e.g. WMS-specific) metadata
myMetadata += mDataProvider->getMetadata(); myMetadata += mDataProvider->metadata();
} }
else else
{ {

View File

@ -710,7 +710,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */ /** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
void triggerRepaint(); void triggerRepaint();
/** \brief Obtain GDAL Metadata for this layer */ /** \brief Obtain GDAL Metadata for this layer */
QString getMetadata(); QString metadata();
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the /** \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 * 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 * ACTUALLY exists you need to look at the existsFlag member in each struct stored in the

View File

@ -1823,7 +1823,7 @@ int QgsWmsProvider::capabilities() const
} }
QString QgsWmsProvider::getMetadata() QString QgsWmsProvider::metadata()
{ {
QString myMetadataQString = ""; QString myMetadataQString = "";

View File

@ -496,7 +496,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
* Get metadata in a format suitable for feeding directly * Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab. * into a subset of the GUI raster properties "Metadata" tab.
*/ */
QString getMetadata(); QString metadata();
/** /**