code: def rename_eventtype(self, test_name=None, test_new_name=None):
          
          if test_name and test_new_name:
              name = test_name, True
              new_name = test_new_name, True
          else:
              name = QInputDialog.getText(self, 'Rename Event Type',
                                          'Enter name of event type to rename.')
          
          if name[1]:
              new_name = QInputDialog.getText(self, 'Rename Event Type',
                                              'Enter new name for event type.')
              
              if new_name[1]:
                  self.annot.rename_event_type(name[0], new_name[0])
                  self.display_eventtype()
                  self.update_annotations()
docs: action: create dialog to rename event type.