Skip to content

Commit cce2eb5

Browse files
committedJan 22, 2015
indentation update
1 parent ccc0d2f commit cce2eb5

23 files changed

+75
-75
lines changed
 

‎python/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def func(self, values, feature, parent):
5555
expandargs = False
5656
if arg_count == 0 and not name[0] == '$':
5757
name = '${0}'.format(name)
58-
58+
5959
if arg_count == "auto":
6060
# Work out the number of args we need.
6161
# Number of function args - 2. The last two args are always feature, parent.

‎python/core/composer/qgscomposermultiframe.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ class QgsComposerMultiFrame: QgsComposerObject
2222
if (dynamic_cast<QgsComposerHtml*>(sipCpp) != NULL)
2323
sipClass = sipClass_QgsComposerHtml;
2424
else if (dynamic_cast<QgsComposerAttributeTableV2*>(sipCpp) != NULL)
25-
sipClass = sipClass_QgsComposerAttributeTableV2;
25+
sipClass = sipClass_QgsComposerAttributeTableV2;
2626
else if (dynamic_cast<QgsComposerTableV2*>(sipCpp) != NULL)
2727
sipClass = sipClass_QgsComposerTableV2;
2828
else if (dynamic_cast<QgsComposerMultiFrame*>(sipCpp) != NULL)
2929
sipClass = sipClass_QgsComposerMultiFrame;
3030
else
31-
sipClass = NULL;
31+
sipClass = NULL;
3232
%End
3333

3434
public:

‎python/core/effects/qgsimageoperation.sip

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QgsImageOperation
3232
GrayscaleLuminosity, /*< grayscale by perceptual luminosity (weighted sum of color RGB components) */
3333
GrayscaleAverage /*< grayscale by taking average of color RGB components */
3434
};
35-
35+
3636
/** Flip operation types
3737
*/
3838
enum FlipType
@@ -57,7 +57,7 @@ class QgsImageOperation
5757
* contrast of the image.
5858
*/
5959
static void adjustBrightnessContrast( QImage &image, const int brightness, const double contrast );
60-
60+
6161
/**Alter the hue or saturation of a QImage.
6262
* @param image QImage to alter
6363
* @param saturation double between 0 and 2 inclusive, where 0 = desaturate and 1.0 = no change
@@ -67,20 +67,20 @@ class QgsImageOperation
6767
*/
6868
static void adjustHueSaturation( QImage &image, const double saturation, const QColor& colorizeColor = QColor(),
6969
const double colorizeStrength = 1.0 );
70-
70+
7171
/**Multiplies opacity of image pixel values by a factor.
7272
* @param image QImage to alter
7373
* @param factor factor to multiple pixel's opacity by
7474
*/
7575
static void multiplyOpacity( QImage &image, const double factor );
76-
76+
7777
/**Overlays a color onto an image. This operation retains the alpha channel of the
7878
* original image, but replaces all image pixel colors with the specified color.
7979
* @param image QImage to alter
8080
* @param color color to overlay (any alpha component of the color is ignored)
8181
*/
8282
static void overlayColor( QImage &image, const QColor& color );
83-
83+
8484
/**Struct for storing properties of a distance transform operation*/
8585
struct DistanceTransformProperties
8686
{
@@ -117,19 +117,19 @@ class QgsImageOperation
117117
* @param alphaOnly set to true to blur only the alpha component of the image
118118
*/
119119
static void stackBlur( QImage &image, const int radius, const bool alphaOnly = false );
120-
120+
121121
/**Performs a gaussian blur on an image. Gaussian blur is slower but results in a high
122122
* quality blur.
123123
* @param image QImage to blur
124124
* @param radius blur radius in pixels
125125
* @returns blurred image
126126
*/
127127
static QImage* gaussianBlur( QImage &image, const int radius ) /Factory/;
128-
128+
129129
/**Flips an image horizontally or vertically
130130
* @param image QImage to flip
131131
* @param type type of flip to perform (horizontal or vertical)
132132
*/
133133
static void flipImage( QImage &image, FlipType type );
134-
134+
135135
};

‎python/core/qgscoordinatereferencesystem.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class QgsCoordinateReferenceSystem
304304

305305
/**Returns auth id of related geographic CRS*/
306306
QString geographicCRSAuthId() const;
307-
307+
308308
/**Returns a list of recently used projections
309309
* @returns list of srsid for recently used projections
310310
* @note added in QGIS 2.7

‎python/core/qgsdatadefined.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class QgsDataDefined
2323
const QString& field = QString() );
2424

2525
/**
26-
* Construct a new data defined object, analyse the expression to determine
26+
* Construct a new data defined object, analyse the expression to determine
2727
* if it's a simple field
2828
*
2929
* @param expression can be null

‎python/core/symbology-ng/qgsrendererv2.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ class QgsFeatureRendererV2
4343
else if (sipCpp->type() == "RuleRenderer")
4444
sipClass = sipClass_QgsRuleBasedRendererV2;
4545
else if (sipCpp->type() == "heatmapRenderer")
46-
sipClass = sipClass_QgsHeatmapRenderer;
46+
sipClass = sipClass_QgsHeatmapRenderer;
4747
else if (sipCpp->type() == "invertedPolygonRenderer")
48-
sipClass = sipClass_QgsInvertedPolygonRenderer;
48+
sipClass = sipClass_QgsInvertedPolygonRenderer;
4949
else if (sipCpp->type() == "pointDisplacement")
50-
sipClass = sipClass_QgsPointDisplacementRenderer;
50+
sipClass = sipClass_QgsPointDisplacementRenderer;
5151
else
5252
sipClass = 0;
5353
%End

‎python/core/symbology-ng/qgssymbollayerv2.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ class QgsSymbolLayerV2
4444
else if (dynamic_cast<QgsSVGFillSymbolLayer*>(sipCpp) != NULL)
4545
sipClass = sipClass_QgsSVGFillSymbolLayer;
4646
else if (dynamic_cast<QgsRasterFillSymbolLayer*>(sipCpp) != NULL)
47-
sipClass = sipClass_QgsRasterFillSymbolLayer;
47+
sipClass = sipClass_QgsRasterFillSymbolLayer;
4848
else
4949
sipClass = sipClass_QgsImageFillSymbolLayer;
5050
}
5151
else if (dynamic_cast<QgsCentroidFillSymbolLayerV2*>(sipCpp) != NULL)
5252
sipClass = sipClass_QgsCentroidFillSymbolLayerV2;
5353
else if (dynamic_cast<QgsGradientFillSymbolLayerV2*>(sipCpp) != NULL)
54-
sipClass = sipClass_QgsGradientFillSymbolLayerV2;
54+
sipClass = sipClass_QgsGradientFillSymbolLayerV2;
5555
else if (dynamic_cast<QgsShapeburstFillSymbolLayerV2*>(sipCpp) != NULL)
56-
sipClass = sipClass_QgsShapeburstFillSymbolLayerV2;
56+
sipClass = sipClass_QgsShapeburstFillSymbolLayerV2;
5757
else
5858
sipClass = sipClass_QgsFillSymbolLayerV2;
5959
break;

‎python/gui/symbology-ng/qgssymbollayerv2widget.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ class QgsSymbolLayerV2Widget : QWidget
1212
virtual QgsSymbolLayerV2* symbolLayer() = 0;
1313

1414
protected:
15-
15+
1616
void registerDataDefinedButton( QgsDataDefinedButton * button, const QString & propertyName, QgsDataDefinedButton::DataType type, const QString & description );
1717

1818
/** Get label for data defined entry.
1919
* Implemented only for 'size' of marker symbols
2020
* @note added in 2.1
2121
*/
2222
virtual QString dataDefinedPropertyLabel( const QString &entryName );
23-
23+
2424
signals:
2525
void changed();
26-
26+
2727
protected slots:
2828
void updateDataDefinedProperty();
29-
29+
3030
};
3131

3232
///////////

‎python/plugins/processing/core/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ def setValue(self, obj):
520520
else:
521521
# Layer could not be found
522522
return False
523-
523+
524524

525525
def getFileFilter(self):
526526
exts = dataobjects.getSupportedOutputRasterLayerExtensions()

‎python/plugins/processing/gui/BatchInputSelectionPanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def showFileSelectionDialog(self):
130130
settings.setValue('/Processing/LastInputPath',
131131
os.path.dirname(unicode(files[0])))
132132
for i, filename in enumerate(files):
133-
files[i] = dataobjects.getRasterSublayer(filename, self.param)
133+
files[i] = dataobjects.getRasterSublayer(filename, self.param)
134134
if len(files) == 1:
135135
self.text.setText(files[0])
136136
else:

‎python/plugins/processing/gui/InputLayerSelectorPanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def showSelectionDialog(self):
7171
filename = dataobjects.getRasterSublayer(filename, self.param)
7272
self.cmbText.addItem(filename, filename)
7373
self.cmbText.setCurrentIndex(self.cmbText.count() - 1)
74-
74+
7575

7676
def getValue(self):
7777
return self.cmbText.itemData(self.cmbText.currentIndex())

‎python/plugins/processing/tools/dataobjects.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -375,23 +375,23 @@ def exportTable(table):
375375
return filename[:-3] + 'dbf'
376376
else:
377377
return filename
378-
378+
379379
def getRasterSublayer(path, param):
380-
380+
381381
layer = QgsRasterLayer(path)
382-
382+
383383
try:
384384
# If the layer is a raster layer and has multiple sublayers, let the user chose one.
385385
# # Based on QgisApp::askUserForGDALSublayers
386-
if layer and param.showSublayersDialog and layer.dataProvider().name() == "gdal" and len(layer.subLayers()) > 1:
386+
if layer and param.showSublayersDialog and layer.dataProvider().name() == "gdal" and len(layer.subLayers()) > 1:
387387
layers = []
388388
subLayerNum = 0
389389
# simplify raster sublayer name
390390
for subLayer in layer.subLayers():
391391
# if netcdf/hdf use all text after filename
392392
if bool(re.match('netcdf', subLayer, re.I)) or bool(re.match('hdf', subLayer, re.I)):
393393
subLayer = subLayer.split(path)[1]
394-
subLayer = subLayer[1:]
394+
subLayer = subLayer[1:]
395395
else:
396396
# remove driver name and file name
397397
subLayer.replace(subLayer.split(":")[0], "")
@@ -405,22 +405,22 @@ def getRasterSublayer(path, param):
405405
subLayer = subLayer[:-1]
406406
if subLayer.endswith("\""):
407407
subLayer = subLayer[:-1]
408-
408+
409409
layers.append(str(subLayerNum)+"|"+subLayer)
410410
subLayerNum = subLayerNum + 1
411-
411+
412412
# Use QgsSublayersDialog
413-
# Would be good if QgsSublayersDialog had an option to allow only one sublayer to be selected
414-
chooseSublayersDialog = QgsSublayersDialog(QgsSublayersDialog.Gdal, "gdal")
413+
# Would be good if QgsSublayersDialog had an option to allow only one sublayer to be selected
414+
chooseSublayersDialog = QgsSublayersDialog(QgsSublayersDialog.Gdal, "gdal")
415415
chooseSublayersDialog.populateLayerTable( layers, "|" )
416-
416+
417417
if chooseSublayersDialog.exec_():
418418
return layer.subLayers()[chooseSublayersDialog.selectionIndexes()[0]]
419419
else:
420420
# If user pressed cancel then just return the input path
421421
return path
422422
else:
423-
# If the sublayers selection dialog is not to be shown then just return the input path
423+
# If the sublayers selection dialog is not to be shown then just return the input path
424424
return path
425425
except:
426426
# If the layer is not a raster layer, then just return the input path

‎python/plugins/processing/ui/convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import subprocess
33

44
def convertUiFile(f):
5-
5+
66
command = ["pyuic4.bat", f, "-o", "ui_" + os.path.splitext(f)[0] + ".py"]
7-
7+
88
proc = subprocess.Popen(
99
command,
1010
shell=True,

‎python/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
import glob
44

5-
from qgis.core import QgsApplication
5+
from qgis.core import QgsApplication
66

77
def load_user_expressions(path):
88
"""

‎src/app/qgsmaptooloffsetcurve.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void QgsMapToolOffsetCurve::canvasMoveEvent( QMouseEvent * e )
203203
QgsPointLocator::Match m = mCanvas->snappingUtils()->snapToMap( e->pos() );
204204
if ( m.isValid() )
205205
{
206-
if ( ( m.layer() && m.layer()->id() != mSourceLayerId ) || m.featureId() != mModifiedFeature )
206+
if (( m.layer() && m.layer()->id() != mSourceLayerId ) || m.featureId() != mModifiedFeature )
207207
{
208208
layerCoords = toLayerCoordinates( layer, m.point() );
209209
mSnapVertexMarker = new QgsVertexMarker( mCanvas );

‎src/core/qgslayerdefinition.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
*/
1313
class CORE_EXPORT QgsLayerDefinition
1414
{
15-
public:
16-
/* Loads the QLR at path into QGIS. New layers are added to rootGroup and the map layer registry*/
17-
static bool loadLayerDefinition( const QString & path, QgsLayerTreeGroup* rootGroup, QString &errorMessage);
18-
/* Loads the QLR from the XML document. New layers are added to rootGroup and the map layer registry */
19-
static bool loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup* rootGroup, QString &errorMessage);
20-
/* Export the selected layer tree nodes to a QLR file */
21-
static bool exportLayerDefinition( QString path, QList<QgsLayerTreeNode*> selectedTreeNodes, QString &errorMessage );
15+
public:
16+
/* Loads the QLR at path into QGIS. New layers are added to rootGroup and the map layer registry*/
17+
static bool loadLayerDefinition( const QString & path, QgsLayerTreeGroup* rootGroup, QString &errorMessage );
18+
/* Loads the QLR from the XML document. New layers are added to rootGroup and the map layer registry */
19+
static bool loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup* rootGroup, QString &errorMessage );
20+
/* Export the selected layer tree nodes to a QLR file */
21+
static bool exportLayerDefinition( QString path, QList<QgsLayerTreeNode*> selectedTreeNodes, QString &errorMessage );
2222
};
2323

2424
#endif // QGSLAYERDEFINITION_H

‎src/core/qgsofflineediting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool QgsOfflineEditing::convertToOfflineProject( const QString& offlineDataPath,
140140

141141
if ( newLayer )
142142
{
143-
Q_FOREACH( QgsVectorJoinInfo join, it.value() )
143+
Q_FOREACH ( QgsVectorJoinInfo join, it.value() )
144144
{
145145
QgsVectorLayer* newJoinedLayer = layerIdMapping.value( join.joinLayerId );
146146
if ( newJoinedLayer )

‎src/core/qgspallabeling.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,11 +1784,11 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
17841784
const QgsMapToPixel& m2p = context.mapToPixel();
17851785
if ( m2p.mapRotation() )
17861786
{
1787-
if ( geom->rotate( m2p.mapRotation(), context.extent().center() ) )
1788-
{
1789-
QgsDebugMsg( QString("Error rotating geometry").arg( geom->exportToWkt() ) );
1790-
return; // really ?
1791-
}
1787+
if ( geom->rotate( m2p.mapRotation(), context.extent().center() ) )
1788+
{
1789+
QgsDebugMsg( QString( "Error rotating geometry" ).arg( geom->exportToWkt() ) );
1790+
return; // really ?
1791+
}
17921792
}
17931793

17941794
// CLIP the geometry if it is bigger than the extent
@@ -3908,7 +3908,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
39083908
// also pre-scaled/translated, as suggested here:
39093909
// http://hub.qgis.org/issues/11856
39103910
QgsMapToPixel xform = mMapSettings->mapToPixel();
3911-
xform.setMapRotation(0,0,0);
3911+
xform.setMapRotation( 0, 0, 0 );
39123912
#else
39133913
const QgsMapToPixel& xform = mMapSettings->mapToPixel();
39143914
#endif
@@ -4213,7 +4213,7 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con
42134213
// also pre-scaled/translated, as suggested here:
42144214
// http://hub.qgis.org/issues/11856
42154215
QgsMapToPixel xform = context.mapToPixel();
4216-
xform.setMapRotation(0,0,0);
4216+
xform.setMapRotation( 0, 0, 0 );
42174217
#else
42184218
const QgsMapToPixel& xform = context.mapToPixel();
42194219
#endif

0 commit comments

Comments
 (0)