Ejemplo n.º 1
0
  def onFinished(self, exitCode, status):
      if not self.isBatchEnabled():
        from widgetPluginBase import GdalToolsBasePluginWidget as BasePluginWidget
        BasePluginWidget.onFinished(self, exitCode, status)
        return

      msg = str( self.base.process.readAllStandardError() )
      if msg != '':
        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 )
Ejemplo n.º 2
0
  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 )
Ejemplo n.º 3
0
  def onFinished(self, exitCode, status):
      if not self.isBatchEnabled():
        BasePluginWidget.onFinished(self, exitCode, status)
        return

      msg = QString( self.base.process.readAllStandardError() )
      if not msg.isEmpty():
        self.errors.append( ">> " + self.inFiles[self.batchIndex] + "<br>" + msg.replace( "\n", "<br>" ) )

      self.base.process.close()

      # overwrite existent files
      inDir = self.getInputFileName()
      outDir = self.getOutputFileName()
      if outDir == None or inDir == outDir:
        oldFile = QFile( self.inFiles[self.batchIndex] )
        newFile = QFile( self.outFiles[self.batchIndex] )
        if oldFile.remove():
          newFile.rename(self.inFiles[self.batchIndex])

      self.batchIndex += 1
      self.runItem( self.batchIndex, self.batchTotal )