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)
예제 #2
0
파일: doQscape.py 프로젝트: kpaenen/qscape
 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)
예제 #3
0
 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)