Пример #1
0
  def selectOutputFile( self ):
    lastUsedDir = rasterUtils.lastUsedDir()
    fileName = QFileDialog.getSaveFileName( self, self.tr( "Output File Name" ), lastUsedDir, "NetCDF (*.nc)" )

    if fileName.isEmpty():
      return
    if ".nc" not in fileName :
      fileName = fileName + ".nc"

    rasterUtils.setLastUsedDir( fileName )
    # ensure the user never ommited the extension from the file name
    self.leFileName.setText( fileName )
Пример #2
0
  def selectOutputFile( self ):
    lastUsedDir = rasterUtils.lastUsedDir()
    fileName = QFileDialog.getSaveFileName( self, self.tr( "Output File Name" ), lastUsedDir, "NetCDF (*.nc)" )

    if fileName.isEmpty():
      return
    if ".nc" not in fileName :
      fileName = fileName + ".nc"

    rasterUtils.setLastUsedDir( fileName )
    # ensure the user never ommited the extension from the file name
    self.leFileName.setText( fileName )
Пример #3
0
  def selectOutputFile( self ):
    lastUsedDir = rasterUtils.lastUsedDir()
    fileName = QFileDialog.getSaveFileName( self, self.tr( "Save GeoTiff file" ), lastUsedDir, "GTiff (*.tif *tiff *.TIF *.TIFF)" )

    if fileName.isEmpty():
      return

    rasterUtils.setLastUsedDir( fileName )
    # ensure the user never ommited the extension from the file name
    if not fileName.toLower().endsWith( ".tiff" ):
      if not fileName.toLower().endsWith( ".tif" ):
        fileName += ".tif"

    self.leFileName.setText( fileName )
Пример #4
0
    def selectOutputFile(self):
        lastUsedDir = rasterUtils.lastUsedDir()
        fileName = QFileDialog.getSaveFileName(
            self, self.tr("Save GeoTiff file"), lastUsedDir,
            "GTiff (*.tif *tiff *.TIF *.TIFF)")

        if fileName.isEmpty():
            return

        rasterUtils.setLastUsedDir(fileName)
        # ensure the user never ommited the extension from the file name
        if not fileName.toLower().endsWith(".tiff"):
            if not fileName.toLower().endsWith(".tif"):
                fileName += ".tif"

        self.leFileName.setText(fileName)