[processing] some code cleaning

This commit is contained in:
Victor Olaya 2013-09-21 12:47:47 +02:00
parent 062e76be00
commit 54a960f9ec
11 changed files with 3 additions and 42 deletions

View File

@ -24,15 +24,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from PyQt4.QtCore import *
from qgis.core import *
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.tools import dataobjects, vector
from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterBoolean import ParameterBoolean
from processing.outputs.OutputVector import OutputVector
class ExtentFromLayer(GeoAlgorithm):

View File

@ -36,11 +36,6 @@ class ExtractNodes(GeoAlgorithm):
INPUT = "INPUT"
OUTPUT = "OUTPUT"
#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/extract_nodes.png")
#===========================================================================
def defineCharacteristics(self):
self.name = "Extract nodes"
self.group = "Vector geometry tools"

View File

@ -24,18 +24,13 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from PyQt4.QtCore import *
from qgis.core import *
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.tools import dataobjects
from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterBoolean import ParameterBoolean
from processing.parameters.ParameterNumber import ParameterNumber
from processing.outputs.OutputVector import OutputVector
from processing.algs.ftools import Buffer as buff
class FixedDistanceBuffer(GeoAlgorithm):

View File

@ -38,11 +38,6 @@ class Intersection(GeoAlgorithm):
INPUT2 = "INPUT2"
OUTPUT = "OUTPUT"
#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/intersect.png")
#===========================================================================
def processAlgorithm(self, progress):
vlayerA = dataobjects.getObjectFromUri(self.getParameterValue(Intersection.INPUT))
vlayerB = dataobjects.getObjectFromUri(self.getParameterValue(Intersection.INPUT2))

View File

@ -41,11 +41,6 @@ class LinesIntersection(GeoAlgorithm):
OUTPUT = "OUTPUT"
#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/intersections.png")
#===========================================================================
def defineCharacteristics(self):
self.name = "Line intersections"
self.group = "Vector overlay tools"

View File

@ -36,11 +36,6 @@ class LinesToPolygons(GeoAlgorithm):
INPUT = "INPUT"
OUTPUT = "OUTPUT"
#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/to_lines.png")
#===========================================================================
def defineCharacteristics(self):
self.name = "Lines to polygons"
self.group = "Vector geometry tools"

View File

@ -40,11 +40,6 @@ class MeanCoords(GeoAlgorithm):
UID = "UID"
WEIGHT = "WEIGHT"
#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/mean.png")
#===========================================================================
def defineCharacteristics(self):
self.name = "Mean coordinate(s)"
self.group = "Vector analysis tools"

View File

@ -24,15 +24,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from PyQt4.QtCore import *
from qgis.core import *
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.tools import dataobjects, vector
from processing.parameters.ParameterVector import ParameterVector
from processing.outputs.OutputVector import OutputVector
class MultipartToSingleparts(GeoAlgorithm):

View File

@ -62,7 +62,6 @@ class Postprocessing:
dataobjects.load(out.value, name, alg.crs, RenderingStyles.getStyle(alg.commandLineName(),out.name))
except Exception, e:
wrongLayers.append(out)
#QMessageBox.critical(None, "Error", str(e))
elif isinstance(out, OutputHTML):
ProcessingResults.addResult(out.description, out.value)
htmlResults = True

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>532</width>
<height>377</height>
<width>800</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">

View File

@ -17,7 +17,7 @@ except AttributeError:
class Ui_DlgHistory(object):
def setupUi(self, DlgHistory):
DlgHistory.setObjectName(_fromUtf8("DlgHistory"))
DlgHistory.resize(532, 377)
DlgHistory.resize(800, 500)
self.verticalLayout = QtGui.QVBoxLayout(DlgHistory)
self.verticalLayout.setSpacing(2)
self.verticalLayout.setMargin(0)