def set_object_from_form(self, entity): entity.iau_code = from_text(self.dialog.iau_code_edit.text()) entity.latitude = text_to_decimal(self.dialog.latitude_edit.text()) entity.longitude = text_to_decimal(self.dialog.longitude_edit.text()) entity.country = from_text(self.dialog.country_edit.text()) entity.full_name = from_text(self.dialog.full_name_edit.text()) entity.name_mpc = from_text(self.dialog.name_mpc_edit.text())
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) entity.galaxy_type = from_text(self.dialog.galaxy_type_edit.text()) entity.right_ascension = text_to_decimal( self.dialog.right_ascension_edit.text()) entity.declination = text_to_decimal( self.dialog.declination_edit.text()) entity.apparent_magnitude = text_to_decimal( self.dialog.apparent_magnitude_edit.text()) entity.absolute_magnitude = text_to_decimal( self.dialog.absolute_magnitude_edit.text()) entity.distance = text_to_decimal(self.dialog.distance_edit.text()) entity.diameter = text_to_decimal(self.dialog.diameter_edit.text()) entity.galaxy_group = self.dialog.galaxy_group_edit.currentData() entity.orbited_galaxy = self.dialog.orbited_galaxy_edit.currentData() entity.constellation = self.dialog.constellation_edit.currentData()
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) begin_date = self.dialog.begin_date_edit.date() entity.begin_date = datetime.date(2004, begin_date.month(), begin_date.day()) end_date = self.dialog.end_date_edit.date() entity.end_date = datetime.date(2004, end_date.month(), end_date.day()) peak_date = self.dialog.peak_date_edit.date() entity.peak_date = datetime.date(2004, peak_date.month(), peak_date.day()) entity.right_ascension = text_to_decimal( self.dialog.right_ascension_edit.text()) entity.declination = text_to_decimal( self.dialog.declination_edit.text()) entity.velocity = text_to_decimal(self.dialog.velocity_edit.text()) entity.zhr = text_to_decimal(self.dialog.zhr_edit.text()) entity.activity = from_text(self.dialog.activity_edit.text())
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) entity.spectral_type = from_text(self.dialog.spectral_type_edit.text()) entity.right_ascension = text_to_decimal( self.dialog.right_ascension_edit.text()) entity.declination = text_to_decimal( self.dialog.declination_edit.text()) entity.apparent_magnitude = text_to_decimal( self.dialog.apparent_magnitude_edit.text()) entity.absolute_magnitude = text_to_decimal( self.dialog.absolute_magnitude_edit.text()) entity.distance = text_to_decimal(self.dialog.distance_edit.text()) entity.parallax = text_to_decimal(self.dialog.parallax_edit.text()) entity.mass = text_to_decimal(self.dialog.mass_edit.text()) entity.radius = text_to_decimal(self.dialog.radius_edit.text()) entity.galaxy = self.dialog.galaxy_edit.currentData() entity.constellation = self.dialog.constellation_edit.currentData()
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) entity.right_ascension = text_to_decimal( self.dialog.right_ascension_edit.text()) entity.declination = text_to_decimal( self.dialog.declination_edit.text()) entity.distance = text_to_decimal(self.dialog.distance_edit.text()) entity.radial_velocity = text_to_decimal( self.dialog.radial_velocity_edit.text())
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) entity.type = from_text(self.dialog.type_edit.text()) entity.country = from_text(self.dialog.country_edit.text()) entity.start_date = text_to_date(self.dialog.start_date_edit.text()) entity.end_date = text_to_date(self.dialog.end_date_edit.text()) entity.period = text_to_decimal(self.dialog.period_edit.text()) entity.apoapsis = text_to_decimal(self.dialog.apoapsis_edit.text()) entity.periapsis = text_to_decimal(self.dialog.periapsis_edit.text()) entity.inclination = text_to_decimal( self.dialog.inclination_edit.text()) orbited_body = self.dialog.orbited_body_edit.currentData() if isinstance(orbited_body, astronomy.Star): entity.orbited_star = orbited_body.name else: entity.orbited_star = None if isinstance(orbited_body, astronomy.SmallBody): entity.orbited_small_body = orbited_body.name else: entity.orbited_small_body = None
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) entity.type = self.dialog.type_edit.currentText() entity.diameter = text_to_decimal(self.dialog.diameter_edit.text()) entity.mass = text_to_decimal(self.dialog.mass_edit.text()) entity.temperature = text_to_decimal( self.dialog.temperature_edit.text()) entity.period = text_to_decimal(self.dialog.period_edit.text()) entity.eccentricity = text_to_decimal( self.dialog.eccentricity_edit.text()) entity.semi_major_axis = text_to_decimal( self.dialog.semi_major_axis_edit.text()) entity.inclination = text_to_decimal( self.dialog.inclination_edit.text()) orbited_body = self.dialog.orbited_body_edit.currentData() if isinstance(orbited_body, astronomy.Star): entity.orbited_star = orbited_body.name else: entity.orbited_star = None if isinstance(orbited_body, astronomy.SmallBody): entity.orbited_small_body = orbited_body.name else: entity.orbited_small_body = None
def set_object_from_form(self, entity): entity.name = from_text(self.dialog.name_edit.text()) entity.abbreviation = from_text(self.dialog.abbreviation_edit.text()) entity.publishing_year = self.dialog.publishing_year_edit.value()
def set_object_from_form(self, entity): entity.iau_abbreviation = from_text( self.dialog.iau_abbreviation_edit.text()) entity.name = from_text(self.dialog.name_edit.text()) entity.brightest_star = from_text( self.dialog.brightest_star_edit.text())
def set_object_from_form(self, entity): entity.full_name = from_text(self.dialog.full_name_edit.text()) entity.country = from_text(self.dialog.country_edit.text()) entity.birth_date = text_to_date(self.dialog.birth_date_edit.text()) entity.death_date = text_to_date(self.dialog.death_date_edit.text()) entity.name_mpc = from_text(self.dialog.name_mpc_edit.text())