code: def import_events(self, source='wonambi'):
          
          if self.annot is None:  # remove if buttons are disabled
              self.parent.statusBar().showMessage('No score file loaded')
              return
  
          if 'wonambi' == source:
              format_str = 'CSV File (*.csv)'
              rec_start = None
          
          elif 'remlogic' == source:
              format_str = 'Text file (*.txt)'
              rec_start = self.parent.info.dataset.header['start_time']
              
          
          fn, _ = QFileDialog.getOpenFileName(self, 'Import events',
                                              None, format_str)
          
          if fn == '':
              return
          
          fn = Path(fn).resolve()
  
          self.annot.import_events(fn, source=source, rec_start=rec_start,
                                   parent=self.parent)
          self.display_notes()
docs: action: import events from text file (Wonambi or RemLogic).