[QGIS Commit] r9611 - in trunk/qgis/src: app core core/raster
core/symbology gui providers/wms
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Nov 9 05:34:04 EST 2008
Author: jef
Date: 2008-11-09 05:34:03 -0500 (Sun, 09 Nov 2008)
New Revision: 9611
Modified:
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgsmaptoolmovefeature.cpp
trunk/qgis/src/app/qgspluginmanager.cpp
trunk/qgis/src/app/qgspluginregistry.cpp
trunk/qgis/src/app/qgspluginregistry.h
trunk/qgis/src/app/qgspythondialog.cpp
trunk/qgis/src/core/qgsgeometry.h
trunk/qgis/src/core/qgshttptransaction.cpp
trunk/qgis/src/core/qgslabel.cpp
trunk/qgis/src/core/qgslabel.h
trunk/qgis/src/core/qgsvectorlayer.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.h
trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
trunk/qgis/src/core/symbology/qgssymbol.cpp
trunk/qgis/src/gui/qgisinterface.h
trunk/qgis/src/gui/qgsmapcanvas.cpp
trunk/qgis/src/gui/qgsquickprint.cpp
trunk/qgis/src/gui/qgsrubberband.cpp
trunk/qgis/src/providers/wms/qgswmsprovider.cpp
Log:
automatic indentation update (r9447-r9610)
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -1847,7 +1847,7 @@
{
QString myFullPath = thePluginDirString + "/" + myPluginDir[i];
- QString baseName = QFileInfo(myFullPath).baseName();
+ QString baseName = QFileInfo( myFullPath ).baseName();
QLibrary *myLib = new QLibrary( myFullPath );
bool loaded = myLib->load();
if ( loaded )
@@ -1859,7 +1859,7 @@
if ( myName && myDescription && myVersion )
{
//check if the plugin was active on last session
-
+
// Windows stores a "true" value as a 1 in the registry so we
// have to use readBoolEntry in this function
@@ -4210,9 +4210,9 @@
QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
-
+
// is loaded already?
- if ( ! pRegistry->isLoaded(packageName) )
+ if ( ! pRegistry->isLoaded( packageName ) )
{
mPythonUtils->loadPlugin( packageName );
mPythonUtils->startPlugin( packageName );
@@ -4220,7 +4220,7 @@
// TODO: test success
// add to plugin registry
- pRegistry->addPlugin( packageName, QgsPluginMetadata( packageName, pluginName, NULL, true) );
+ pRegistry->addPlugin( packageName, QgsPluginMetadata( packageName, pluginName, NULL, true ) );
// add to settings
QSettings settings;
@@ -4236,10 +4236,10 @@
QSettings settings;
// first check to see if its already loaded
QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
-
- QString baseName = QFileInfo(theFullPathName).baseName();
-
- if ( pRegistry->isLoaded(baseName) )
+
+ QString baseName = QFileInfo( theFullPathName ).baseName();
+
+ if ( pRegistry->isLoaded( baseName ) )
{
// plugin is loaded
// QMessageBox::warning(this, "Already Loaded", description + " is already loaded");
@@ -4272,7 +4272,7 @@
{
pl->initGui();
// add it to the plugin registry
- pRegistry->addPlugin(baseName, QgsPluginMetadata(myLib->fileName(), name, pl) );
+ pRegistry->addPlugin( baseName, QgsPluginMetadata( myLib->fileName(), name, pl ) );
//add it to the qsettings file [ts]
settings.setValue( "/Plugins/" + baseName, true );
}
Modified: trunk/qgis/src/app/qgsmaptoolmovefeature.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolmovefeature.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/app/qgsmaptoolmovefeature.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -73,7 +73,7 @@
QSettings settings;
double searchRadius = settings.value( "/qgis/digitizing/search_radius_vertex_edit", 10 ).toDouble();
QgsRectangle selectRect( layerCoords.x() - searchRadius, layerCoords.y() - searchRadius,
- layerCoords.x() + searchRadius, layerCoords.y() + searchRadius );
+ layerCoords.x() + searchRadius, layerCoords.y() + searchRadius );
vlayer->select( QgsAttributeList(), selectRect, true );
Modified: trunk/qgis/src/app/qgspluginmanager.cpp
===================================================================
--- trunk/qgis/src/app/qgspluginmanager.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/app/qgspluginmanager.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -167,7 +167,7 @@
// check to see if the plugin is loaded and set the checkbox accordingly
QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
- if ( pRegistry->isLoaded(packageName) && pRegistry->isPythonPlugin(packageName) )
+ if ( pRegistry->isLoaded( packageName ) && pRegistry->isPythonPlugin( packageName ) )
{
QgsDebugMsg( "Found plugin in the registry" );
// set the checkbox
@@ -293,11 +293,11 @@
delete myLib;
continue;
}
-
+
QString pluginName = pName();
QString pluginDesc = pDesc();
QString pluginVersion = pVersion();
- QString baseName = QFileInfo(lib).baseName();
+ QString baseName = QFileInfo( lib ).baseName();
QString myLibraryName = pluginDir[i];
// filtering will be done on the display role so give it name and desription
@@ -318,7 +318,7 @@
QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
// get the library using the plugin description
- if ( !pRegistry->isLoaded(baseName) )
+ if ( !pRegistry->isLoaded( baseName ) )
{
QgsDebugMsg( "Couldn't find plugin in the registry" );
}
@@ -326,7 +326,7 @@
{
QgsDebugMsg( "Found plugin in the registry" );
// TODO: this check shouldn't be necessary, plugin base names must be unique
- if ( pRegistry->library(baseName) == myLib->fileName() )
+ if ( pRegistry->library( baseName ) == myLib->fileName() )
{
// set the checkbox
myData.setChecked( true );
@@ -363,12 +363,12 @@
myIndex = mModelPlugins->index( row, 0 );
// its off -- see if it is loaded and if so, unload it
QgsPluginRegistry *pRegistry = QgsPluginRegistry::instance();
-
+
// is loaded?
QString baseName = mModelPlugins->data( myIndex, PLUGIN_BASE_NAME_ROLE ).toString();
if ( ! pRegistry->isLoaded( baseName ) )
continue;
-
+
if ( pRegistry->isPythonPlugin( baseName ) )
{
if ( mPythonUtils && mPythonUtils->isEnabled() )
@@ -471,10 +471,10 @@
// the index row in the underlying model so we need to jump through this
// little hoop to get the correct item
//
-
- QModelIndex realIndex = mModelProxy->mapToSource(theIndex);
- QStandardItem* mypItem = mModelPlugins->itemFromIndex(realIndex);
- QgsDetailedItemData myData =
+
+ QModelIndex realIndex = mModelProxy->mapToSource( theIndex );
+ QStandardItem* mypItem = mModelPlugins->itemFromIndex( realIndex );
+ QgsDetailedItemData myData =
qVariantValue<QgsDetailedItemData>( mypItem->data( PLUGIN_DATA_ROLE ) );
if ( myData.isChecked() )
{
Modified: trunk/qgis/src/app/qgspluginregistry.cpp
===================================================================
--- trunk/qgis/src/app/qgspluginregistry.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/app/qgspluginregistry.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -46,62 +46,62 @@
bool QgsPluginRegistry::isLoaded( QString key )
{
- QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find(key);
- return (it != mPlugins.end());
+ QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find( key );
+ return ( it != mPlugins.end() );
}
QString QgsPluginRegistry::library( QString key )
{
- QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find(key);
- if (it == mPlugins.end())
+ QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find( key );
+ if ( it == mPlugins.end() )
return QString();
-
+
return it->library();
}
QgisPlugin *QgsPluginRegistry::plugin( QString key )
{
- QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find(key);
- if (it == mPlugins.end())
+ QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find( key );
+ if ( it == mPlugins.end() )
return NULL;
-
+
return it->plugin();
}
bool QgsPluginRegistry::isPythonPlugin( QString key )
{
- QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find(key);
- if (it == mPlugins.end())
+ QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find( key );
+ if ( it == mPlugins.end() )
return false;
return it->isPython();
}
void QgsPluginRegistry::addPlugin( QString key, QgsPluginMetadata metadata )
{
- mPlugins.insert(key, metadata);
+ mPlugins.insert( key, metadata );
}
void QgsPluginRegistry::dump()
{
- QgsDebugMsg("PLUGINS IN REGISTRY: key -> (name, library, isPython)");
+ QgsDebugMsg( "PLUGINS IN REGISTRY: key -> (name, library, isPython)" );
for ( QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.begin();
it != mPlugins.end();
it++ )
{
- QgsDebugMsg(QString("PLUGIN: %1 -> (%2, %3, %4)")
- .arg(it.key())
- .arg(it->name())
- .arg(it->library())
- .arg(it->isPython()));
+ QgsDebugMsg( QString( "PLUGIN: %1 -> (%2, %3, %4)" )
+ .arg( it.key() )
+ .arg( it->name() )
+ .arg( it->library() )
+ .arg( it->isPython() ) );
}
}
void QgsPluginRegistry::removePlugin( QString key )
{
- QgsDebugMsg("removing plugin: "+key);
- QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find(key);
- if (it != mPlugins.end())
+ QgsDebugMsg( "removing plugin: " + key );
+ QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.find( key );
+ if ( it != mPlugins.end() )
{
mPlugins.erase( it );
}
@@ -113,10 +113,10 @@
it != mPlugins.end();
it++ )
{
- if (isPythonPlugin(it.key()))
+ if ( isPythonPlugin( it.key() ) )
{
- if (mPythonUtils)
- mPythonUtils->unloadPlugin(it->library());
+ if ( mPythonUtils )
+ mPythonUtils->unloadPlugin( it->library() );
else
QgsDebugMsg( "warning: python utils is NULL" );
}
@@ -125,7 +125,7 @@
if ( it->plugin() )
it->plugin()->unload();
else
- QgsDebugMsg("warning: plugin is NULL:" + it.key());
+ QgsDebugMsg( "warning: plugin is NULL:" + it.key() );
}
}
}
Modified: trunk/qgis/src/app/qgspluginregistry.h
===================================================================
--- trunk/qgis/src/app/qgspluginregistry.h 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/app/qgspluginregistry.h 2008-11-09 10:34:03 UTC (rev 9611)
@@ -41,38 +41,38 @@
public:
//! Returns the instance pointer, creating the object on the first call
static QgsPluginRegistry* instance();
-
+
//! Check whether this module is loaded
bool isLoaded( QString key );
-
+
//! Retrieve library of the plugin
QString library( QString key );
-
+
//! Retrieve a pointer to a loaded plugin
QgisPlugin * plugin( QString key );
-
+
//! Return whether the plugin is pythonic
bool isPythonPlugin( QString key );
-
+
//! Add a plugin to the map of loaded plugins
void addPlugin( QString key, QgsPluginMetadata metadata );
-
+
//! Remove a plugin from the list of loaded plugins
void removePlugin( QString key );
-
+
//! Unload plugins
void unloadAll();
-
+
//! Save pointer for python utils (needed for unloading python plugins)
void setPythonUtils( QgsPythonUtils* pythonUtils );
-
+
//! Dump list of plugins
void dump();
-
+
protected:
//! protected constructor
QgsPluginRegistry();
-
+
private:
static QgsPluginRegistry* _instance;
QMap<QString, QgsPluginMetadata> mPlugins;
Modified: trunk/qgis/src/app/qgspythondialog.cpp
===================================================================
--- trunk/qgis/src/app/qgspythondialog.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/app/qgspythondialog.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -45,34 +45,34 @@
void QgsPythonDialog::keyPressEvent( QKeyEvent *ev )
{
- switch( ev->key() )
+ switch ( ev->key() )
{
- case Qt::Key_Up:
+ case Qt::Key_Up:
{
- if(pos>0)
+ if ( pos > 0 )
{
- if( pos==history.size() )
+ if ( pos == history.size() )
history << edtCmdLine->text();
else
history[pos] = edtCmdLine->text();
pos--;
- edtCmdLine->setText(history[pos]);
+ edtCmdLine->setText( history[pos] );
}
}
break;
- case Qt::Key_Down:
+ case Qt::Key_Down:
{
- if( pos<history.size()-1 )
+ if ( pos < history.size() - 1 )
{
history[pos] = edtCmdLine->text();
pos++;
- edtCmdLine->setText(history[pos]);
+ edtCmdLine->setText( history[pos] );
}
}
break;
- default:
- QWidget::keyPressEvent(ev);
- break;
+ default:
+ QWidget::keyPressEvent( ev );
+ break;
}
}
@@ -80,7 +80,7 @@
{
QString command = edtCmdLine->text();
- if( !command.isEmpty() )
+ if ( !command.isEmpty() )
{
history << command;
pos = history.size();
Modified: trunk/qgis/src/core/qgsgeometry.h
===================================================================
--- trunk/qgis/src/core/qgsgeometry.h 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/qgsgeometry.h 2008-11-09 10:34:03 UTC (rev 9611)
@@ -276,8 +276,8 @@
/** Returns a geometry representing the points shared by this geometry and other. */
QgsGeometry* intersection( QgsGeometry* geometry );
- /** Returns a geometry representing all the points in this geometry and other (a
- * union geometry operation).
+ /** Returns a geometry representing all the points in this geometry and other (a
+ * union geometry operation).
* @note this operation is not called union since its a reserved word in C++.*/
QgsGeometry* combine( QgsGeometry* geometry );
Modified: trunk/qgis/src/core/qgshttptransaction.cpp
===================================================================
--- trunk/qgis/src/core/qgshttptransaction.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/qgshttptransaction.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -78,13 +78,13 @@
QUrl qurl( httpurl );
- http = new QHttp( );
+ http = new QHttp( );
// Create a header so we can set the user agent (Per WMS RFC).
- QHttpRequestHeader header("GET", qurl.host());
+ QHttpRequestHeader header( "GET", qurl.host() );
// Set host in the header
header.setValue( "Host", qurl.host() );
// Set the user agent to Quantum GIS plus the version name
- header.setValue( "User-agent", QString("Quantum GIS - ") + VERSION );
+ header.setValue( "User-agent", QString( "Quantum GIS - " ) + VERSION );
// Set the host in the QHttp object
http->setHost( qurl.host(), qurl.port( HTTP_PORT_DEFAULT ) );
@@ -113,7 +113,7 @@
// includes the scheme, host and port (the
// http://www.address.bit:80), so remove that from the url before
// executing an http GET.
- //
+ //
// gsherman 2008-10-24 - Not sure if the above still holds true. Commenting
// out the removal for testing purposes
// QString pathAndQuery = httpurl.remove( 0,
@@ -122,15 +122,15 @@
if ( !postData ) //do request with HTTP GET
{
- header.setRequest("GET", httpurl);
+ header.setRequest( "GET", httpurl );
// do GET using header containing user-agent
- httpid = http->request(header);
+ httpid = http->request( header );
}
else //do request with HTTP POST
{
- header.setRequest("POST", httpurl);
+ header.setRequest( "POST", httpurl );
// do POST using header containing user-agent
- httpid = http->request(header, *postData);
+ httpid = http->request( header, *postData );
}
connect( http, SIGNAL( requestStarted( int ) ),
@@ -412,21 +412,21 @@
QgsDebugMsg( "A host name lookup is in progress." );
emit statusChanged( QString( QObject::tr( "Looking up '%1'" ) )
- .arg( httphost ) );
+ .arg( httphost ) );
break;
case QHttp::Connecting:
QgsDebugMsg( "An attempt to connect to the host is in progress." );
emit statusChanged( QString( QObject::tr( "Connecting to '%1'" ) )
- .arg( httphost ) );
+ .arg( httphost ) );
break;
case QHttp::Sending:
QgsDebugMsg( "The client is sending its request to the server." );
emit statusChanged( QString( QObject::tr( "Sending request '%1'" ) )
- .arg( httpurl ) );
+ .arg( httpurl ) );
break;
case QHttp::Reading:
Modified: trunk/qgis/src/core/qgslabel.cpp
===================================================================
--- trunk/qgis/src/core/qgslabel.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/qgslabel.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -155,7 +155,7 @@
double sizeMM = size * 0.3527;
size = sizeMM * sizeScale;
}
-
+
//Request font larger (multiplied by rasterScaleFactor) as a workaround for the Qt font bug
//and scale the painter down by rasterScaleFactor when drawing the label
size *= rasterScaleFactor;
@@ -402,13 +402,13 @@
x = x + xoffset * cos( rad ) - yoffset * sin( rad );
y = y - xoffset * sin( rad ) - yoffset * cos( rad );
-
+
painter->save();
painter->setFont( font );
painter->translate( x, y );
//correct oversampled font size back by scaling painter down
- painter->scale(1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor);
+ painter->scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor );
painter->rotate( -ang );
//
Modified: trunk/qgis/src/core/qgslabel.h
===================================================================
--- trunk/qgis/src/core/qgslabel.h 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/qgslabel.h 2008-11-09 10:34:03 UTC (rev 9611)
@@ -88,7 +88,7 @@
void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
const QgsCoordinateTransform* coordinateTransform,
const QgsMapToPixel *transform,
- QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0, double sizeScale = 1., double rasterScaleFactor = 1.0);
+ QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0, double sizeScale = 1., double rasterScaleFactor = 1.0 );
/** Reads the renderer configuration from an XML file
@param rnode the Dom node to read
@@ -134,7 +134,7 @@
int dx, int dy,
double xoffset, double yoffset,
double ang,
- int width, int height, int alignment, double sizeScale = 1.0, double rasterScaleFactor = 1.0);
+ int width, int height, int alignment, double sizeScale = 1.0, double rasterScaleFactor = 1.0 );
/** Get label point for simple feature in map units */
void labelPoint( std::vector<QgsPoint>&, QgsFeature &feature );
Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -309,7 +309,7 @@
if ( mRenderer->willRenderFeature( &fet ) )
{
bool sel = mSelectedFeatureIds.contains( fet.id() );
- mLabel->renderLabel( rendererContext.painter(), rendererContext.extent(), rendererContext.coordinateTransform(), &(rendererContext.mapToPixel()), fet, sel, 0, rendererContext.scaleFactor(), rendererContext.rasterScaleFactor());
+ mLabel->renderLabel( rendererContext.painter(), rendererContext.extent(), rendererContext.coordinateTransform(), &( rendererContext.mapToPixel() ), fet, sel, 0, rendererContext.scaleFactor(), rendererContext.rasterScaleFactor() );
}
featureCount++;
}
@@ -3127,7 +3127,7 @@
QList<QgsFeature> featureList;
QgsRectangle searchRect( startPoint.x() - snappingTolerance, startPoint.y() - snappingTolerance,
- startPoint.x() + snappingTolerance, startPoint.y() + snappingTolerance );
+ startPoint.x() + snappingTolerance, startPoint.y() + snappingTolerance );
double sqrSnappingTolerance = snappingTolerance * snappingTolerance;
select( QgsAttributeList(), searchRect, true, true );
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -889,7 +889,7 @@
}
myRasterBandStats.sumOfSquares += static_cast < double >
- ( pow( my - myRasterBandStats.mean, 2 ) );
+ ( pow( my - myRasterBandStats.mean, 2 ) );
}
}
} //end of column wise loop
@@ -1203,7 +1203,7 @@
*/
void QgsRasterLayer::computeMinimumMaximumEstimates( int theBand, double* theMinMax )
{
- if( 0 == theMinMax ) { return; }
+ if ( 0 == theMinMax ) { return; }
if ( 0 < theBand && theBand <= ( int ) bandCount() )
{
@@ -1229,7 +1229,7 @@
{
if ( 0 < theBand && theBand <= bandCount() )
{
- return &mContrastEnhancementList[theBand - 1];
+ return &mContrastEnhancementList[theBand - 1];
}
return 0;
@@ -1504,7 +1504,7 @@
//Set the transparency for the whole layer
QImage myAlphaChannel( image->width(), image->height(), QImage::Format_Indexed8 );
- myAlphaChannel.fill( ( uint ) mTransparencyLevel );
+ myAlphaChannel.fill(( uint ) mTransparencyLevel );
image->setAlphaChannel( myAlphaChannel );
// Since GDAL's RasterIO can't handle floating point, we have to round to
@@ -1873,7 +1873,7 @@
return mErrorCaption;
}
-/**
+/**
* This is an overloaded version of the legendAsPixmap( bool ) assumes false for the legend name flag.
* @return a pixmap representing a legend image
*/
@@ -3185,7 +3185,7 @@
setColorShadingAlgorithm( UndefinedShader );
}
-void QgsRasterLayer::setContrastEnhancementAlgorithm( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, bool theGenerateLookupTableFlag)
+void QgsRasterLayer::setContrastEnhancementAlgorithm( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, bool theGenerateLookupTableFlag )
{
QList<QgsContrastEnhancement>::iterator myIterator = mContrastEnhancementList.begin();
while ( myIterator != mContrastEnhancementList.end() )
@@ -3334,7 +3334,7 @@
}
}
-void QgsRasterLayer::setMinimumValue( QString theBand, double theValue, bool theGenerateLookupTableFlag )
+void QgsRasterLayer::setMinimumValue( QString theBand, double theValue, bool theGenerateLookupTableFlag )
{
if ( theBand != tr( "Not Set" ) )
{
@@ -4506,7 +4506,7 @@
*/
void QgsRasterLayer::drawPalettedSingleBandPseudoColor( QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- const QgsMapToPixel* theQgsMapToPixel, int theBandNo)
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo )
{
QgsDebugMsg( "entered." );
//Invalid band number, segfault prevention
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.h 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.h 2008-11-09 10:34:03 UTC (rev 9611)
@@ -208,7 +208,7 @@
const QStringList & layers = QStringList(),
const QStringList & styles = QStringList(),
const QString & format = QString(),
- const QString & crs = QString());
+ const QString & crs = QString() );
/** \brief The destructor */
@@ -241,7 +241,7 @@
MultiBandSingleGandGray, // a layer containing 2 or more bands, but a single band drawn as a range of gray colors
MultiBandSingleBandPseudoColor, //a layer containing 2 or more bands, but a single band drawn using a pseudocolor algorithm
MultiBandColor //a layer containing 2 or more bands, mapped to RGB color space.
- //In the case of a multiband with only two bands, one band will be mapped to more than one color.
+ //In the case of a multiband with only two bands, one band will be mapped to more than one color.
};
/** \brief This enumerator describes the type of raster layer */
@@ -436,7 +436,7 @@
/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
void computeMinimumMaximumEstimates( int theBand, double* theMinMax );
-
+
/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );
@@ -681,9 +681,9 @@
/** \brief Drawing routine for multiband image, rendered as a single band image in pseudocolor */
void drawMultiBandSingleBandPseudoColor( QPainter * theQPainter,
- QgsRasterViewPort * theRasterViewPort,
- const QgsMapToPixel* theQgsMapToPixel,
- int theBandNoInt );
+ QgsRasterViewPort * theRasterViewPort,
+ const QgsMapToPixel* theQgsMapToPixel,
+ int theBandNoInt );
/** \brief Drawing routine for single band with a color map */
void drawPalettedSingleBandColor( QPainter * theQPainter,
@@ -701,7 +701,7 @@
void drawPalettedSingleBandPseudoColor( QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
const QgsMapToPixel* theQgsMapToPixel,
- int theBandNoInt);
+ int theBandNoInt );
/** \brief Drawing routine for paletted multiband image */
void drawPalettedMultiBandColor( QPainter * theQPainter,
@@ -742,7 +742,7 @@
/** \brief Read a raster value given position from memory block created by readData() */
inline double readValue( void *data, GDALDataType type, int index );
-
+
/** \brief Update the layer if it is outdated */
bool update();
@@ -794,7 +794,7 @@
/** \brief Pointer to the gdaldataset (possibly warped vrt) */
GDALDatasetH mGdalDataset;
- /** \brief Values for mapping pixel to world coordinates. Contents of this array are the same as the GDAL adfGeoTransform */
+ /** \brief Values for mapping pixel to world coordinates. Contents of this array are the same as the GDAL adfGeoTransform */
double mGeoTransform[6];
/** \brief The band to be associated with the grayscale only output - usually 1 */
Modified: trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -291,12 +291,12 @@
thepPainter->drawPolygon( pa );
}
- else if (name == "arrow")
+ else if ( name == "arrow" )
{
int oneEight = r / 4;
int quarter = r / 2;
- QPolygon pa(7);
+ QPolygon pa( 7 );
pa.setPoint( 0, x_c, y_c - r );
pa.setPoint( 1, x_c + quarter, y_c - quarter );
pa.setPoint( 2, x_c + oneEight, y_c - quarter );
@@ -304,7 +304,7 @@
pa.setPoint( 4, x_c - oneEight, y_c + r );
pa.setPoint( 5, x_c - oneEight, y_c - quarter );
pa.setPoint( 6, x_c - quarter, y_c - quarter );
- thepPainter->drawPolygon ( pa );
+ thepPainter->drawPolygon( pa );
}
thepPainter->end();
}
Modified: trunk/qgis/src/core/symbology/qgssymbol.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgssymbol.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/core/symbology/qgssymbol.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -333,13 +333,13 @@
double rotation, double rasterScaleFactor )
{
if ( 1.0 == ( scale * rasterScaleFactor ) && 0 == rotation )
+ {
+ if ( mWidthScale < 0 || widthScale == mWidthScale )
{
- if(mWidthScale < 0 || widthScale == mWidthScale)
- {
- // If scale is 1.0 and rotation 0.0, use cached image.
- return getCachedPointSymbolAsImage( widthScale, selected, selectionColor );
- }
+ // If scale is 1.0 and rotation 0.0, use cached image.
+ return getCachedPointSymbolAsImage( widthScale, selected, selectionColor );
}
+ }
QImage preRotateImage;
QPen pen = mPen;
Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/gui/qgisinterface.h 2008-11-09 10:34:03 UTC (rev 9611)
@@ -64,15 +64,15 @@
//! Zoom to full extent of map layers
virtual void zoomFull() = 0;
- //! Zoom to previous view extent
+ //! Zoom to previous view extent
virtual void zoomToPrevious() = 0;
-
+
//! Zoom to extent of the active layer
virtual void zoomToActiveLayer() = 0;
//! Add a vector layer
virtual QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey ) = 0;
-
+
//! Add a raster layer given a raster layer file name
virtual QgsRasterLayer* addRasterLayer( QString rasterLayerPath, QString baseName = QString() ) = 0;
@@ -93,10 +93,10 @@
//! Remove an action (icon) from the plugin toolbar
virtual void removeToolBarIcon( QAction *qAction ) = 0;
-
+
//! Add toolbar with specified name
virtual QToolBar * addToolBar( QString name ) = 0;
-
+
/** Return a pointer to the map canvas */
virtual QgsMapCanvas * mapCanvas() = 0;
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -275,7 +275,7 @@
QgsVectorLayer *isVectLyr = dynamic_cast < QgsVectorLayer * >( currentLayer );
if ( isVectLyr )
{
- connect( currentLayer, SIGNAL( selectionChanged() ), this, SLOT( selectionChangedSlot() ) );
+ connect( currentLayer, SIGNAL( selectionChanged() ), this, SLOT( selectionChangedSlot() ) );
}
}
}
@@ -453,7 +453,7 @@
{
QgsDebugMsg( "Empty extent - keeping old extent with new center!" );
QgsRectangle e( QgsPoint( r.center().x() - current.width() / 2.0, r.center().y() - current.height() / 2.0 ),
- QgsPoint( r.center().x() + current.width() / 2.0, r.center().y() + current.height() / 2.0 ) );
+ QgsPoint( r.center().x() + current.width() / 2.0, r.center().y() + current.height() / 2.0 ) );
mMapRenderer->setExtent( e );
}
else
@@ -1282,7 +1282,7 @@
{
// Find out which layer it was that sent the signal.
QgsMapLayer * layer = ( QgsMapLayer * )QObject::sender();
-
+
emit selectionChanged( layer );
refresh();
}
Modified: trunk/qgis/src/gui/qgsquickprint.cpp
===================================================================
--- trunk/qgis/src/gui/qgsquickprint.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/gui/qgsquickprint.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -339,15 +339,15 @@
// properly in the print
int myMapDimensionX = ( myDrawableWidth / 100 ) * myMapHeightPercent;
int myMapDimensionY = ( myDrawableHeight / 100 ) * myMapWidthPercent;
-
- QImage myMapImage(QSize(myMapDimensionX, myMapDimensionY), QImage::Format_ARGB32);
- myMapImage.setDotsPerMeterX((double)(myPrinter.logicalDpiX()) / 25.4 * 1000.0);
- myMapImage.setDotsPerMeterY((double)(myPrinter.logicalDpiY()) / 25.4 * 1000.0);
- myMapImage.fill(0);
+
+ QImage myMapImage( QSize( myMapDimensionX, myMapDimensionY ), QImage::Format_ARGB32 );
+ myMapImage.setDotsPerMeterX(( double )( myPrinter.logicalDpiX() ) / 25.4 * 1000.0 );
+ myMapImage.setDotsPerMeterY(( double )( myPrinter.logicalDpiY() ) / 25.4 * 1000.0 );
+ myMapImage.fill( 0 );
QPainter myMapPainter;
- myMapPainter.begin(&myMapImage);
+ myMapPainter.begin( &myMapImage );
// Now resize for print
- mpMapRenderer->setOutputSize(QSize( myMapDimensionX, myMapDimensionY ), (myPrinter.logicalDpiX() + myPrinter.logicalDpiY()) / 2 );
+ mpMapRenderer->setOutputSize( QSize( myMapDimensionX, myMapDimensionY ), ( myPrinter.logicalDpiX() + myPrinter.logicalDpiY() ) / 2 );
mpMapRenderer->render( &myMapPainter );
myMapPainter.end();
@@ -355,7 +355,7 @@
myOriginX = myPrinter.pageRect().left() + myHorizontalSpacing;
myOriginY += myVerticalSpacing * 2;
- myPrintPainter.drawImage(myOriginX, myOriginY, myMapImage);
+ myPrintPainter.drawImage( myOriginX, myOriginY, myMapImage );
//
// Draw the legend
@@ -414,7 +414,7 @@
//
// Single symbol
//
- double widthScale = (myPrinter.logicalDpiX() + myPrinter.logicalDpiY()) / 2.0 / 25.4;
+ double widthScale = ( myPrinter.logicalDpiX() + myPrinter.logicalDpiY() ) / 2.0 / 25.4;
if ( 1 == mySymbolList.size() )
{
@@ -425,8 +425,8 @@
if ( mypSymbol->type() == QGis::Point )
{
QImage myImage;
- myImage = mypSymbol->getPointSymbolAsImage(widthScale);
- myPrintPainter.drawImage(myLegendXPos, myLegendYPos, myImage);
+ myImage = mypSymbol->getPointSymbolAsImage( widthScale );
+ myPrintPainter.drawImage( myLegendXPos, myLegendYPos, myImage );
}
else if ( mypSymbol->type() == QGis::Line )
{
@@ -502,8 +502,8 @@
if ( mypSymbol->type() == QGis::Point )
{
QImage myImage;
- myImage = mypSymbol->getPointSymbolAsImage(widthScale);
- myPrintPainter.drawImage(myLegendXPos, myLegendYPos, myImage);
+ myImage = mypSymbol->getPointSymbolAsImage( widthScale );
+ myPrintPainter.drawImage( myLegendXPos, myLegendYPos, myImage );
}
else if ( mypSymbol->type() == QGis::Line )
{
Modified: trunk/qgis/src/gui/qgsrubberband.cpp
===================================================================
--- trunk/qgis/src/gui/qgsrubberband.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/gui/qgsrubberband.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -320,7 +320,7 @@
return;
}
QgsRectangle r( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY,
- it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY );
+ it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY );
for ( int i = 0; i < mPoints.size(); ++i )
{
Modified: trunk/qgis/src/providers/wms/qgswmsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.cpp 2008-11-09 09:46:54 UTC (rev 9610)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.cpp 2008-11-09 10:34:03 UTC (rev 9611)
@@ -1412,10 +1412,10 @@
// TODO: overwrite inherited
QgsWmsBoundingBoxProperty bbox;
bbox.box = QgsRectangle( e1.attribute( "minx" ).toDouble(),
- e1.attribute( "miny" ).toDouble(),
- e1.attribute( "maxx" ).toDouble(),
- e1.attribute( "maxy" ).toDouble()
- );
+ e1.attribute( "miny" ).toDouble(),
+ e1.attribute( "maxx" ).toDouble(),
+ e1.attribute( "maxy" ).toDouble()
+ );
bbox.crs = e1.attribute( "CRS" );
layerProperty.boundingBox.push_back( bbox );
}
More information about the QGIS-commit
mailing list