from ui.editor import Editor


class Leak_Step_Editor(Editor):
    def __init__(self, action=None, cell_widget=None):
        super().__init__(action=action, cell_widget=cell_widget)
        self.spec.update({
            # pre-filling
            "pre_filling_time": self.pre_filling_time_sb,
            "pre_filling_pressure": self.pre_filling_pressure_sb,
            # filling
            "filling_time": self.filling_time_sb,
            "settling_time": self.settling_time_sb,
            "settling_pressure_min_percent": self.settling_pressure_min_percent_sb,
            "settling_pressure_max_percent": self.settling_pressure_max_percent_sb,
            # test
            "test_time": self.test_time_sb,
            "test_pressure_qneg": self.test_pressure_qneg_sb,
            "test_pressure": self.test_pressure_sb,
            "test_pressure_qpos": self.test_pressure_qpos_sb,

            # flush
            "flush_time": self.flush_time_sb,
            "flush_pressure": self.flush_pressure_sb,
            # relay
            "chan_sel": self.chan_sel_sb,
            "ext_blow_time": self.ext_blow_time_sb,
            "ext_flush_time": self.ext_flush_time_sb,
            #PID
            "pid_pressure_correction": self.test_pid_correction_sb,
        })
