code: def openFiles(self, fileNames=None, rtiRegItem=None, caption=None, fileMode=None):
          
          if fileNames is None:
              dialog = QtWidgets.QFileDialog(self, caption=caption)
  
              if rtiRegItem is None:
                  nameFilter = 'All files (*);;' # Default show all files.
                  nameFilter += self.argosApplication.rtiRegistry.getFileDialogFilter()
              else:
                  nameFilter = rtiRegItem.getFileDialogFilter()
                  nameFilter += ';;All files (*)'
              dialog.setNameFilter(nameFilter)
  
              if fileMode:
                  dialog.setFileMode(fileMode)
  
              if dialog.exec_() == QtWidgets.QFileDialog.Accepted:
                  fileNames = dialog.selectedFiles()
              else:
                  fileNames = []
  
          fileRootIndex = None
          for fileName in fileNames:
              rtiClass = rtiRegItem.getClass(tryImport=True) if rtiRegItem else None
              fileRootIndex = self.argosApplication.repo.loadFile(fileName, rtiClass=rtiClass)
              self.repoWidget.repoTreeView.setExpanded(fileRootIndex, True)
  
          # Select last opened file
          if fileRootIndex is not None:
              self.repoWidget.repoTreeView.setCurrentIndex(fileRootIndex)
docs: Lets the user select on or more files and opens it.
  
              :param fileNames: If None an open-file dialog allows the user to select files,
                  otherwise the files are opened directly.
              :param rtiRegItem: Open the files as this type of registered RTI. None=autodetect.
              :param caption: Optional caption for the file dialog.
              :param fileMode: is passed to the file dialog.
              :rtype fileMode: QtWidgets.QFileDialog.FileMode constant