class_docstr: Abstract class used for exporting graphics to file / printer / whatever.
class_docstr_tok: ["Abstract","class","used","for","exporting","graphics","to","file","\/","printer","\/","whatever","."]
code: def fileSaveFinished(self, fileName):
      global LastExportDirectory
      LastExportDirectory = os.path.split(fileName)[0]
  
      ## If file name does not match selected extension, append it now
      ext = os.path.splitext(fileName)[1].lower().lstrip(".")
      selectedExt = re.search(
          r"\*\.(\w+)\b", self.fileDialog.selectedNameFilter()
      )
      if selectedExt is not None:
          selectedExt = selectedExt.groups()[0].lower()
          if ext != selectedExt:
              fileName = fileName + "." + selectedExt.lstrip(".")
  
      self.export(fileName=fileName, **self.fileDialog.opts)
  
file_path: pyqtgraph/pyqtgraph/exporters/Exporter.py
imports: import os
  import re
  from ..GraphicsScene import GraphicsScene
  from ..Qt import QtCore, QtWidgets
  from ..widgets.FileDialog import FileDialog
label_desc: Use image node_id 6 for calling the Exporter obj's underlying member method code with example usage: obj.fileSaveFinished(fileName) without return types