Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 12, 2013
1 parent 52dd890 commit 0157d83
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/mmqgisx/MMQGISXAlgorithms.py
Expand Up @@ -418,7 +418,7 @@ def processAlgorithm(self, progress):

crsId = self.getParameterValue(self.CRS)
self.crs = QgsCoordinateReferenceSystem(crsId)

if (hspacing <= 0) or (vspacing <= 0):
raise GeoAlgorithmExecutionException("Invalid grid spacing: " + unicode(hspacing) + " / " + unicode(vspacing))

Expand Down
6 changes: 3 additions & 3 deletions python/plugins/sextante/core/GeoAlgorithm.py
Expand Up @@ -262,7 +262,7 @@ def resolveTemporaryOutputs(self):
SextanteUtils.setTempOutput(out, self)

def setOutputCRS(self):
layers = QGisLayers.getAllLayers()
layers = QGisLayers.getAllLayers()
for param in self.parameters:
if isinstance(param, (ParameterRaster, ParameterVector, ParameterMultipleInput)):
if param.value:
Expand All @@ -272,14 +272,14 @@ def setOutputCRS(self):
if layer.source() == inputlayer:
self.crs = layer.crs()
return
if (isinstance(param, ParameterRaster) or
if (isinstance(param, ParameterRaster) or
(isinstance(param, ParameterMultipleInput) and param.datatype == ParameterMultipleInput.TYPE_RASTER)):
p = QgsProviderRegistry.instance().provider('gdal', inputlayer)
else:
p = QgsProviderRegistry.instance().provider('ogr', inputlayer)
if p is not None:
self.crs = p.crs()
return
return
qgis = QGisLayers.iface
self.crs = qgis.mapCanvas().mapRenderer().destinationCrs()

Expand Down
26 changes: 13 additions & 13 deletions python/plugins/sextante/grass/description/r.report.txt
@@ -1,13 +1,13 @@
r.report
r.report - Reports statistics for raster layers.
Raster (r.*)
ParameterMultipleInput|map|Raster layer(s) to report on|3.0|False
ParameterSelection|units|Units|mi;me;k;a;h;c;p
ParameterString|null|Character representing no data cell value|*
ParameterNumber|nsteps|Number of fp subranges to collect stats from|1|None|255
ParameterBoolean|-h|Suppress page headers|True
ParameterBoolean|-f|Use formfeeds between pages|True
ParameterBoolean|-e|Scientific format|True
ParameterBoolean|-n|Filter out all no data cells|True
ParameterBoolean|-N|Filter out cells where all layers have no data|True
OutputHTML|html|Output report file
r.report
r.report - Reports statistics for raster layers.
Raster (r.*)
ParameterMultipleInput|map|Raster layer(s) to report on|3.0|False
ParameterSelection|units|Units|mi;me;k;a;h;c;p
ParameterString|null|Character representing no data cell value|*
ParameterNumber|nsteps|Number of fp subranges to collect stats from|1|None|255
ParameterBoolean|-h|Suppress page headers|True
ParameterBoolean|-f|Use formfeeds between pages|True
ParameterBoolean|-e|Scientific format|True
ParameterBoolean|-n|Filter out all no data cells|True
ParameterBoolean|-N|Filter out cells where all layers have no data|True
OutputHTML|html|Output report file
56 changes: 28 additions & 28 deletions python/plugins/sextante/grass/ext/r_report.py
@@ -1,28 +1,28 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
r_report.py
---------------------
Date : December 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Victor Olaya'
__date__ = 'December 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from sextante.grass.ext import HtmlReportPostProcessor

def postProcessResults(alg):
HtmlReportPostProcessor.postProcessResults(alg)
# -*- coding: utf-8 -*-

"""
***************************************************************************
r_report.py
---------------------
Date : December 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Victor Olaya'
__date__ = 'December 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from sextante.grass.ext import HtmlReportPostProcessor

def postProcessResults(alg):
HtmlReportPostProcessor.postProcessResults(alg)
8 changes: 4 additions & 4 deletions python/plugins/sextante/saga/SagaAlgorithm.py
Expand Up @@ -234,9 +234,9 @@ def processAlgorithm(self, progress):
raise GeoAlgorithmExecutionException("Unsupported file format")

#2: set parameters and outputs

command = self.undecoratedGroup + " \"" + self.cmdname + "\""

if self.hardcodedStrings:
for s in self.hardcodedStrings:
command += " " + s
Expand Down Expand Up @@ -298,9 +298,9 @@ def processAlgorithm(self, progress):
for out in self.outputs:
if isinstance(out, OutputRaster):
filename = out.getCompatibleFileName(self)
filename2 = SextanteUtils.tempFolder() + os.sep + os.path.basename(filename) + ".sgrd"
filename2 = SextanteUtils.tempFolder() + os.sep + os.path.basename(filename) + ".sgrd"
commands.append("io_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT 4 -TYPE 0 -FILE \"" + filename + "\"");


#4 Run SAGA
SagaUtils.createSagaBatchJobFileFromSagaCommands(commands)
Expand Down
12 changes: 6 additions & 6 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -973,14 +973,14 @@ void QgsComposer::on_mActionExportAsImage_triggered()
for ( int i = 0; i < mComposition->numPages(); ++i )
{
QImage image = mComposition->printPageAsRaster( i );
if (image.isNull())
if ( image.isNull() )
{
QMessageBox::warning( 0, tr( "Memory Allocation Error" ),
tr( "Trying to create image #%1( %2x%3 @ %4dpi ) "
"may result in a memory overflow.\n"
"Please try a lower resolution or a smaller papersize" )
.arg( i+1 ).arg( width ).arg( height ).arg ( dpi ),
QMessageBox::Ok , QMessageBox::Ok );
tr( "Trying to create image #%1( %2x%3 @ %4dpi ) "
"may result in a memory overflow.\n"
"Please try a lower resolution or a smaller papersize" )
.arg( i + 1 ).arg( width ).arg( height ).arg( dpi ),
QMessageBox::Ok , QMessageBox::Ok );
mView->setPaintingEnabled( true );
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -566,7 +566,7 @@ void QgsPluginManager::pluginItemChanged( QStandardItem * item )

if ( item->checkState() )
{
if ( mPluginsAreEnabled && ! isPluginEnabled( id ))
if ( mPluginsAreEnabled && ! isPluginEnabled( id ) )
{
QgsDebugMsg( " Loading plugin: " + id );
loadPlugin( id );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -1722,7 +1722,7 @@ int QgsCoordinateReferenceSystem::syncDb()
{
srsProj4 = ( const char * ) sqlite3_column_text( select, 0 );

if( QString::fromUtf8(( char * )sqlite3_column_text( select, 1 ) ).toInt() != 0 )
if ( QString::fromUtf8(( char * )sqlite3_column_text( select, 1 ) ).toInt() != 0 )
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsgeometryvalidator.cpp
Expand Up @@ -282,7 +282,7 @@ void QgsGeometryValidator::run()

for ( int i = 0; !mStop && i < mp.size(); i++ )
{
if ( mp[i].isEmpty() )
if ( mp[i].isEmpty() )
{
emit errorFound( QgsGeometry::Error( QObject::tr( "polygon %1 has no rings" ).arg( i ) ) );
mErrorCount++;
Expand All @@ -291,8 +291,8 @@ void QgsGeometryValidator::run()

for ( int j = i + 1; !mStop && j < mp.size(); j++ )
{
if ( mp[j].isEmpty() )
continue;
if ( mp[j].isEmpty() )
continue;

if ( ringInRing( mp[i][0], mp[j][0] ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorfilewriter.cpp
Expand Up @@ -1016,7 +1016,7 @@ QMap<QString, QString> QgsVectorFileWriter::ogrDriverList()
if ( ds )
{
writableDrivers << "SpatiaLite";
OGR_Dr_DeleteDataSource( poDriver, TO8( QString( "/vsimem/spatialitetest.sqlite" ) ));
OGR_Dr_DeleteDataSource( poDriver, TO8( QString( "/vsimem/spatialitetest.sqlite" ) ) );
OGR_DS_Destroy( ds );
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/symbology-ng/qgsstylev2.cpp
Expand Up @@ -754,7 +754,7 @@ QStringList QgsStyleV2::findSymbols( StyleEntity type, QString qword )

QString item = ( type == SymbolEntity ) ? "symbol" : "colorramp";
char *query = sqlite3_mprintf( "SELECT name FROM %q WHERE xml LIKE '%%%q%%'",
item.toUtf8().constData(), qword.toUtf8().constData() );
item.toUtf8().constData(), qword.toUtf8().constData() );

sqlite3_stmt *ppStmt;
int nErr = sqlite3_prepare_v2( mCurrentDB, query, -1, &ppStmt, NULL );
Expand Down Expand Up @@ -784,12 +784,12 @@ QStringList QgsStyleV2::findSymbols( StyleEntity type, QString qword )
if ( type == SymbolEntity )
{
query = sqlite3_mprintf( "SELECT symbol_id FROM tagmap WHERE tag_id IN (%q)",
dummy.toUtf8().constData() );
dummy.toUtf8().constData() );
}
else
{
query = sqlite3_mprintf( "SELECT colorramp_id FROM ctagmap WHERE tag_id IN (%q)",
dummy.toUtf8().constData() );
dummy.toUtf8().constData() );
}
nErr = sqlite3_prepare_v2( mCurrentDB, query, -1, &ppStmt, NULL );

Expand All @@ -804,7 +804,7 @@ QStringList QgsStyleV2::findSymbols( StyleEntity type, QString qword )

dummy = symbolids.join( ", " );
query = sqlite3_mprintf( "SELECT name FROM %q WHERE id IN (%q)",
item.toUtf8().constData(), dummy.toUtf8().constData() );
item.toUtf8().constData(), dummy.toUtf8().constData() );
nErr = sqlite3_prepare_v2( mCurrentDB, query, -1, &ppStmt, NULL );
while ( nErr == SQLITE_OK && sqlite3_step( ppStmt ) == SQLITE_ROW )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsattributedialog.cpp
Expand Up @@ -229,7 +229,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
mypInnerLayout->addWidget( mypLabel, index, 0 );
mypInnerLayout->addWidget( myWidget, index, 1 );
++index;
}
}
}

// Set focus to first widget in list, to help entering data without moving the mouse.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaptool.cpp
Expand Up @@ -110,7 +110,7 @@ QAbstractButton* QgsMapTool::button()
return mButton;
}

void QgsMapTool::setCursor(QCursor cursor)
void QgsMapTool::setCursor( QCursor cursor )
{
mCursor = cursor;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaptool.h
Expand Up @@ -99,7 +99,7 @@ class GUI_EXPORT QgsMapTool : public QObject
QAbstractButton* button();

/** Set a user defined cursor */
virtual void setCursor(QCursor cursor);
virtual void setCursor( QCursor cursor );

/** Check whether this MapTool performs a zoom or pan operation.
* If it does, we will be able to perform the zoom and then
Expand Down
10 changes: 5 additions & 5 deletions src/mapserver/qgswfsserver.cpp
Expand Up @@ -289,7 +289,7 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
QList<QgsMapLayer*> layerList;
QgsMapLayer* currentLayer = 0;
QgsCoordinateReferenceSystem layerCrs;
QgsRectangle searchRect(0,0,0,0);
QgsRectangle searchRect( 0, 0, 0, 0 );

mErrors = QStringList();
mTypeNames = QStringList();
Expand Down Expand Up @@ -966,7 +966,7 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
}
if ( featureCounter == 0 )
startGetFeature( request, format, layerCrs, &searchRect );

endGetFeature( request, format );

return 0;
Expand Down Expand Up @@ -1604,7 +1604,7 @@ QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, QgsCoordinateRefer
for ( int i = 0; i < attrIndexes.count(); ++i )
{
int idx = attrIndexes[i];
QString attributeName = fields->at(idx).name();
QString attributeName = fields->at( idx ).name();
//skip attribute if it is excluded from WFS publication
if ( excludedAttributes.contains( attributeName ) )
{
Expand Down Expand Up @@ -1682,7 +1682,7 @@ QDomElement QgsWFSServer::createFeatureGML2( QgsFeature* feat, QDomDocument& doc
for ( int i = 0; i < attrIndexes.count(); ++i )
{
int idx = attrIndexes[i];
QString attributeName = fields->at(idx).name();
QString attributeName = fields->at( idx ).name();
//skip attribute if it is excluded from WFS publication
if ( excludedAttributes.contains( attributeName ) )
{
Expand Down Expand Up @@ -1741,7 +1741,7 @@ QDomElement QgsWFSServer::createFeatureGML3( QgsFeature* feat, QDomDocument& doc
for ( int i = 0; i < attrIndexes.count(); ++i )
{
int idx = attrIndexes[i];
QString attributeName = fields->at(idx).name();
QString attributeName = fields->at( idx ).name();
//skip attribute if it is excluded from WFS publication
if ( excludedAttributes.contains( attributeName ) )
{
Expand Down

0 comments on commit 0157d83

Please sign in to comment.