本文整理汇总了Python中widgetPluginBase.GdalToolsBasePluginWidget类的典型用法代码示例。如果您正苦于以下问题:Python GdalToolsBasePluginWidget类的具体用法?Python GdalToolsBasePluginWidget怎么用?Python GdalToolsBasePluginWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GdalToolsBasePluginWidget类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: onFinished
def onFinished(self, exitCode, status):
if not self.isBatchEnabled():
from widgetPluginBase import GdalToolsBasePluginWidget as BasePluginWidget
BasePluginWidget.onFinished(self, exitCode, status)
return
msg = QString.fromLocal8Bit( self.base.process.readAllStandardError() )
if not msg.isEmpty():
self.errors.append( ">> " + self.inFiles[self.batchIndex] + "<br>" + msg.replace( "\n", "<br>" ) )
self.base.process.close()
self.batchIndex += 1
self.runItem( self.batchIndex, self.batchTotal )
开发者ID:Hardysong,项目名称:Quantum-GIS,代码行数:13,代码来源:doOverview.py
示例2: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.resolutions = ("highest", "average", "lowest")
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")
self.recurseCheck.hide()
self.setParamsStatus(
[
(self.inputFilesEdit, SIGNAL("textChanged(const QString &)")),
(self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
(self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
(self.srcNoDataSpin, SIGNAL("valueChanged(int)"), self.srcNoDataCheck, "1.7.0"),
(self.separateCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
(self.inputDirCheck, SIGNAL("stateChanged(int)")),
(self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck)
]
)
self.connect(self.selectInputFilesButton, SIGNAL("clicked()"), self.fillInputFilesEdit)
self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
self.connect( self.inputDirCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
开发者ID:mmubangizi,项目名称:qgis,代码行数:25,代码来源:doBuildVRT.py
示例3: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_merge.py")
self.inSelector.setType( self.inSelector.FILE )
self.outSelector.setType( self.outSelector.FILE )
self.recurseCheck.hide()
# use this for approx. previous UI
#self.creationOptionsTable.setType(QgsRasterFormatSaveOptionsWidget.Table)
self.outputFormat = Utils.fillRasterOutputFormat()
self.extent = None
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
(self.inputDirCheck, SIGNAL("stateChanged(int)")),
(self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck),
( self.separateCheck, SIGNAL( "stateChanged( int )" ) ),
( self.pctCheck, SIGNAL( "stateChanged( int )" ) ),
( self.intersectCheck, SIGNAL( "stateChanged( int )" ) )
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.intersectCheck, SIGNAL("toggled(bool)"), self.refreshExtent)
self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"), self.switchToolMode)
self.connect(self.inSelector, SIGNAL("filenameChanged()"), self.refreshExtent)
开发者ID:Hardysong,项目名称:Quantum-GIS,代码行数:34,代码来源:doMerge.py
示例4: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.canvas = self.iface.mapCanvas()
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_merge.py", None, self.iface.mainWindow())
self.extentSelector.setCanvas(self.canvas)
self.outputFormat = Utils.fillRasterOutputFormat()
self.inputFiles = QStringList()
self.warningDialog = QErrorMessage(self)
self.setParamsStatus(
[
(self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
(self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
(self.pctCheck, SIGNAL("stateChanged(int)")),
( self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")] )
]
)
self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.checkRun)
self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)
开发者ID:mmubangizi,项目名称:qgis,代码行数:26,代码来源:doClipper.py
示例5: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.resolutions = ("highest", "average", "lowest")
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")
self.inSelector.setType(self.inSelector.FILE)
self.outSelector.setType(self.outSelector.FILE)
self.recurseCheck.hide()
self.visibleRasterLayers = []
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
(self.noDataEdit, SIGNAL("textChanged( const QString & )"), self.srcNoDataCheck, 1700),
(self.inputDirCheck, SIGNAL("stateChanged(int)")),
(self.separateCheck, SIGNAL("stateChanged(int)"), None, 1700),
(self.targetSRSEdit, SIGNAL("textChanged(const QString &)"), self.targetSRSCheck),
(self.allowProjDiffCheck, SIGNAL("stateChanged(int)"), None, 1700),
(self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck),
(self.inputSelLayersCheck, SIGNAL("stateChanged(int)"))
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.inputDirCheck, SIGNAL("stateChanged( int )"), self.switchToolMode)
self.connect(self.inputSelLayersCheck, SIGNAL("stateChanged( int )"), self.switchLayerMode)
self.connect(self.iface.mapCanvas(), SIGNAL("stateChanged( int )"), self.switchLayerMode)
self.connect(self.selectTargetSRSButton, SIGNAL("clicked()"), self.fillTargetSRSEdit)
开发者ID:HeatherHillers,项目名称:QGIS,代码行数:34,代码来源:doBuildVRT.py
示例6: show_
def show_(self):
self.connect(self.canvas, SIGNAL("layersChanged()"), self.fillInputFiles)
self.extentSelector.start()
BasePluginWidget.show_(self)
self.fillInputFiles()
self.checkRun()
开发者ID:mmubangizi,项目名称:qgis,代码行数:7,代码来源:doClipper.py
示例7: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.resolutions = ("highest", "average", "lowest")
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdalbuildvrt")
self.inSelector.setType( self.inSelector.FILE )
self.outSelector.setType( self.outSelector.FILE )
self.recurseCheck.hide()
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
(self.srcNoDataSpin, SIGNAL("valueChanged(int)"), self.srcNoDataCheck, "1.7.0"),
(self.inputDirCheck, SIGNAL("stateChanged(int)")),
(self.separateCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
(self.allowProjDiffCheck, SIGNAL("stateChanged(int)"), None, "1.7.0"),
(self.recurseCheck, SIGNAL("stateChanged(int)"), self.inputDirCheck)
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect( self.inputDirCheck, SIGNAL( "stateChanged( int )" ), self.switchToolMode )
开发者ID:Joe-xXx,项目名称:Quantum-GIS,代码行数:28,代码来源:doBuildVRT.py
示例8: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.canvas = self.iface.mapCanvas()
self.clipper = ClipperSelector(self.canvas)
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_merge.py", None, self.iface.mainWindow())
self.outputFormat = Utils.fillRasterOutputFormat()
self.inputFiles = QStringList()
self.warningDialog = QErrorMessage(self)
self.setParamsStatus(
[
(self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
(self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
(self.pctCheck, SIGNAL("stateChanged(int)"))
]
)
self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
self.connect(self.clipper, SIGNAL("clippingRectangleCreated()"), self.fillCoords)
self.connect(self.x1CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
self.connect(self.x2CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
self.connect(self.y1CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
self.connect(self.y2CoordEdit, SIGNAL("textChanged(const QString &)"), self.coordsChanged)
self.connect(self.clipper, SIGNAL("deactivated()"), self.pauseClipping)
self.connect(self.btnEnableClip, SIGNAL("clicked()"), self.startClipping)
开发者ID:zhangliye,项目名称:OpenTrans,代码行数:31,代码来源:doClipper.py
示例9: show_
def show_(self):
self.connect(self.canvas, SIGNAL("layersChanged()"), self.fillInputFiles)
self.btnEnableClip.setVisible(False)
BasePluginWidget.show_(self)
self.fillInputFiles()
self.fillCoords()
开发者ID:zhangliye,项目名称:OpenTrans,代码行数:7,代码来源:doClipper.py
示例10: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.canvas = self.iface.mapCanvas()
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_translate")
self.outSelector.setType( self.outSelector.FILE )
self.extentSelector.setCanvas(self.canvas)
self.outputFormat = Utils.fillRasterOutputFormat()
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()") ),
(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)"))
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.maskSelector, SIGNAL("selectClicked()"), self.fillMaskFileEdit)
self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.extentChanged)
self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)
self.connect(self.extentModeRadio, SIGNAL("toggled(bool)"), self.switchClippingMode)
开发者ID:alexgleith,项目名称:Quantum-GIS,代码行数:31,代码来源:doClipper.py
示例11: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_rasterize")
self.outSelector.setType( self.outSelector.FILE )
# set the default QSpinBoxes and QProgressBar value
self.widthSpin.setValue(3000)
self.heightSpin.setValue(3000)
self.horizresSpin.setValue(1)
self.vertresSpin.setValue(1)
self.lastEncoding = Utils.getLastUsedEncoding()
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.attributeComboBox, SIGNAL("currentIndexChanged(int)")),
( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" )),
( [self.horizresSpin, self.vertresSpin], SIGNAL( "valueChanged(double)" ))
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillFieldsCombo)
self.connect(self.radioSetSize, SIGNAL("toggled(bool)"), self.someValueChanged)
self.connect(self.radioSetResolution, SIGNAL("toggled(bool)"), self.someValueChanged)
开发者ID:ACorradini,项目名称:QGIS,代码行数:32,代码来源:doRasterize.py
示例12: __init__
def __init__( self, iface ):
QWidget.__init__( self )
self.iface = iface
self.setupUi( self )
BasePluginWidget.__init__( self, self.iface, "gdalinfo" )
# we don't need load to canvas functionality
self.base.loadCheckBox.hide()
# make window large
self.base.resize( 400, 360 )
self.setParamsStatus(
[
(self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
( self.suppressGCPCheck, SIGNAL( "stateChanged( int )" ) ),
( self.suppressMDCheck, SIGNAL( "stateChanged( int )" ) )
]
)
self.connect( self.selectInputFileButton, SIGNAL( "clicked()" ), self.fillInputFileEdit )
# helper actions for copying info output
self.copyLine = QAction( self.tr( "Copy" ), self )
QObject.connect( self.copyLine, SIGNAL( "triggered()" ), self.doCopyLine )
self.copyAll = QAction( self.tr( "Copy all" ), self )
QObject.connect( self.copyAll, SIGNAL( "triggered()" ), self.doCopyAll )
# fill layers combo
self.fillInputLayerCombo()
开发者ID:mmubangizi,项目名称:qgis,代码行数:30,代码来源:doInfo.py
示例13: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_contour")
gdalVersion = Utils.GdalConfig.version()
self.useDirAsOutput = gdalVersion < "1.7.0"
if self.useDirAsOutput:
self.label_2.setText(
QApplication.translate("GdalToolsWidget", "&Output directory for contour lines (shapefile)")
)
self.outSelector.setType(self.outSelector.FILE)
# set the default QSpinBoxes value
self.intervalDSpinBox.setValue(10.0)
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.intervalDSpinBox, SIGNAL("valueChanged(double)")),
(self.attributeEdit, SIGNAL("textChanged(const QString &)"), self.attributeCheck),
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
开发者ID:JoeyPinilla,项目名称:Quantum-GIS,代码行数:30,代码来源:doContour.py
示例14: __init__
def __init__( self, iface ):
QWidget.__init__( self )
self.iface = iface
self.setupUi( self )
BasePluginWidget.__init__( self, self.iface, "gdalinfo" )
# we don't need load to canvas functionality
self.base.loadCheckBox.hide()
# make window large
self.base.resize( 400, 360 )
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()") ),
( self.suppressGCPCheck, SIGNAL( "stateChanged( int )" ) ),
( self.suppressMDCheck, SIGNAL( "stateChanged( int )" ) )
]
)
self.connect( self.inSelector, SIGNAL( "selectClicked()" ), self.fillInputFileEdit )
# helper actions for copying info output
self.copyLine = QAction( self.tr( "Copy" ), self )
QObject.connect( self.copyLine, SIGNAL( "triggered()" ), self.doCopyLine )
self.copyAll = QAction( self.tr( "Copy all" ), self )
QObject.connect( self.copyAll, SIGNAL( "triggered()" ), self.doCopyAll )
开发者ID:CzendaZdenda,项目名称:qgis,代码行数:27,代码来源:doInfo.py
示例15: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_proximity.py")
self.outputFormat = Utils.fillRasterOutputFormat()
self.setParamsStatus(
[
(self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
(self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
(self.valuesEdit, SIGNAL("textChanged(const QString &)"), self.valuesCheck),
(self.distUnitsCombo, SIGNAL("currentIndexChanged(int)"), self.distUnitsCheck),
(self.maxDistSpin, SIGNAL("valueChanged(int)"), self.maxDistCheck),
(self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
(self.fixedBufValSpin, SIGNAL("valueChanged(int)"), self.fixedBufValCheck)
]
)
self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
# fill layers combo
self.fillInputLayerCombo()
开发者ID:mmubangizi,项目名称:qgis,代码行数:26,代码来源:doProximity.py
示例16: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_merge.py")
self.inSelector.setType( self.inSelector.FILE )
self.outSelector.setType( self.outSelector.FILE )
self.outputFormat = Utils.fillRasterOutputFormat()
self.extent = None
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.noDataSpin, SIGNAL("valueChanged(int)"), self.noDataCheck),
( self.separateCheck, SIGNAL( "stateChanged( int )" ) ),
( self.pctCheck, SIGNAL( "stateChanged( int )" ) ),
( self.intersectCheck, SIGNAL( "stateChanged( int )" ) ),
(self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox)
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFilesEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.intersectCheck, SIGNAL("stateChanged(int)"), self.refreshExtent)
开发者ID:CzendaZdenda,项目名称:qgis,代码行数:28,代码来源:doMerge.py
示例17: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.modes = ("hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "roughness")
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdaldem")
self.outSelector.setType( self.outSelector.FILE )
self.configSelector.setType( self.configSelector.FILE )
# set the default QSpinBoxes and QProgressBar value
self.bandSpin.setValue(1)
self.hillshadeZFactorSpin.setValue(1)
self.hillshadeScaleSpin.setValue(1)
self.hillshadeAltitudeSpin.setValue(45.0)
self.hillshadeAzimuthSpin.setValue(315.0)
self.slopeScaleSpin.setValue(1)
# set the default color configuration file to terrain
import os.path
colorConfigFile = os.path.join(os.path.dirname(__file__), "terrain.txt")
self.configSelector.setFilename(colorConfigFile)
self.outputFormat = Utils.fillRasterOutputFormat()
self.creationOptionsWidget.setFormat(self.outputFormat)
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.computeEdgesCheck, SIGNAL("stateChanged(int)"), None, 1800),
(self.bandSpin, SIGNAL("valueChanged(int)"), self.bandCheck),
(self.algorithmCheck, SIGNAL("stateChanged(int)"), None, 1800),
(self.creationOptionsWidget, SIGNAL("optionsChanged()")),
(self.creationOptionsGroupBox, SIGNAL("toggled(bool)")),
(self.modeCombo, SIGNAL("currentIndexChanged(int)")),
([self.hillshadeZFactorSpin, self.hillshadeScaleSpin, self.hillshadeAltitudeSpin, self.hillshadeAzimuthSpin], SIGNAL("valueChanged(double)")),
(self.slopeScaleSpin, SIGNAL("valueChanged(double)")),
(self.slopePercentCheck, SIGNAL("stateChanged(int)")),
([self.aspectTrigonometricCheck, self.aspectZeroForFlatCheck], SIGNAL("stateChanged(int)")),
(self.configSelector, SIGNAL("filenameChanged()")),
([self.colorExactRadio, self.colorNearestRadio], SIGNAL("toggled(bool)"), self.colorMatchGroupBox),
(self.colorAlphaCheck, SIGNAL("stateChanged(int)"))
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.configSelector, SIGNAL("selectClicked()"), self.fillColorConfigFileEdit)
self.connect(self.modeCombo, SIGNAL("currentIndexChanged(int)"), self.showModeParams)
开发者ID:Hardysong,项目名称:Quantum-GIS,代码行数:52,代码来源:doDEM.py
示例18: runItem
def runItem(self, index, total):
self.updateProgress(index, total)
if index >= total:
self.batchFinished()
return
outFile = None
if len(self.outFiles) > index:
outFile = self.outFiles[ index ]
args = self.getBatchArguments( self.inFiles[index], outFile )
self.base.refreshArgs(args)
BasePluginWidget.onRun(self)
开发者ID:Nald,项目名称:Quantum-GIS,代码行数:14,代码来源:widgetBatchBase.py
示例19: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.canvas = self.iface.mapCanvas()
self.algorithm = ('invdist', 'average', 'nearest', 'datametrics')
self.datametrics = ('minimum', 'maximum', 'range')
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_grid")
self.outSelector.setType( self.outSelector.FILE )
self.extentSelector.setCanvas(self.canvas)
#self.extentSelector.stop()
# set the default QSpinBoxes and QProgressBar value
self.widthSpin.setValue(3000)
self.heightSpin.setValue(3000)
self.invdistPowerSpin.setValue(2.0)
self.outputFormat = Utils.fillRasterOutputFormat()
self.lastEncoding = Utils.getLastUsedEncoding()
self.setParamsStatus(
[
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.zfieldCombo, SIGNAL("currentIndexChanged(int)"), self.zfieldCheck),
(self.algorithmCombo, SIGNAL("currentIndexChanged(int)"), self.algorithmCheck),
(self.stackedWidget, None, self.algorithmCheck),
([self.invdistPowerSpin, self.invdistSmothingSpin, self.invdistRadius1Spin, self.invdistRadius2Spin, self.invdistAngleSpin, self.invdistNoDataSpin], SIGNAL("valueChanged(double)")),
([self.invdistMaxPointsSpin, self.invdistMinPointsSpin], SIGNAL("valueChanged(int)")),
([self.averageRadius1Spin, self.averageRadius2Spin, self.averageAngleSpin, self.averageNoDataSpin], SIGNAL("valueChanged(double)")),
(self.averageMinPointsSpin, SIGNAL("valueChanged(int)")),
([self.nearestRadius1Spin, self.nearestRadius2Spin, self.nearestAngleSpin, self.nearestNoDataSpin], SIGNAL("valueChanged(double)")),
(self.datametricsCombo, SIGNAL("currentIndexChanged(int)")),
([self.datametricsRadius1Spin, self.datametricsRadius2Spin, self.datametricsAngleSpin, self.datametricsNoDataSpin], SIGNAL("valueChanged(double)")),
(self.datametricsMinPointsSpin, SIGNAL("valueChanged(int)")),
(self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup),
( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" ), self.resizeGroupBox )
]
)
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.inSelector, SIGNAL("layerChanged()"), self.fillFieldsCombo)
self.connect(self.extentGroup, SIGNAL("toggled(bool)"), self.onExtentCheckedChanged)
开发者ID:AaronGaim,项目名称:QGIS,代码行数:46,代码来源:doGrid.py
示例20: __init__
def __init__(self, iface):
QWidget.__init__(self)
self.iface = iface
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_sieve.py")
self.outSelector.setType(self.outSelector.FILE)
self.outputFormat = Utils.fillRasterOutputFormat()
self.setParamsStatus([
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.thresholdSpin, SIGNAL("valueChanged(int)"), self.thresholdCheck),
(self.connectionsCombo, SIGNAL("currentIndexChanged(int)"), self.connectionsCheck)
])
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
开发者ID:Geoneer,项目名称:QGIS,代码行数:19,代码来源:doSieve.py
注:本文中的widgetPluginBase.GdalToolsBasePluginWidget类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论