def setParameter(self, parameter): ParameterWidget.setParameter(self, parameter) self._txt_bias.setText(parameter.bias) self._txt_gain.setText(parameter.gain) self._txt_base_level.setText(parameter.base_level) self._txt_window.setText(parameter.window) self._cb_mode.setCurrentIndex(self._cb_mode.findText(parameter.mode))
def setParameter(self, header): ParameterWidget.setParameter(self, header) self._txt_title.setText(header.title) self._txt_author.setText(header.author) self._txt_owner.setText(header.owner) date = header.date if date is not None: self._txt_date.setDate(QDate(date.year, date.month, date.day)) time = header.time if time is not None: self._txt_time.setTime(QTime(time.hour, time.minute, time.second)) self._txt_timezone.setText(header.timezone) checksum = header.checksum if checksum is not None: self._txt_checksum.setText(checksum.value)