Skip to content

Commit 51297d5

Browse files
committed
indentation update (note to self: always run scripts/prepare-commit.sh before committing)
1 parent 58d0483 commit 51297d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+450
-436
lines changed

python/core/composer/qgscomposermap.sip

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ class QgsComposerMap : QgsComposerItem
208208
@note this function was added in version 1.4*/
209209
void setGridAnnotationFont( const QFont& f );
210210
QFont gridAnnotationFont() const;
211-
211+
212212
/**Sets font color for grid annotations
213213
@note this function was added in version 2.0*/
214214
void setAnnotationFontColor( const QColor& c );
215-
QColor annotationFontColor() const;
215+
QColor annotationFontColor() const;
216216

217217
/**Sets coordinate precision for grid annotations
218218
@note this function was added in version 1.4*/
@@ -247,13 +247,13 @@ class QgsComposerMap : QgsComposerItem
247247
@note: this function was added in version 1.9*/
248248
void setGridFrameWidth( double w );
249249
double gridFrameWidth() const;
250-
250+
251251
/** Returns the grid's blending mode
252252
@note added in version 2.0*/
253253
const QPainter::CompositionMode gridBlendMode() const;
254254
/** Sets the grid's blending mode
255-
@note added in version 2.0*/
256-
void setGridBlendMode( const QPainter::CompositionMode blendMode );
255+
@note added in version 2.0*/
256+
void setGridBlendMode( const QPainter::CompositionMode blendMode );
257257

258258
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
259259
@note this function was added in version 1.4*/
@@ -293,10 +293,10 @@ class QgsComposerMap : QgsComposerItem
293293
/* Returns the blending mode for the overview frame
294294
@note added in version 1.9*/
295295
const QPainter::CompositionMode overviewBlendMode() const;
296-
/* Sets the blending mode for the overview frame
297-
@note added in version 1.9*/
296+
/* Sets the blending mode for the overview frame
297+
@note added in version 1.9*/
298298
void setOverviewBlendMode( const QPainter::CompositionMode blendMode );
299-
299+
300300
/**Sets flag if overview frame should be inverted
301301
@note this function was added in version 1.9*/
302302
void setOverviewInverted( bool inverted );

python/core/composer/qgscomposershape.sip

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,16 @@ class QgsComposerShape: QgsComposerItem
4242
/**Sets this items bound in scene coordinates such that 1 item size units
4343
corresponds to 1 scene size unit. Also, the shape is scaled*/
4444
void setSceneRect( const QRectF& rectangle );
45-
46-
/**Sets radius for rounded rectangle corners*/
45+
46+
/**Sets radius for rounded rectangle corners. Added in v2.1 */
4747
void setCornerRadius( double radius );
48-
/**Returns the radius for rounded rectangle corners*/
49-
double cornerRadius() const;
48+
/**Returns the radius for rounded rectangle corners*/
49+
double cornerRadius() const;
5050

5151
public slots:
5252
/**Sets item rotation and resizes item bounds such that the shape always has the same size*/
5353
virtual void setRotation( double r );
5454

55-
5655
protected:
5756
/* reimplement drawFrame, since it's not a rect, but a custom shape */
5857
virtual void drawFrame( QPainter* p );

python/core/qgsattributeaction.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class QgsAttributeAction
5353

5454
//! Remove an action at given index
5555
void removeAction( int index );
56-
56+
5757
/*! Does the given values. defaultValueIndex is the index of the
5858
* field to be used if the action has a $currfield placeholder.
5959
* @note added in 1.9

python/core/qgsgmlschema.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class QgsGmlFeatureClass
1818
QStringList & geometryAttributes();
1919
};
2020

21-
class QgsGmlSchema: QObject
21+
class QgsGmlSchema: QObject
2222
{
2323

2424
%TypeHeaderCode

python/core/raster/qgsrasterdataprovider.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
9595
const QString & theResamplingMethod = "NEAREST",
9696
QgsRaster::RasterPyramidsFormat theFormat = QgsRaster::PyramidsGTiff,
9797
const QStringList & theConfigOptions = QStringList() );
98-
98+
9999
/** \brief Accessor for ths raster layers pyramid list.
100100
* @param overviewList used to construct the pyramid list (optional), when empty the list is defined by the provider.
101101
* A pyramid list defines the

python/core/raster/qgsrasterrange.sip

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ class QgsRasterRange
88

99
public:
1010
QgsRasterRange();
11-
11+
1212
QgsRasterRange( double theMin, double theMax );
13-
13+
1414
~QgsRasterRange();
15-
15+
1616
double min() const;
1717
double max() const;
18-
18+
1919
double setMin( double theMin );
2020
double setMax( double theMax );
21-
21+
2222
bool operator==( const QgsRasterRange &o ) const;
2323

2424
bool contains( double value, const QgsRasterRangeList &rangeList );

python/core/raster/qgsrasterviewport.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ struct QgsRasterViewPort
44
%TypeHeaderCode
55
#include <qgsrasterviewport.h>
66
%End
7-
/** \brief Coordinate (in output device coordinate system) of top left corner
7+
/** \brief Coordinate (in output device coordinate system) of top left corner
88
* of the part of the raster that is to be rendered.*/
99
QgsPoint mTopLeftPoint;
10-
/** \brief Coordinate (in output device coordinate system) of bottom right corner
10+
/** \brief Coordinate (in output device coordinate system) of bottom right corner
1111
* of the part of the raster that is to be rendered.*/
1212
QgsPoint mBottomRightPoint;
1313

1414
/** \brief Width, number of columns to be rendered */
1515
int mWidth;
16-
/** \brief Distance in map units from bottom edge to top edge for the part of
16+
/** \brief Distance in map units from bottom edge to top edge for the part of
1717
* the raster that is to be rendered.*/
1818
/** \brief Height, number of rows to be rendered */
1919
int mHeight;

python/gui/qgsmaptool.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class QgsMapTool : QObject
8484
QAbstractButton* button();
8585

8686
/** Set a user defined cursor */
87-
virtual void setCursor(QCursor cursor);
87+
virtual void setCursor(QCursor cursor);
8888

8989
/** Check whether this MapTool performs a zoom or pan operation.
9090
* If it does, we will be able to perform the zoom and then

python/gui/qgsmessagebar.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class QgsMessageBar: QFrame
4343
static QgsMessageBarItem* createMessage( const QString &title, const QString &text, QWidget *parent = 0 ) /Factory/;
4444
//! make out a widget containing title and message to be displayed on the bar
4545
static QgsMessageBarItem* createMessage( QWidget *widget, QWidget *parent = 0 ) /Factory/;
46-
46+
4747
//! convenience method for pushing a non-widget-based message to the bar
4848
void pushMessage( const QString &text, MessageLevel level = INFO, int duration = 0 );
4949
//! convenience method for pushing a non-widget-based message with title to the bar

python/gui/qgsmessagebaritem.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QgsMessageBarItem: QWidget
3232

3333
//! returns the duration in second of the message
3434
int duration();
35-
35+
3636
//! returns the level
3737
QgsMessageBar::MessageLevel level();
3838

python/plugins/fTools/tools/doGeoprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def convex_hull(self, useField ):
569569
hull = []
570570
fitA = vproviderA.getFeatures()
571571
while fitA.nextFeature( inFeat ):
572-
idVar = inFeat.attribute( importedFieldName )
572+
idVar = inFeat.attribute( importedFieldName )
573573
if idVar == i:
574574
if first:
575575
firstFeature = QgsFeature( inFeat )

python/plugins/processing/ProcessingPlugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
class ProcessingPlugin:
4949

5050
def __init__(self, iface):
51-
interface.iface = iface
52-
Processing.initialize()
51+
interface.iface = iface
52+
Processing.initialize()
5353

5454
def initGui(self):
5555
self.commander = None

python/plugins/processing/algs/SaveSelectedFeatures.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def defineCharacteristics(self):
5353
'''Here we define the inputs and output of the algorithm, along
5454
with some other properties.
5555
This will give the algorithm its semantics, and allow to use it in the modeler.
56-
As a rule of thumb, do not produce anything not declared here.
56+
As a rule of thumb, do not produce anything not declared here.
5757
It will work fine in the toolbox, but it will not work in the modeler.
5858
If that's what you intend, then set self.showInModeler = False'''
5959

@@ -74,14 +74,14 @@ def processAlgorithm(self, progress):
7474
'''Here is where the processing itself takes place'''
7575

7676
#the first thing to do is retrieve the values of the parameters
77-
#entered by the user.
77+
#entered by the user.
7878
#The getParameterValue will return the value with its corresponding type,
7979
#strings in the case of inputs and outputs
8080
inputFilename = self.getParameterValue(self.INPUT_LAYER)
81-
81+
8282
#The output. It will get the value of the destinatation file entered by the user.
83-
#If the user select "Save to temporary file", when we arrive here it will already have an asigned value,
84-
#which will be a temporary file using the first supported file format of the corresponding algorithm provider
83+
#If the user select "Save to temporary file", when we arrive here it will already have an asigned value,
84+
#which will be a temporary file using the first supported file format of the corresponding algorithm provider
8585
output = self.getOutputFromName(self.OUTPUT_LAYER)
8686

8787
#input layers values are always a string with its location.
@@ -98,13 +98,13 @@ def processAlgorithm(self, progress):
9898
#If the selected format is not supported, the first available format from
9999
#the provider is used, and the corresponding file extension appended
100100
provider = vectorLayer.dataProvider()
101-
writer = output.getVectorWriter( provider.fields(),
102-
provider.geometryType(),
103-
#this is the layer crs. By default all resulting layers are
101+
writer = output.getVectorWriter( provider.fields(),
102+
provider.geometryType(),
103+
#this is the layer crs. By default all resulting layers are
104104
#assumed to be in the same crs are the inputs, and will be loaded
105105
#with this assumptions when executed from the toolbox.
106106
#The self.crs variable has to be canged in case this is not true,
107-
#or in case there are no input layer from which the output crs can be infered
107+
#or in case there are no input layer from which the output crs can be infered
108108
vectorLayer.crs() )
109109

110110
#Now we take the selected features and add them to the output layer

python/plugins/processing/algs/ftools/Buffer.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ def buffering(progress, writer, distance, field, useField, layer, dissolve, segm
5454
else:
5555
value = distance
5656

57-
inGeom = QgsGeometry(inFeat.geometry())
57+
inGeom = QgsGeometry(inFeat.geometry())
5858
outGeom = inGeom.buffer(float(value), segments)
5959
if first:
6060
tempGeom = QgsGeometry(outGeom)
6161
first = False
62-
else:
63-
tempGeom = tempGeom.combine(outGeom)
62+
else:
63+
tempGeom = tempGeom.combine(outGeom)
6464

6565
current += 1
6666
progress.setPercentage(int(current * total))
67-
67+
6868
outFeat.setGeometry(tempGeom)
6969
outFeat.setAttributes(attrs)
7070
writer.addFeature(outFeat)
71-
71+
7272
# without dissolve
7373
else:
7474
for inFeat in features:
@@ -77,11 +77,11 @@ def buffering(progress, writer, distance, field, useField, layer, dissolve, segm
7777
value = attrs[field]
7878
else:
7979
value = distance
80-
inGeom = QgsGeometry(inFeat.geometry())
81-
outGeom = inGeom.buffer(float(value), segments)
80+
inGeom = QgsGeometry(inFeat.geometry())
81+
outGeom = inGeom.buffer(float(value), segments)
8282
outFeat.setGeometry(outGeom)
8383
outFeat.setAttributes(attrs)
84-
writer.addFeature(outFeat)
84+
writer.addFeature(outFeat)
8585
current += 1
8686
progress.setPercentage(int(current * total))
8787

python/plugins/processing/core/GeoAlgorithm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ def __init__(self):
6565
self.canRunInBatchMode = True
6666
#to be set by the provider when it loads the algorithm
6767
self.provider = None
68-
69-
#if the algorithm is run as part of a model, the parent model can be set in this variable,
70-
#to allow for customized behaviour, in case some operations should be run differently when
68+
69+
#if the algorithm is run as part of a model, the parent model can be set in this variable,
70+
#to allow for customized behaviour, in case some operations should be run differently when
7171
#running as part of a model
7272
self.model = None
7373

@@ -141,7 +141,7 @@ def checkParameterValuesBeforeExecuting(self):
141141

142142

143143
def execute(self, progress, model = None):
144-
144+
145145
'''The method to use to call a processing algorithm.
146146
Although the body of the algorithm is in processAlgorithm(),
147147
it should be called using this method, since it performs

python/plugins/processing/core/ProcessingConfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def initialize():
5454
ProcessingConfig.settingIcons["General"] = icon
5555
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.SHOW_DEBUG_IN_DIALOG, "Show extra info in Log panel", True))
5656
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.KEEP_DIALOG_OPEN, "Keep dialog open after running an algorithm", False))
57-
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.USE_SELECTED, "Use only selected features", True))
57+
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.USE_SELECTED, "Use only selected features", True))
5858
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.USE_FILENAME_AS_LAYER_NAME, "Use filename as layer name", False))
5959
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.SHOW_RECENT_ALGORITHMS, "Show recently executed algorithms", True))
6060
ProcessingConfig.addSetting(Setting("General", ProcessingConfig.OUTPUT_FOLDER, "Output folder", tempFolder()))

python/plugins/processing/grass/GrassAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def exportVectorLayer(self, orgFilename):
405405
return command
406406

407407
def setSessionProjectionFromProject(self, commands):
408-
if not GrassUtils.projectionSet:
408+
if not GrassUtils.projectionSet:
409409
proj4 = interface.iface.mapCanvas().mapRenderer().destinationCrs().toProj4()
410410
command = "g.proj"
411411
command +=" -c"

python/plugins/processing/grass/GrassUtils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ def grassScriptFilename():
6767
filename = "grass_script.bat"
6868
filename = userFolder() + os.sep + filename
6969
return filename
70-
70+
7171
@staticmethod
7272
def getGrassVersion():
7373
#I do not know if this should be removed or let the user enter it
7474
#or something like that... This is just a temporary thing
75-
return "6.4.0"
75+
return "6.4.0"
7676

7777
@staticmethod
7878
def grassPath():

python/plugins/processing/gui/AlgorithmExecutionDialog.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, alg, mainWidget):
7373
self.runButton = QtGui.QPushButton()
7474
self.runButton.setText("Run")
7575
self.buttonBox.addButton(self.runButton, QtGui.QDialogButtonBox.ActionRole)
76-
self.runButton.clicked.connect(self.accept)
76+
self.runButton.clicked.connect(self.accept)
7777
self.setWindowTitle(self.alg.name)
7878
self.progressLabel = QtGui.QLabel()
7979
self.progress = QtGui.QProgressBar()
@@ -185,7 +185,7 @@ def setParamValue(self, param, widget):
185185
@pyqtSlot()
186186
def accept(self):
187187
checkCRS = ProcessingConfig.getSetting(ProcessingConfig.WARN_UNMATCHING_CRS)
188-
keepOpen = ProcessingConfig.getSetting(ProcessingConfig.KEEP_DIALOG_OPEN)
188+
keepOpen = ProcessingConfig.getSetting(ProcessingConfig.KEEP_DIALOG_OPEN)
189189
self.showDebug = ProcessingConfig.getSetting(ProcessingConfig.SHOW_DEBUG_IN_DIALOG)
190190
try:
191191
self.setParamValues()
@@ -216,7 +216,7 @@ def accept(self):
216216
self.progress.setMaximum(0)
217217
self.progressLabel.setText("Processing algorithm...")
218218
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
219-
219+
220220
self.setInfo("<b>Algorithm %s starting...</b>" % self.alg.name)
221221
if self.iterateParam:
222222
if UnthreadedAlgorithmExecutor.runalgIterating(self.alg, self.iterateParam, self):
@@ -238,7 +238,7 @@ def accept(self):
238238
if not keepOpen:
239239
self.close()
240240
else:
241-
self.resetGUI()
241+
self.resetGUI()
242242
except AlgorithmExecutionDialog.InvalidParameterValue as ex:
243243
try:
244244
self.buttonBox.accepted.connect(lambda: ex.widget.setPalette(QPalette()))
@@ -295,7 +295,7 @@ def cancel(self):
295295
def resetGUI(self):
296296
QApplication.restoreOverrideCursor()
297297
self.progressLabel.setText("")
298-
self.progress.setValue(0)
298+
self.progress.setValue(0)
299299
self.runButton.setEnabled(True)
300300
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
301301
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)

python/plugins/processing/gui/BatchProcessingDialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ def accept(self):
174174

175175
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
176176
self.table.setEnabled(False)
177-
self.tabWidget.setCurrentIndex(1)
177+
self.tabWidget.setCurrentIndex(1)
178178
self.progress.setMaximum(len(self.algs))
179179
for i, alg in enumerate(self.algs):
180180
self.setBaseText("Processing algorithm " + str(i+1) + "/" + str(len(self.algs)) + "...")
181181
if UnthreadedAlgorithmExecutor.runalg(alg, self) and not self.canceled:
182182
if self.load[i]:
183-
Postprocessing.handleAlgorithmResults(alg, self, False)
183+
Postprocessing.handleAlgorithmResults(alg, self, False)
184184
else:
185185
QApplication.restoreOverrideCursor()
186186
return

0 commit comments

Comments
 (0)