code: def toggle_concatenate(self):
          
          if not (self.chunk['epoch'].isChecked() and
                  self.lock_to_staging.get_value()):
              for i,j in zip([self.idx_chan, self.idx_cycle, self.idx_stage,
                              self.idx_evt_type],
                     [self.cat['chan'], self.cat['cycle'],
                      self.cat['stage'], self.cat['evt_type']]):
                  if len(i.selectedItems()) > 1:
                      j.setEnabled(True)
                  else:
                      j.setEnabled(False)
                      j.setChecked(False)
  
          if not self.chunk['event'].isChecked():
              self.cat['evt_type'].setEnabled(False)
  
          if not self.cat['discontinuous'].get_value():
              self.cat['chan'].setEnabled(False)
              self.cat['chan'].setChecked(False)
  
          self.update_nseg()
docs: Enable and disable concatenation options.