From cd8ecd6a6ea90000867e2a92e53995f6996c5221 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Sun, 22 May 2011 21:12:04 +0300 Subject: [PATCH] add checkbox for "-dstalpha" option in GDALTools Clipper tool --- python/plugins/GdalTools/tools/doClipper.py | 4 +++- python/plugins/GdalTools/tools/widgetClipper.ui | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/python/plugins/GdalTools/tools/doClipper.py b/python/plugins/GdalTools/tools/doClipper.py index 2d0cfbf9ab8e..7d74e8622454 100644 --- a/python/plugins/GdalTools/tools/doClipper.py +++ b/python/plugins/GdalTools/tools/doClipper.py @@ -28,6 +28,7 @@ def __init__(self, iface): (self.outSelector, SIGNAL("filenameChanged()") ), (self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck, "1.7.0"), (self.maskSelector, SIGNAL("filenameChanged()"), self.maskModeRadio, "1.6.0"), + (self.alphaBandCheck, SIGNAL( "stateChanged( int )") ), (self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentModeRadio), (self.modeStackedWidget, SIGNAL("currentIndexChanged(int)")) ] @@ -138,7 +139,8 @@ def getArgsModeMask(self): arguments << "-q" arguments << "-cutline" arguments << mask - arguments << "-dstalpha" + if self.alphaBandCheck.isChecked(): + arguments << "-dstalpha" outputFn = self.getOutputFileName() if not outputFn.isEmpty(): diff --git a/python/plugins/GdalTools/tools/widgetClipper.ui b/python/plugins/GdalTools/tools/widgetClipper.ui index a1aaedb3fb3a..f2de76ad52fe 100644 --- a/python/plugins/GdalTools/tools/widgetClipper.ui +++ b/python/plugins/GdalTools/tools/widgetClipper.ui @@ -7,7 +7,7 @@ 0 0 338 - 191 + 226 @@ -90,7 +90,7 @@ - 0 + 1 @@ -107,7 +107,7 @@ 0 - + Qt::Vertical @@ -130,6 +130,13 @@ + + + + Create an output alpha band + + +