当前位置: 首页>>代码示例>>Python>>正文


Python widgetPluginBase.GdalToolsBasePluginWidget类代码示例

本文整理汇总了Python中widgetPluginBase.GdalToolsBasePluginWidget的典型用法代码示例。如果您正苦于以下问题:Python GdalToolsBasePluginWidget类的具体用法?Python GdalToolsBasePluginWidget怎么用?Python GdalToolsBasePluginWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GdalToolsBasePluginWidget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的widgetPluginBase.GdalToolsBasePluginWidget类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。