Skip to content
Browse files
[processing] extension can now be specified for OutputFile
  • Loading branch information
volaya committed May 15, 2014
1 parent a7cb486 commit 60f782441a8602a63070c4de2113b6e1436d8cb9
@@ -45,7 +45,7 @@ def __init__(self, name='', description='', hidden=False):
# in a vector layer). In the case of layers, hidden outputs are
# not loaded into QGIS after the algorithm is executed. Other
# outputs not representing layers or tables should always be hidden.
self.hidden = hidden
self.hidden = str(hidden).lower() == str(True).lower()

# This value indicates whether the output has to be opened
# after being produced by the algorithm or not
@@ -53,4 +53,4 @@ def getFromString(s):
if len(tokens) == 2:
return clazz(tokens[0], tokens[1])
return clazz(tokens[0], tokens[1], tokens[2] == str(True))
return clazz(tokens[0], tokens[1], tokens[2])
@@ -30,8 +30,16 @@

class OutputFile(Output):

def __init__(self, name='', description='', ext = None): = name
self.description = description
self.ext = ext

def getFileFilter(self, alg):
return 'All files(*.*)'
if self.ext is None:
return 'All files(*.*)'
return '%s files(*.%s)' % self.ext

def getDefaultFileExtension(self, alg):
return 'file'
return self.ext or 'file'

0 comments on commit 60f7824

Please sign in to comment.