def outFile(self): # by Carson Farmer 2008 # display file dialog for output file self.outShape.clear() outName, _ = QFileDialog().getSaveFileName(self, self.tr("Output file"), ".", self.tr("GeoPackages(*.gpkg);;Comma separated values (*.csv);;Shapefiles (*.shp)"), options = QFileDialog.DontConfirmOverwrite) outPath = QFileInfo(outName).absoluteFilePath() if not outPath.upper().endswith('.GPKG') and not outPath.upper().endswith('.CSV') and not outPath.upper().endswith('.SHP'): outPath += '.gpkg' if outName: self.outShape.clear() self.outShape.insert(outPath)
def outFile(self): # display dialog for output file self.outLineEdit.clear() outName, _ = QFileDialog().getSaveFileName( self, "Output file", ".", "Comma seperated values (*.csv);;Shapefiles (*.shp)", options=QFileDialog.DontConfirmOverwrite) outPath = QFileInfo(outName).absoluteFilePath() if not outPath.upper().endswith( '.CSV') and not outPath.upper().endswith('.SHP'): outPath += '.csv' if outName: self.outLineEdit.clear() self.outLineEdit.insert(outPath)
def outFile(self): # by Carson Farmer 2008 # display file dialog for output file self.outShape.clear() outName, _ = QFileDialog().getSaveFileName( self, "Output file", ".", "GeoPackages(*.gpkg);;Comma separated values (*.csv);;Shapefiles (*.shp)", options=QFileDialog.DontConfirmOverwrite) outPath = QFileInfo(outName).absoluteFilePath() if not outPath.upper().endswith('.GPKG') and not outPath.upper( ).endswith('.CSV') and not outPath.upper().endswith('.SHP'): outPath += '.gpkg' if outName: self.outShape.clear() self.outShape.insert(outPath)