def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Planet temperature range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1, 1) grid.setColumnMinimumWidth(0, 60) self.planet_temperature_from = PlanetTemperature() self.planet_temperature_from.label.setText('From:') range_from = 0 if not range_from else range_from self.planet_temperature_from.value.setValue(range_from) self.planet_temperature_to = PlanetTemperature() self.planet_temperature_to.label.setText('To:') range_to = 1000 if not range_to else range_to self.planet_temperature_to.value.setValue(range_to) self.planet_temperature_step = PlanetTemperatureStep() range_step = self.planet_temperature_step.value.value( ) if not range_step else range_step self.planet_temperature_step.value.setValue(range_step) add_triplet(grid, self.planet_temperature_from, 1) add_triplet(grid, self.planet_temperature_to, 2) add_triplet(grid, self.planet_temperature_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Darkening coefficient 1 range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1, 1) grid.setColumnMinimumWidth(0, 60) self.darkening_coefficient_1_from = DarkeningCoefficient() self.darkening_coefficient_1_from.label.setText('From:') range_from = 0 if not range_from else range_from self.darkening_coefficient_1_from.value.setValue(range_from) self.darkening_coefficient_1_to = DarkeningCoefficient() self.darkening_coefficient_1_to.label.setText('To:') range_to = 1 if not range_to else range_to self.darkening_coefficient_1_to.value.setValue(range_to) self.darkening_coefficient_1_step = DarkeningCoefficientStep() range_step = self.darkening_coefficient_1_step.value.value( ) if not range_step else range_step self.darkening_coefficient_1_step.value.setValue(range_step) add_triplet(grid, self.darkening_coefficient_1_from, 1) add_triplet(grid, self.darkening_coefficient_1_to, 2) add_triplet(grid, self.darkening_coefficient_1_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, values=None): RangeDialog.__init__(self, 'Darkening law range') self.setFixedHeight(102) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1, 1) self.checkboxes = [] row = 1 cell = 1 for item in DarkeningLaw.items: checkbox = QCheckBox(item[0]) checkbox.setObjectName(item[1]) checkbox.stateChanged.connect(self._on_checkbox_state_changed) grid.addWidget(checkbox, row, cell) self.checkboxes.append(checkbox) if values and item[1] in values: checkbox.setChecked(True) cell += 1 if cell > 2: cell = 1 row += 1 self.layout().insertLayout(0, grid) if not len(self.values()): self.ok_button.setDisabled(True)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Semi-major axis range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1, 1) grid.setColumnMinimumWidth(0, 60) self.semi_major_axis_from = SemiMajorAxis() self.semi_major_axis_from.label.setText('From:') range_from = 0.001 if not range_from else range_from self.semi_major_axis_from.value.setValue(range_from) self.semi_major_axis_to = SemiMajorAxis() self.semi_major_axis_to.label.setText('To:') range_to = 2 if not range_to else range_to self.semi_major_axis_to.value.setValue(range_to) self.semi_major_axis_step = SemiMajorAxisStep() range_step = self.semi_major_axis_step.value.value( ) if not range_step else range_step self.semi_major_axis_step.value.setValue(range_step) add_triplet(grid, self.semi_major_axis_from, 1) add_triplet(grid, self.semi_major_axis_to, 2) add_triplet(grid, self.semi_major_axis_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Inclination range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1, 1) grid.setColumnMinimumWidth(0, 60) self.inclination_from = Inclination() self.inclination_from.label.setText('From:') range_from = 85 if not range_from else range_from self.inclination_from.value.setValue(range_from) self.inclination_to = Inclination() self.inclination_to.label.setText('To:') range_to = 90 if not range_to else range_to self.inclination_to.value.setValue(range_to) self.inclination_step = InclinationStep() range_step = self.inclination_step.value.value( ) if not range_step else range_step self.inclination_step.value.setValue(range_step) add_triplet(grid, self.inclination_from, 1) add_triplet(grid, self.inclination_to, 2) add_triplet(grid, self.inclination_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Planet temperature range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1,1) grid.setColumnMinimumWidth(0,60) self.planet_temperature_from = PlanetTemperature() self.planet_temperature_from.label.setText('From:') range_from = 0 if not range_from else range_from self.planet_temperature_from.value.setValue(range_from) self.planet_temperature_to = PlanetTemperature() self.planet_temperature_to.label.setText('To:') range_to = 1000 if not range_to else range_to self.planet_temperature_to.value.setValue(range_to) self.planet_temperature_step = PlanetTemperatureStep() range_step = self.planet_temperature_step.value.value() if not range_step else range_step self.planet_temperature_step.value.setValue(range_step) add_triplet(grid, self.planet_temperature_from, 1) add_triplet(grid, self.planet_temperature_to, 2) add_triplet(grid, self.planet_temperature_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Darkening coefficient 1 range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1,1) grid.setColumnMinimumWidth(0,60) self.darkening_coefficient_1_from = DarkeningCoefficient() self.darkening_coefficient_1_from.label.setText('From:') range_from = 0 if not range_from else range_from self.darkening_coefficient_1_from.value.setValue(range_from) self.darkening_coefficient_1_to = DarkeningCoefficient() self.darkening_coefficient_1_to.label.setText('To:') range_to = 1 if not range_to else range_to self.darkening_coefficient_1_to.value.setValue(range_to) self.darkening_coefficient_1_step = DarkeningCoefficientStep() range_step = self.darkening_coefficient_1_step.value.value() if not range_step else range_step self.darkening_coefficient_1_step.value.setValue(range_step) add_triplet(grid, self.darkening_coefficient_1_from, 1) add_triplet(grid, self.darkening_coefficient_1_to, 2) add_triplet(grid, self.darkening_coefficient_1_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, values=None): RangeDialog.__init__(self, 'Darkening law range') self.setFixedHeight(102) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1,1) self.checkboxes = [] row = 1 cell = 1 for item in DarkeningLaw.items: checkbox = QCheckBox(item[0]) checkbox.setObjectName(item[1]) checkbox.stateChanged.connect(self._on_checkbox_state_changed) grid.addWidget(checkbox, row, cell) self.checkboxes.append(checkbox) if values and item[1] in values: checkbox.setChecked(True) cell += 1 if cell > 2: cell = 1 row += 1 self.layout().insertLayout(0, grid) if not len(self.values()): self.ok_button.setDisabled(True)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Semi-major axis range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1,1) grid.setColumnMinimumWidth(0,60) self.semi_major_axis_from = SemiMajorAxis() self.semi_major_axis_from.label.setText('From:') range_from = 0.001 if not range_from else range_from self.semi_major_axis_from.value.setValue(range_from) self.semi_major_axis_to = SemiMajorAxis() self.semi_major_axis_to.label.setText('To:') range_to = 2 if not range_to else range_to self.semi_major_axis_to.value.setValue(range_to) self.semi_major_axis_step = SemiMajorAxisStep() range_step = self.semi_major_axis_step.value.value() if not range_step else range_step self.semi_major_axis_step.value.setValue(range_step) add_triplet(grid, self.semi_major_axis_from, 1) add_triplet(grid, self.semi_major_axis_to, 2) add_triplet(grid, self.semi_major_axis_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Inclination range') self.setFixedHeight(140) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1,1) grid.setColumnMinimumWidth(0,60) self.inclination_from = Inclination() self.inclination_from.label.setText('From:') range_from = 85 if not range_from else range_from self.inclination_from.value.setValue(range_from) self.inclination_to = Inclination() self.inclination_to.label.setText('To:') range_to = 90 if not range_to else range_to self.inclination_to.value.setValue(range_to) self.inclination_step = InclinationStep() range_step = self.inclination_step.value.value() if not range_step else range_step self.inclination_step.value.setValue(range_step) add_triplet(grid, self.inclination_from, 1) add_triplet(grid, self.inclination_to, 2) add_triplet(grid, self.inclination_step, 3) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Planet radius range') self.setFixedHeight(222) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1, 1) grid.setColumnMinimumWidth(0, 60) self.planet_radius_from = PlanetRadiusAU() self.planet_radius_from.label.setText('From:') self.planet_radius_from_rj = PlanetRadiusRJ() self.planet_radius_to = PlanetRadiusAU() self.planet_radius_to.label.setText('To:') self.planet_radius_to_rj = PlanetRadiusRJ() self.planet_radius_step = PlanetRadiusStepAU() self.planet_radius_step_rj = PlanetRadiusStepRJ() self.planet_radius_from.value.valueChanged.connect(self._on_au_change) self.planet_radius_to.value.valueChanged.connect(self._on_au_change) self.planet_radius_step.value.valueChanged.connect(self._on_au_change) self.planet_radius_from_rj.value.valueChanged.connect( self._on_rj_change) self.planet_radius_to_rj.value.valueChanged.connect(self._on_rj_change) self.planet_radius_step_rj.value.valueChanged.connect( self._on_rj_change) self.planet_radius_from.value.setValue( 0 if not range_from else range_from) self.planet_radius_to.value.setValue(1 if not range_to else range_to) self.planet_radius_step.value.setValue( 0.001 if not range_step else range_step) add_triplet(grid, self.planet_radius_from, 1) add_triplet(grid, self.planet_radius_from_rj, 2) add_triplet(grid, self.planet_radius_to, 3) add_triplet(grid, self.planet_radius_to_rj, 4) add_triplet(grid, self.planet_radius_step, 5) add_triplet(grid, self.planet_radius_step_rj, 6) self.layout().insertLayout(0, grid)
def __init__(self, range_from=None, range_to=None, range_step=None): RangeDialog.__init__(self, 'Planet radius range') self.setFixedHeight(222) grid = QGridLayout() grid.setAlignment(Qt.AlignTop) grid.setColumnStretch(1,1) grid.setColumnMinimumWidth(0,60) self.planet_radius_from = PlanetRadiusAU() self.planet_radius_from.label.setText('From:') self.planet_radius_from_rj = PlanetRadiusRJ() self.planet_radius_to = PlanetRadiusAU() self.planet_radius_to.label.setText('To:') self.planet_radius_to_rj = PlanetRadiusRJ() self.planet_radius_step = PlanetRadiusStepAU() self.planet_radius_step_rj = PlanetRadiusStepRJ() self.planet_radius_from.value.valueChanged.connect(self._on_au_change) self.planet_radius_to.value.valueChanged.connect(self._on_au_change) self.planet_radius_step.value.valueChanged.connect(self._on_au_change) self.planet_radius_from_rj.value.valueChanged.connect(self._on_rj_change) self.planet_radius_to_rj.value.valueChanged.connect(self._on_rj_change) self.planet_radius_step_rj.value.valueChanged.connect(self._on_rj_change) self.planet_radius_from.value.setValue(0 if not range_from else range_from) self.planet_radius_to.value.setValue(1 if not range_to else range_to) self.planet_radius_step.value.setValue(0.001 if not range_step else range_step) add_triplet(grid, self.planet_radius_from, 1) add_triplet(grid, self.planet_radius_from_rj, 2) add_triplet(grid, self.planet_radius_to, 3) add_triplet(grid, self.planet_radius_to_rj, 4) add_triplet(grid, self.planet_radius_step, 5) add_triplet(grid, self.planet_radius_step_rj, 6) self.layout().insertLayout(0, grid)