Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed May 18, 2013
1 parent 350f224 commit 7ac1baf2e88f4f0647ece2f1412e64f9ae8d189f
Showing with 304 additions and 302 deletions.
  1. +1 −1 python/plugins/fTools/tools/doEliminate.py
  2. +6 −6 python/plugins/sextante/grass/GrassAlgorithm.py
  3. +11 −11 python/plugins/sextante/modeler/ModelerAlgorithm.py
  4. +13 −13 python/plugins/sextante/modeler/ModelerArrowItem.py
  5. +68 −69 python/plugins/sextante/modeler/ModelerGraphicItem.py
  6. +13 −13 python/plugins/sextante/modeler/ModelerScene.py
  7. +1 −1 src/app/qgisapp.cpp
  8. +1 −1 src/app/qgisapp.h
  9. +64 −64 src/app/qgscustomprojectiondialog.cpp
  10. +5 −5 src/app/qgscustomprojectiondialog.h
  11. +5 −5 src/core/qgscoordinatereferencesystem.cpp
  12. +2 −2 src/core/qgsvectorlayer.cpp
  13. +3 −3 src/core/qgsvectorlayer.h
  14. +2 −2 src/core/raster/qgsrasterresamplefilter.cpp
  15. +1 −1 src/gui/qgsattributedialog.cpp
  16. +1 −1 src/gui/qgsnewhttpconnection.cpp
  17. +1 −1 src/gui/qgsprojectionselector.cpp
  18. +3 −3 src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
  19. +3 −3 src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
  20. +1 −1 src/mapserver/qgis_map_serv.cpp
  21. +11 −11 src/plugins/topology/checkDock.cpp
  22. +14 −14 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
  23. +20 −17 src/providers/delimitedtext/qgsdelimitedtextfile.cpp
  24. +10 −10 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
  25. +1 −1 src/providers/delimitedtext/qgsdelimitedtextprovider.h
  26. +14 −14 src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp
  27. +1 −1 src/providers/wms/qgswmssourceselect.cpp
  28. +28 −28 tests/src/python/test_qgsdelimitedtextprovider.py
@@ -167,7 +167,7 @@ def eliminate(self, inLayer, boundary, progressBar, outFileName):
mergeWithFid = None
mergeWithGeom = None
max = 0

selFeat = QgsFeature()
while fit.nextFeature(selFeat):
selGeom = selFeat.geometry()
@@ -56,13 +56,13 @@

class GrassAlgorithm(GeoAlgorithm):

GRASS_OUTPUT_TYPE_PARAMETER = "GRASS_OUTPUT_TYPE_PARAMETER"
GRASS_OUTPUT_TYPE_PARAMETER = "GRASS_OUTPUT_TYPE_PARAMETER"
GRASS_MIN_AREA_PARAMETER = "GRASS_MIN_AREA_PARAMETER"
GRASS_SNAP_TOLERANCE_PARAMETER = "GRASS_SNAP_TOLERANCE_PARAMETER"
GRASS_REGION_EXTENT_PARAMETER = "GRASS_REGION_PARAMETER"
GRASS_REGION_CELLSIZE_PARAMETER = "GRASS_REGION_CELLSIZE_PARAMETER"
GRASS_REGION_ALIGN_TO_RESOLUTION = "-a_r.region"

OUTPUT_TYPES = ["auto", "point", "line", "area"]

def __init__(self, descriptionfile):
@@ -156,12 +156,12 @@ def defineCharacteristicsFromFile(self):
param = ParameterNumber(self.GRASS_MIN_AREA_PARAMETER, "v.in.ogr min area", 0, None, 0.0001)
param.isAdvanced = True
self.addParameter(param)
if vectorOutputs == 1:
if vectorOutputs == 1:
param = ParameterSelection(self.GRASS_OUTPUT_TYPE_PARAMETER, "v.out.ogr output type", self.OUTPUT_TYPES)
param.isAdvanced = True
self.addParameter(param)


def getDefaultCellsize(self):
cellsize = 0
for param in self.parameters:
@@ -340,7 +340,7 @@ def processAlgorithm(self, progress):
command += " format=ESRI_Shapefile"
command += " olayer=" + os.path.basename(out.value)[:-4]
typeidx = self.getParameterValue(self.GRASS_OUTPUT_TYPE_PARAMETER);
outtype = "auto" if typeidx is None else self.OUTPUT_TYPES[typeidx]
outtype = "auto" if typeidx is None else self.OUTPUT_TYPES[typeidx]
command += " type=" + outtype
commands.append(command)
outputCommands.append(command)
@@ -92,7 +92,7 @@ def __init__(self):

#position of items in canvas
self.algPos = []
self.paramPos = []
self.paramPos = []
self.outputPos = [] #same structure as algOutputs

#deactivated algorithms that should not be executed
@@ -162,15 +162,15 @@ def openModel(self, filename):
else:
tokens = line.split("|")
algParams[param.name] = AlgorithmAndParameter(int(tokens[0]), tokens[1])
outputPos = {}
outputPos = {}
for out in alg.outputs:
line = lines.readline().strip("\n").strip("\r")
if str(None)!=line:
if "|" in line:
tokens = line.split("|")
name = tokens[0]
tokens = tokens[1].split(",")
outputPos[out.name] = QtCore.QPointF(float(tokens[0]), float(tokens[1]))
outputPos[out.name] = QtCore.QPointF(float(tokens[0]), float(tokens[1]))
else:
name = line
outputPos[out.name] = None
@@ -183,7 +183,7 @@ def openModel(self, filename):
self.addOutput(output)
else:
algOutputs[out.name] = None
self.outputPos.append(outputPos)
self.outputPos.append(outputPos)
self.algOutputs.append(algOutputs)
self.algParameters.append(algParams)
self.dependencies.append(dependencies)
@@ -217,9 +217,9 @@ def addAlgorithm(self, alg, parametersMap, valuesMap, outputsMap, dependencies):
pos = {}
i = 0
from sextante.modeler.ModelerGraphicItem import ModelerGraphicItem
for out in outputsMap:
for out in outputsMap:
pos[out] = algPos + QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH, i * ModelerGraphicItem.BOX_HEIGHT)
i+=1
i+=1
self.outputPos.append(pos)

def updateAlgorithm(self, algIndex, parametersMap, valuesMap, outputsMap, dependencies):
@@ -229,13 +229,13 @@ def updateAlgorithm(self, algIndex, parametersMap, valuesMap, outputsMap, depend
for value in valuesMap.keys():
self.paramValues[value] = valuesMap[value]
self.updateModelerView()
algPos = self.algPos[algIndex]
algPos = self.algPos[algIndex]
pos = {}
i = 0
from sextante.modeler.ModelerGraphicItem import ModelerGraphicItem
for out in outputsMap:
pos[out] = algPos + QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH, i * ModelerGraphicItem.BOX_HEIGHT)
i+=1
i+=1
self.outputPos[algIndex] = pos


@@ -252,7 +252,7 @@ def removeAlgorithm(self, index):
del self.algParameters[index]
del self.algOutputs[index]
del self.algPos[index]
del self.outputPos[index]
del self.outputPos[index]

i = -1
for paramValues in self.algParameters:
@@ -423,14 +423,14 @@ def serialize(self):
s+=value.serialize() + "\n"
else:
s+=str(None) + "\n"
for out in alg.outputs:
for out in alg.outputs:
value = self.algOutputs[i][out.name]
s+=unicode(value)
if value is not None:
pt = self.outputPos[i][out.name]
s += "|" + str(pt.x()) + "," + str(pt.y())
s += "\n"

return s


@@ -59,8 +59,8 @@ def __init__(self, startItem, outputIndex, endItem, paramIndex ,parent=None, sce
self.setPen(QtGui.QPen(self.myColor, 1, QtCore.Qt.SolidLine,
QtCore.Qt.RoundCap, QtCore.Qt.RoundJoin))
self.setZValue(0)


def startItem(self):
return self.myStartItem

@@ -78,28 +78,28 @@ def paint(self, painter, option, widget=None):
controlPoints = []
endPt = self.endItem().getLinkPointForParameter(self.paramIndex)
startPt = self.startItem().getLinkPointForOutput(self.outputIndex)
if isinstance(self.startItem().element, GeoAlgorithm):
if self.startItem().element.outputs:
controlPoints.append(startItem.pos() + startPt)
controlPoints.append(startItem.pos() + startPt + QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2,0))
if isinstance(self.startItem().element, GeoAlgorithm):
if self.startItem().element.outputs:
controlPoints.append(startItem.pos() + startPt)
controlPoints.append(startItem.pos() + startPt + QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2,0))
controlPoints.append(endItem.pos() + endPt - QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2, 0))
controlPoints.append(endItem.pos() + endPt)
controlPoints.append(endItem.pos() + endPt)
pt = QtCore.QPointF(startItem.pos() + startPt + QtCore.QPointF(-3, -3))
painter.drawEllipse(pt.x(), pt.y(), 6, 6)
pt = QtCore.QPointF(endItem.pos() + endPt + QtCore.QPointF(-3, -3))
painter.drawEllipse(pt.x(), pt.y(), 6, 6)
painter.drawEllipse(pt.x(), pt.y(), 6, 6)
else: # case where there is a dependency on an algorithm not on an output
controlPoints.append(startItem.pos() + startPt)
controlPoints.append(startItem.pos() + startPt)
controlPoints.append(startItem.pos() + startPt + QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2,0))
controlPoints.append(endItem.pos() + endPt - QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2, 0))
controlPoints.append(endItem.pos() + endPt)
else:
controlPoints.append(endItem.pos() + endPt)
else:
controlPoints.append(startItem.pos())
controlPoints.append(startItem.pos() + QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2,0))
controlPoints.append(endItem.pos() + endPt - QtCore.QPointF(ModelerGraphicItem.BOX_WIDTH /2, 0))
controlPoints.append(endItem.pos() + endPt)
controlPoints.append(endItem.pos() + endPt)
pt = QtCore.QPointF(endItem.pos() + endPt + QtCore.QPointF(-3, -3))
painter.drawEllipse(pt.x(), pt.y(), 6, 6)
painter.drawEllipse(pt.x(), pt.y(), 6, 6)

path = QtGui.QPainterPath()
path.moveTo(controlPoints[0])

0 comments on commit 7ac1baf

Please sign in to comment.
You can’t perform that action at this time.