def METHOD_NAME(self, event):
    sr = self.current_state_record()
    menu = QMenu("", self)
    menu.addAction("New state...", self._action_new_state)
    menu.addSeparator()
    a = menu.addAction("Duplicate state", self._action_duplicate)
    if sr is None:
        a.setDisabled(True)
    a = menu.addAction("Delete state", self._action_delete)
    if sr is None:
        a.setDisabled(True)
    a = menu.addAction("New simulation manager", self._action_new_simulation_manager)
    if sr is None:
        a.setDisabled(True)
    menu.exec_(event.globalPos())