mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-27 00:07:16 -05:00
gdaltools: more SIP APIv2 update
This commit is contained in:
parent
edd0cdd294
commit
df4fc99e83
@ -205,7 +205,7 @@ class GdalToolsDialog( QWidget, Ui_Widget, BaseBatchWidget ):
|
|||||||
self.progressBar.setValue( 0 )
|
self.progressBar.setValue( 0 )
|
||||||
|
|
||||||
def batchRun(self):
|
def batchRun(self):
|
||||||
exts = self.formatCombo.currentText().remove( QRegExp('^.*\(') ).remove( QRegExp('\).*$') ).split( " " )
|
exts = re.sub('\).*$', '', re.sub('^.*\(', '', self.formatCombo.currentText())).split(" ")
|
||||||
if exts and exts != "*" and exts != "*.*":
|
if exts and exts != "*" and exts != "*.*":
|
||||||
outExt = exts[ 0 ].remove( "*" )
|
outExt = exts[ 0 ].remove( "*" )
|
||||||
else:
|
else:
|
||||||
@ -229,7 +229,7 @@ class GdalToolsDialog( QWidget, Ui_Widget, BaseBatchWidget ):
|
|||||||
for f in files:
|
for f in files:
|
||||||
self.inFiles.append( inDir + "/" + f )
|
self.inFiles.append( inDir + "/" + f )
|
||||||
if outDir != None:
|
if outDir != None:
|
||||||
outFile = re.sub( f, "\.[a-zA-Z0-9]{2,4}", outExt )
|
outFile = re.sub( "\.[a-zA-Z0-9]{2,4}", outExt, f )
|
||||||
self.outFiles.append( outDir + "/" + outFile )
|
self.outFiles.append( outDir + "/" + outFile )
|
||||||
|
|
||||||
self.errors = []
|
self.errors = []
|
||||||
|
|||||||
@ -206,7 +206,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget):
|
|||||||
if self.sdsCheck.isChecked():
|
if self.sdsCheck.isChecked():
|
||||||
arguments.append( "-sds")
|
arguments.append( "-sds")
|
||||||
if self.srcwinCheck.isChecked() and self.srcwinEdit.text():
|
if self.srcwinCheck.isChecked() and self.srcwinEdit.text():
|
||||||
coordList = self.srcwinEdit.text().split( ' ', QString.SkipEmptyParts )
|
coordList = self.srcwinEdit.text().split() # split the string on whitespace(s)
|
||||||
if len(coordList) == 4 and coordList[3]:
|
if len(coordList) == 4 and coordList[3]:
|
||||||
try:
|
try:
|
||||||
for x in coordList:
|
for x in coordList:
|
||||||
@ -219,7 +219,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget):
|
|||||||
for x in coordList:
|
for x in coordList:
|
||||||
arguments.append( x)
|
arguments.append( x)
|
||||||
if self.prjwinCheck.isChecked() and self.prjwinEdit.text():
|
if self.prjwinCheck.isChecked() and self.prjwinEdit.text():
|
||||||
coordList = self.prjwinEdit.text().split( ' ', QString.SkipEmptyParts )
|
coordList = self.prjwinEdit.text().split() # split the string on whitespace(s)
|
||||||
if len(coordList) == 4 and coordList[3]:
|
if len(coordList) == 4 and coordList[3]:
|
||||||
try:
|
try:
|
||||||
for x in coordList:
|
for x in coordList:
|
||||||
@ -276,7 +276,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget):
|
|||||||
self.progressBar.setValue( 0 )
|
self.progressBar.setValue( 0 )
|
||||||
|
|
||||||
def batchRun(self):
|
def batchRun(self):
|
||||||
exts = self.formatCombo.currentText().remove( QRegExp('^.*\(') ).remove( QRegExp('\).*$') ).split( " " )
|
exts = re.sub('\).*$', '', re.sub('^.*\(', '', self.formatCombo.currentText())).split(" ")
|
||||||
if exts and exts != "*" and exts != "*.*":
|
if exts and exts != "*" and exts != "*.*":
|
||||||
outExt = exts[ 0 ].remove( "*" )
|
outExt = exts[ 0 ].remove( "*" )
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user