Example #1
0
    def __init__(self, iface):
        QWidget.__init__(self)
        self.iface = iface
        self.resolutions = ("highest", "average", "lowest")

        self.setupUi(self)
        BasePluginWidget.__init__(self, self.iface, "gdal_polygonize.py")

        self.outSelector.setType(self.outSelector.FILE)
        self.outputFormat = Utils.fillVectorOutputFormat()

        self.setParamsStatus([
            (self.inSelector, SIGNAL("filenameChanged()")),
            (self.outSelector, SIGNAL("filenameChanged()")),
            (self.maskSelector, SIGNAL("filenameChanged()"), self.maskCheck),
            (self.fieldEdit, SIGNAL("textChanged(const QString &)"),
             self.fieldCheck)
        ])

        self.connect(self.inSelector, SIGNAL("selectClicked()"),
                     self.fillInputFileEdit)
        self.connect(self.outSelector, SIGNAL("selectClicked()"),
                     self.fillOutputFileEdit)
        self.connect(self.maskSelector, SIGNAL("selectClicked()"),
                     self.fillMaskFileEdit)
Example #2
0
  def fillOutputFileEdit(self):
      lastUsedFilter = Utils.FileFilter.lastUsedVectorFilter()
      outputFile, encoding = Utils.FileDialog.getSaveFileName(self, self.tr( "Select where to save the Polygonize output" ), Utils.FileFilter.allVectorsFilter(), lastUsedFilter, True)
      if not outputFile:
        return
      Utils.FileFilter.setLastUsedVectorFilter(lastUsedFilter)

      self.outputFormat = Utils.fillVectorOutputFormat( lastUsedFilter, outputFile )
      self.outSelector.setFilename(outputFile)
      self.lastEncoding = encoding
Example #3
0
  def fillOutputFileEdit( self ):
      lastUsedFilter = Utils.FileFilter.lastUsedVectorFilter()
      outputFile, encoding = Utils.FileDialog.getSaveFileName( self, self.tr( "Select where to save the TileIndex output" ), Utils.FileFilter.allVectorsFilter(), lastUsedFilter, True )
      if not outputFile:
        return
      Utils.FileFilter.setLastUsedVectorFilter(lastUsedFilter)

      self.outputFormat = Utils.fillVectorOutputFormat( lastUsedFilter, outputFile )
      self.outSelector.setFilename( outputFile )
      self.lastEncoding = encoding
Example #4
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resolutions = ("highest", "average", "lowest")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_polygonize.py")

      self.outSelector.setType( self.outSelector.FILE )
      self.outputFormat = Utils.fillVectorOutputFormat()

      self.setParamsStatus(
        [
          (self.inSelector, SIGNAL("filenameChanged()")),
          (self.outSelector, SIGNAL("filenameChanged()")),
          (self.fieldEdit, SIGNAL("textChanged(const QString &)"), self.fieldCheck)
        ]
      )

      self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
      self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
Example #5
0
  def __init__(self, iface):
      QWidget.__init__(self)
      self.iface = iface
      self.resolutions = ("highest", "average", "lowest")

      self.setupUi(self)
      BasePluginWidget.__init__(self, self.iface, "gdal_polygonize.py")

      self.outputFormat = Utils.fillVectorOutputFormat()

      self.setParamsStatus(
        [
          (self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
          (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
          (self.fieldEdit, SIGNAL("textChanged(const QString &)"), self.fieldCheck)
        ]
      )

      self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFileEdit)
      self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)

      # fill layers combo
      self.fillInputLayerCombo()