Esempio n. 1
0
    def _do_load_page(self, **kwargs):
        """
        Load the Switch assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        if _attributes['hazard_rate_method_id'] == 2:
            self.cmbApplication.handler_block(self._lst_handler_id[1])
            self.cmbApplication.set_active(_attributes['application_id'])
            self.cmbApplication.handler_unblock(self._lst_handler_id[1])

            self.cmbConstruction.handler_block(self._lst_handler_id[2])
            self.cmbConstruction.set_active(_attributes['construction_id'])
            self.cmbConstruction.handler_unblock(self._lst_handler_id[2])

            self.cmbContactForm.handler_block(self._lst_handler_id[3])
            self.cmbContactForm.set_active(_attributes['contact_form_id'])
            self.cmbContactForm.handler_unblock(self._lst_handler_id[3])

            self.txtNCycles.handler_block(self._lst_handler_id[4])
            self.txtNCycles.set_text(
                str(self.fmt.format(_attributes['n_cycles'])))
            self.txtNCycles.handler_unblock(self._lst_handler_id[4])

            self.txtNElements.handler_block(self._lst_handler_id[5])
            self.txtNElements.set_text(
                str(self.fmt.format(_attributes['n_elements'])))
            self.txtNElements.handler_unblock(self._lst_handler_id[5])

        return _return
Esempio n. 2
0
    def _do_load_page(self, **kwargs):
        """
        Load the Miscellaneous assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        if self._subcategory_id == 4:  # Lamp
            self.cmbApplication.handler_block(self._lst_handler_id[1])
            self.cmbApplication.set_active(_attributes['application_id'])
            self.cmbApplication.handler_unblock(self._lst_handler_id[1])
        elif self._subcategory_id == 2:  # Filter
            self.cmbType.handler_block(self._lst_handler_id[2])
            self.cmbType.set_active(_attributes['type_id'])
            self.cmbType.handler_unblock(self._lst_handler_id[2])

        if _attributes['hazard_rate_method_id'] == 2:
            if self._subcategory_id == 1:  # Crystal
                self.txtFrequency.handler_block(self._lst_handler_id[3])
                self.txtFrequency.set_text(
                    str(self.fmt.format(_attributes['frequency_operating'])))
                self.txtFrequency.handler_unblock(self._lst_handler_id[3])
            elif self._subcategory_id == 4:  # Lamp
                self.txtUtilization.handler_block(self._lst_handler_id[4])
                self.txtUtilization.set_text(
                    str(self.fmt.format(_attributes['duty_cycle'])))
                self.txtUtilization.handler_unblock(self._lst_handler_id[4])

        return _return
Esempio n. 3
0
    def _do_load_page(self, **kwargs):
        """
        Load the Relay assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        self.cmbType.handler_block(self._lst_handler_id[1])
        self.cmbType.set_active(_attributes['type_id'])
        self.cmbType.handler_unblock(self._lst_handler_id[1])

        if _attributes['hazard_rate_method_id'] == 2:
            self.cmbLoadType.handler_block(self._lst_handler_id[2])
            self.cmbLoadType.set_active(_attributes['technology_id'])
            self.cmbLoadType.handler_unblock(self._lst_handler_id[2])

            self.cmbContactForm.handler_block(self._lst_handler_id[3])
            self.cmbContactForm.set_active(_attributes['contact_form_id'])
            self.cmbContactForm.handler_unblock(self._lst_handler_id[3])

            self.cmbContactRating.handler_block(self._lst_handler_id[4])
            self.cmbContactRating.set_active(_attributes['contact_rating_id'])
            # Load the application RAMSTKComboBox().
            try:
                _data = self._dic_application[_attributes['contact_rating_id']]
            except KeyError:
                _data = []
            self.cmbApplication.do_load_combo(_data)
            self.cmbContactRating.handler_unblock(self._lst_handler_id[4])

            self.cmbApplication.handler_block(self._lst_handler_id[5])
            self.cmbApplication.set_active(_attributes['application_id'])
            # Load the construction RAMSTKComboBox().
            try:
                _data = self._dic_construction[_attributes[
                    'contact_rating_id']][_attributes['application_id']]
            except KeyError:
                _data = []
            self.cmbConstruction.do_load_combo(_data)
            self.cmbApplication.handler_unblock(self._lst_handler_id[5])

            self.cmbConstruction.handler_block(self._lst_handler_id[6])
            self.cmbConstruction.set_active(_attributes['construction_id'])
            self.cmbConstruction.handler_unblock(self._lst_handler_id[6])

            self.txtCycles.handler_block(self._lst_handler_id[7])
            self.txtCycles.set_text(
                str(self.fmt.format(_attributes['n_cycles'])))
            self.txtCycles.handler_unblock(self._lst_handler_id[7])

        return _return
Esempio n. 4
0
    def _do_load_page(self, **kwargs):
        """
        Load the Semiconductor assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        if _attributes['hazard_rate_method_id'] == 2:
            self.cmbApplication.handler_block(self._lst_handler_id[1])
            self.cmbApplication.set_active(_attributes['application_id'])
            self.cmbApplication.handler_unblock(self._lst_handler_id[1])

            self.cmbConstruction.handler_block(self._lst_handler_id[2])
            self.cmbConstruction.set_active(_attributes['construction_id'])
            self.cmbConstruction.handler_unblock(self._lst_handler_id[2])

            self.cmbMatching.handler_block(self._lst_handler_id[3])
            self.cmbMatching.set_active(_attributes['matching_id'])
            self.cmbMatching.handler_unblock(self._lst_handler_id[3])

            self.cmbPackage.handler_block(self._lst_handler_id[4])
            self.cmbPackage.set_active(_attributes['package_id'])
            self.cmbPackage.handler_unblock(self._lst_handler_id[4])

            self.cmbType.handler_block(self._lst_handler_id[5])
            self.cmbType.set_active(_attributes['type_id'])
            self.cmbType.handler_unblock(self._lst_handler_id[5])

            self.txtFrequencyOperating.handler_block(self._lst_handler_id[6])
            self.txtFrequencyOperating.set_text(
                str(self.fmt.format(_attributes['frequency_operating'])))
            self.txtFrequencyOperating.handler_unblock(self._lst_handler_id[6])

            self.txtNElements.handler_block(self._lst_handler_id[7])
            self.txtNElements.set_text(
                str(self.fmt.format(_attributes['n_elements'])))
            self.txtNElements.handler_unblock(self._lst_handler_id[7])

            self.txtThetaJC.handler_block(self._lst_handler_id[8])
            self.txtThetaJC.set_text(
                str(self.fmt.format(_attributes['theta_jc'])))
            self.txtThetaJC.handler_unblock(self._lst_handler_id[8])

        return _return
Esempio n. 5
0
    def _do_load_page(self, **kwargs):
        """
        Load the Meter assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        self.cmbApplication.handler_block(self._lst_handler_id[1])
        self.cmbApplication.set_active(_attributes['application_id'])
        self.cmbApplication.handler_unblock(self._lst_handler_id[1])

        self.cmbType.handler_block(self._lst_handler_id[2])
        self.cmbType.set_active(_attributes['type_id'])
        self.cmbType.handler_unblock(self._lst_handler_id[2])

        return _return
Esempio n. 6
0
    def _do_load_page(self, **kwargs):
        """
        Load the Capacitor Assessment Inputs page.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        # We don't block the callback signal otherwise the style
        # RAMSTKComboBox() will not be loaded and set.
        self.cmbSpecification.set_active(_attributes['specification_id'])

        if (_attributes['hazard_rate_method_id'] != 1
                and self._subcategory_id == 1):
            self.cmbStyle.handler_block(self._lst_handler_id[2])
            self.cmbStyle.set_active(_attributes['type_id'])
            self.cmbStyle.handler_unblock(self._lst_handler_id[2])

            self.cmbConfiguration.handler_block(self._lst_handler_id[3])
            self.cmbConfiguration.set_active(_attributes['configuration_id'])
            self.cmbConfiguration.handler_unblock(self._lst_handler_id[3])

            self.cmbConstruction.handler_block(self._lst_handler_id[4])
            self.cmbConstruction.set_active(_attributes['construction_id'])
            self.cmbConstruction.handler_unblock(self._lst_handler_id[4])

            self.txtCapacitance.handler_block(self._lst_handler_id[5])
            self.txtCapacitance.set_text(
                str(self.fmt.format(_attributes['capacitance'])))
            self.txtCapacitance.handler_unblock(self._lst_handler_id[5])

            self.txtESR.handler_block(self._lst_handler_id[6])
            self.txtESR.set_text(
                str(self.fmt.format(_attributes['resistance'])))
            self.txtESR.handler_unblock(self._lst_handler_id[6])

        return _return
Esempio n. 7
0
    def _do_load_page(self, **kwargs):
        """
        Load the Resistor assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        self.cmbType.handler_block(self._lst_handler_id[2])
        self.cmbType.set_active(_attributes['type_id'])
        self.cmbType.handler_unblock(self._lst_handler_id[2])

        if _attributes['hazard_rate_method_id'] == 2:
            self.cmbSpecification.handler_block(self._lst_handler_id[1])
            self.cmbSpecification.set_active(_attributes['specification_id'])
            self.cmbSpecification.handler_unblock(self._lst_handler_id[1])

            self.cmbStyle.handler_block(self._lst_handler_id[3])
            self.cmbStyle.set_active(_attributes['family_id'])
            self.cmbStyle.handler_unblock(self._lst_handler_id[3])

            self.cmbConstruction.handler_block(self._lst_handler_id[4])
            self.cmbConstruction.set_active(_attributes['construction_id'])
            self.cmbConstruction.handler_unblock(self._lst_handler_id[4])

            self.txtResistance.handler_block(self._lst_handler_id[5])
            self.txtResistance.set_text(
                str(self.fmt.format(_attributes['resistance'])))
            self.txtResistance.handler_unblock(self._lst_handler_id[5])

            self.txtNElements.handler_block(self._lst_handler_id[6])
            self.txtNElements.set_text(
                str(self.fmt.format(_attributes['n_elements'])))
            self.txtNElements.handler_unblock(self._lst_handler_id[6])

        return _return
Esempio n. 8
0
    def _do_load_page(self, **kwargs):
        """
        Load the Inductor assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        self.cmbFamily.handler_block(self._lst_handler_id[3])
        self.cmbFamily.set_active(_attributes['family_id'])
        self.cmbFamily.handler_unblock(self._lst_handler_id[3])

        if _attributes['hazard_rate_method_id'] == 2:
            self.cmbSpecification.handler_block(self._lst_handler_id[1])
            self.cmbSpecification.set_active(_attributes['specification_id'])
            self.cmbSpecification.handler_unblock(self._lst_handler_id[1])

            self.cmbInsulation.handler_block(self._lst_handler_id[2])
            self.cmbInsulation.set_active(_attributes['insulation_id'])
            self.cmbInsulation.handler_unblock(self._lst_handler_id[2])

            self.cmbConstruction.handler_block(self._lst_handler_id[4])
            self.cmbConstruction.set_active(_attributes['construction_id'])
            self.cmbConstruction.handler_unblock(self._lst_handler_id[4])

            self.txtArea.handler_block(self._lst_handler_id[5])
            self.txtArea.set_text(str(self.fmt.format(_attributes['area'])))
            self.txtArea.handler_unblock(self._lst_handler_id[5])

            self.txtWeight.handler_block(self._lst_handler_id[6])
            self.txtWeight.set_text(str(self.fmt.format(
                _attributes['weight'])))
            self.txtWeight.handler_unblock(self._lst_handler_id[6])

        return _return
Esempio n. 9
0
    def _do_load_page(self, **kwargs):
        """
        Load the Integrated Circuit assesment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        if self._subcategory_id == 10:
            self.cmbManufacturing.handler_block(self._lst_handler_id[4])
            self.cmbManufacturing.set_active(_attributes['manufacturing_id'])
            self.cmbManufacturing.handler_unblock(self._lst_handler_id[4])

            self.cmbType.handler_block(self._lst_handler_id[7])
            self.cmbType.set_active(_attributes['type_id'])
            self.cmbType.handler_unblock(self._lst_handler_id[7])

            self.txtArea.handler_block(self._lst_handler_id[8])
            self.txtArea.set_text(str(self.fmt.format(_attributes['area'])))
            self.txtArea.handler_unblock(self._lst_handler_id[8])

            self.txtFeatureSize.handler_block(self._lst_handler_id[9])
            self.txtFeatureSize.set_text(
                str(self.fmt.format(_attributes['feature_size'])))
            self.txtFeatureSize.handler_unblock(self._lst_handler_id[9])

            self.txtVoltageESD.handler_block(self._lst_handler_id[15])
            self.txtVoltageESD.set_text(
                str(self.fmt.format(_attributes['voltage_esd'])))
            self.txtVoltageESD.handler_unblock(self._lst_handler_id[15])

        if _attributes['hazard_rate_method_id'] == 1:
            self.txtNElements.handler_block(self._lst_handler_id[12])
            self.txtNElements.set_text(str(_attributes['n_elements']))
            self.txtNElements.handler_unblock(self._lst_handler_id[12])

            if self._subcategory_id in [1, 2, 3, 4, 5, 8]:
                self.cmbTechnology.handler_block(self._lst_handler_id[6])
                self.cmbTechnology.set_active(_attributes['technology_id'])
                self.cmbTechnology.handler_unblock(self._lst_handler_id[6])

        elif _attributes['hazard_rate_method_id'] == 2:
            self.cmbPackage.handler_block(self._lst_handler_id[5])
            self.cmbPackage.set_active(_attributes['package_id'])
            self.cmbPackage.handler_unblock(self._lst_handler_id[5])

            self.txtArea.handler_block(self._lst_handler_id[8])
            self.txtArea.set_text(str(self.fmt.format(_attributes['area'])))
            self.txtArea.handler_unblock(self._lst_handler_id[8])

            self.txtNElements.handler_block(self._lst_handler_id[12])
            self.txtNElements.set_text(str(_attributes['n_elements']))
            self.txtNElements.handler_unblock(self._lst_handler_id[12])

            self.txtThetaJC.handler_block(self._lst_handler_id[14])
            self.txtThetaJC.set_text(
                str(self.fmt.format(_attributes['theta_jc'])))
            self.txtThetaJC.handler_unblock(self._lst_handler_id[14])

            if self._subcategory_id in [1, 2, 3, 4]:
                self.cmbTechnology.handler_block(self._lst_handler_id[6])
                self.cmbTechnology.set_active(_attributes['technology_id'])
                self.cmbTechnology.handler_unblock(self._lst_handler_id[6])

                self.txtNActivePins.handler_block(self._lst_handler_id[10])
                self.txtNActivePins.set_text(str(_attributes['n_active_pins']))
                self.txtNActivePins.handler_unblock(self._lst_handler_id[10])

                self.txtYearsInProduction.handler_block(
                    self._lst_handler_id[16])
                self.txtYearsInProduction.set_text(
                    str(_attributes['years_in_production']))
                self.txtYearsInProduction.handler_unblock(
                    self._lst_handler_id[16])
            elif self._subcategory_id in [5, 7, 8]:
                self.cmbTechnology.handler_block(self._lst_handler_id[6])
                self.cmbTechnology.set_active(_attributes['technology_id'])
                self.cmbTechnology.handler_unblock(self._lst_handler_id[6])
            elif self._subcategory_id == 6:
                self.cmbConstruction.handler_block(self._lst_handler_id[2])
                self.cmbConstruction.set_active(_attributes['construction_id'])
                self.cmbConstruction.handler_unblock(self._lst_handler_id[2])

                self.cmbTechnology.handler_block(self._lst_handler_id[6])
                self.cmbTechnology.set_active(_attributes['technology_id'])
                self.cmbTechnology.handler_unblock(self._lst_handler_id[6])

                self.cmbType.handler_block(self._lst_handler_id[7])
                self.cmbType.set_active(_attributes['type_id'])  # Use for ECC.
                self.cmbType.handler_unblock(self._lst_handler_id[7])

                self.txtNCycles.handler_block(self._lst_handler_id[11])
                self.txtNCycles.set_text(str(_attributes['n_cycles']))
                self.txtNCycles.handler_unblock(self._lst_handler_id[11])

                self.txtOperatingLife.handler_block(self._lst_handler_id[13])
                self.txtOperatingLife.set_text(
                    str(self.fmt.format(_attributes['operating_life'])))
                self.txtOperatingLife.handler_unblock(self._lst_handler_id[13])
            elif self._subcategory_id == 9:
                self.cmbApplication.handler_block(self._lst_handler_id[1])
                self.cmbApplication.set_active(_attributes['application_id'])
                self.cmbApplication.handler_unblock(self._lst_handler_id[1])

                self.cmbType.handler_block(self._lst_handler_id[7])
                self.cmbType.set_active(_attributes['type_id'])
                self.cmbType.handler_unblock(self._lst_handler_id[7])

                self.txtYearsInProduction.handler_block(
                    self._lst_handler_id[16])
                self.txtYearsInProduction.set_text(
                    str(_attributes['years_in_production']))
                self.txtYearsInProduction.handler_unblock(
                    self._lst_handler_id[16])

        return _return
Esempio n. 10
0
    def _do_load_page(self, **kwargs):
        """
        Load the Connection assessment input widgets.

        :return: False if successful or True if an error is encountered.
        :rtype: bool
        """
        _return = False

        _attributes = AssessmentInputs.do_load_page(self, **kwargs)

        # Load the subcategory RAMSTKComboBox.  We need to block the quality and
        # connector type RAMSTKComboBoxes otherwise loading them causes the
        # respective attributes to be set to -1.
        self.cmbQuality.handler_block(self._lst_handler_id[0])
        self.cmbType.handler_block(self._lst_handler_id[1])
        self._do_load_comboboxes(subcategory_id=_attributes['subcategory_id'])
        self.cmbQuality.handler_unblock(self._lst_handler_id[0])
        self.cmbType.handler_unblock(self._lst_handler_id[1])

        # We don't block the callback signal otherwise the specification
        # RAMSTKComboBox() will not be loaded and set.
        self.cmbType.set_active(_attributes['type_id'])

        if _attributes['hazard_rate_method_id'] == 2:
            # We don't block the callback signal otherwise the insert
            # RAMSTKComboBox() will not be loaded and set.
            self.cmbSpecification.set_active(_attributes['specification_id'])

            self.cmbInsert.handler_block(self._lst_handler_id[3])
            self.cmbInsert.set_active(_attributes['insert_id'])
            self.cmbInsert.handler_unblock(self._lst_handler_id[3])

            self.txtContactGauge.handler_block(self._lst_handler_id[4])
            self.txtContactGauge.set_text(
                str(self.fmt.format(_attributes['contact_gauge'])))
            self.txtContactGauge.handler_unblock(self._lst_handler_id[4])

            self.txtActivePins.handler_block(self._lst_handler_id[5])
            self.txtActivePins.set_text(
                str(self.fmt.format(_attributes['n_active_pins'])))
            self.txtActivePins.handler_unblock(self._lst_handler_id[5])

            self.txtAmpsContact.handler_block(self._lst_handler_id[6])
            self.txtAmpsContact.set_text(
                str(self.fmt.format(_attributes['current_operating'])))
            self.txtAmpsContact.handler_unblock(self._lst_handler_id[6])

            self.txtMating.handler_block(self._lst_handler_id[7])
            self.txtMating.set_text(
                str(self.fmt.format(_attributes['n_cycles'])))
            self.txtMating.handler_unblock(self._lst_handler_id[7])

            if self._subcategory_id == 4:
                self.txtNWave.handler_block(self._lst_handler_id[8])
                self.txtNWave.set_text(
                    str(self.fmt.format(_attributes['n_wave_soldered'])))
                self.txtNWave.handler_unblock(self._lst_handler_id[8])

                self.txtNHand.handler_block(self._lst_handler_id[9])
                self.txtNHand.set_text(
                    str(self.fmt.format(_attributes['n_hand_soldered'])))
                self.txtNHand.handler_unblock(self._lst_handler_id[9])

                self.txtNPlanes.handler_block(self._lst_handler_id[10])
                self.txtNPlanes.set_text(
                    str(self.fmt.format(_attributes['n_circuit_planes'])))
                self.txtNPlanes.handler_unblock(self._lst_handler_id[10])

        return _return