def _do_load_comboboxes(self, **kwargs): """ Load the Inductor RKTComboBox()s. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: _data = [[_(u"Established Reliability")], ["MIL-SPEC"], [_(u"Lower")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the specification RAMSTKComboBox(). try: _data = self._dic_specifications[self._subcategory_id] except KeyError: _data = [] self.cmbSpecification.do_load_combo(_data) # Load the insulation class RAMSTKComboBox(). try: _data = self._dic_insulation[self._subcategory_id] except KeyError: _data = [] self.cmbInsulation.do_load_combo(_data) # Load the transformer family RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: if self._subcategory_id == 1: _data = [ [_(u"Low Power Pulse Transformer")], [_(u"Audio Transformer")], [_(u"High Power Pulse and Power Transformer, Filter")], [_(u"RF Transformer")] ] else: _data = [[_(u"RF Coils, Fixed or Molded")], [_(u"RF Coils, Variable")]] else: _data = [[_(u"Pulse Transformer")], [_("Audio Transformer")], [_(u"Power Transformer or Filter")], [_(u"RF Transformer")]] self.cmbFamily.do_load_combo(_data) # load the coil construction RAMSTKComboBox(). self.cmbConstruction.do_load_combo([[_(u"Fixed")], [_(u"Variable")]]) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the Resisotr RKTComboBox()s. :param int subcategory_id: the newly selected resistor subcategory ID. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: _data = ["S", "R", "P", "M", ["MIL-SPEC"], [_(u"Lower")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the specification RAMSTKComboBox(). try: _data = self._dic_specifications[self._subcategory_id] except KeyError: _data = [] self.cmbSpecification.do_load_combo(_data) # Load the type RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: try: _data = self._dic_types[self._subcategory_id] except KeyError: _data = [] else: _data = [[_(u"Bead")], [_(u"Disk")], [_(u"Rod")]] self.cmbType.do_load_combo(_data) # Load the style RAMSTKComboBox(). try: _data = self._dic_styles[_attributes['subcategory_id']][ _attributes['specification_id']] except (KeyError, IndexError): _data = [] self.cmbStyle.do_load_combo(_data) # Load the construction RAMSTKComboBox(). try: _data = self._dic_construction[self._subcategory_id] except KeyError: _data = [] self.cmbConstruction.do_load_combo(_data) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the relay RKTComboBox()s. This method is used to load the specification RAMSTKComboBox() whenever the relay subcategory is changed. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: _data = [[_(u"Established Reliability")], ["MIL-SPEC"], [_(u"Lower")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the relay type RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: _data = self._dic_pc_types[self._subcategory_id] else: try: _data = self._dic_types[self._subcategory_id] except KeyError: _data = [] self.cmbType.do_load_combo(_data) # Load the load type RAMSTKComboBox(). self.cmbLoadType.do_load_combo(self._lst_technology) # Load the contact form RAMSTKComboBox(). self.cmbContactForm.do_load_combo(self._lst_contact_form) # Load the contact rating RAMSTKComboBox(). self.cmbContactRating.do_load_combo(self._lst_contact_rating) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the switch RKTComboBox(). This method is used to load the specification RAMSTKComboBox() whenever the switch subcategory is changed. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). self.cmbQuality.do_load_combo([["MIL-SPEC"], [_(u"Lower")]]) # Load the application RAMSTKCOmboBOx(). try: _data = self._dic_applications[self._subcategory_id] except KeyError: _data = [] self.cmbApplication.do_load_combo(_data) # Load the construction RAMSTKComboBox(). try: if _attributes['hazard_rate_method_id'] == 1: _data = [[_(u"Thermal")], [_(u"Magnetic")]] else: _data = self._dic_constructions[self._subcategory_id] except KeyError: _data = [] self.cmbConstruction.do_load_combo(_data) # Load the contact form RAMSTKComboBox(). try: _data = self._dic_contact_forms[self._subcategory_id] except KeyError: _data = [] self.cmbContactForm.do_load_combo(_data) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the specification RKTComboBox(). This method is used to load the specification RAMSTKComboBox() whenever the capacitor subcategory is changed. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: _data = ["S", "R", "P", "M", "L", ["MIL-SPEC"], [_(u"Lower")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the specification RAMSTKComboBox(). try: _data = self._dic_specifications[self._subcategory_id] except KeyError: _data = [] self.cmbSpecification.do_load_combo(_data) self.cmbConstruction.do_load_combo([[_(u"Slug, All Tantalum")], [ _(u"Foil, Hermetic") ], [_(u"Slug, Hermetic")], [_(u"Foil, Non-Hermetic")], [_(u"Slug, Non-Hermetic")]]) self.cmbConfiguration.do_load_combo([[_(u"Fixed")], [_(u"Variable")]]) _model = self.cmbStyle.get_model() _model.clear() return _return
def _do_load_comboboxes(self, **kwargs): """ Load the meter RKTComboBox()s. This method is used to load the specification RAMSTKComboBox() whenever the meter subcategory is changed. :param int subcategory_id: the newly selected meter subcategory ID. :return: False if successful or True if an error is encountered. :rtype: bool """ _subcategory_id = kwargs['subcategory_id'] _return = False _attributes = AssessmentInputs.do_load_comboboxes( self, subcategory_id=_subcategory_id) # Load the quality level RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: _data = [["MIL-SPEC"], [_(u"Lower")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the meter appliction RAMSTKComboBox(). self.cmbApplication.do_load_combo([[_(u"Ammeter")], [_(u"Voltmeter")], [_(u"Other")]]) # Load the meter type RAMSTKComboBox(). try: _data = self._dic_types[self._subcategory_id] except KeyError: _data = [] self.cmbType.do_load_combo(_data) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the connection RKTComboBox()s. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). _attributes = self._dtc_data_controller.request_get_attributes( self._hardware_id) if _attributes['hazard_rate_method_id'] == 1: _data = [["MIL-SPEC"], [_(u"Lower")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the connector type RAMSTKComboBox(). try: _data = self._dic_type[self._subcategory_id] except KeyError: _data = [] self.cmbType.do_load_combo(_data) # Clear the remaining ramstk.ComboBox()s. These are loaded dynamically # based on the selection made in other ramstk.ComboBox()s. _model = self.cmbSpecification.get_model() _model.clear() _model = self.cmbInsert.get_model() _model.clear() return _return
def _do_load_comboboxes(self, **kwargs): # pylint: disable=unused-argument """ Load the miscellaneous RKTComboBox()s. This method is used to load the specification RAMSTKComboBox() whenever the miscellaneous subcategory is changed. :param int subcategory_id: the newly selected miscellaneous hardware item subcategory ID. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). self.cmbQuality.do_load_combo([["MIL-SPEC"], [_(u"Lower")]]) # Load the application RAMSTKComboBox(). self.cmbApplication.do_load_combo([[_(u"Incandescent, AC")], [_(u"Incandescent, DC")]]) # Load the type RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: self.cmbType.do_load_combo( [[_(u"Ceramic-Ferrite")], [_(u"Discrete LC Components")], [_(u"Discrete LC and Crystal Components")]]) elif _attributes['hazard_rate_method_id'] == 2: self.cmbType.do_load_combo( [[_(u"MIL-F-15733 Ceramic-Ferrite")], [ _(u"MIL-F-15733 Discrete LC Components") ], [_(u"MIL-F-18327 Discrete LC Components")], [_(u"MIL-F-18327 Discrete LC and Crystal Components")]]) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the integrated circuit RKTComboBox()s. :param int subcategory_id: the newly selected integrated circuit subcategory ID. :return: False if successful or True if an error is encountered. :rtype: bool """ _subcategory_id = kwargs['subcategory_id'] _return = False _attributes = AssessmentInputs.do_load_comboboxes( self, subcategory_id=_subcategory_id) # Load the quality level RAMSTKComboBox(). self.cmbQuality.do_load_combo([[_(u"Class S")], [_(u"Class B")], [_(u"Class B-1")]]) # Load the application RAMSTKComboBox(). if _attributes['construction_id'] == 1: self.cmbApplication.do_load_combo( [[_(u"Low Noise and Low Power (\u2264 100mW)")], [_(u"Driver and High Power (> 100mW)")], [_(u"Unknown")]]) else: self.cmbApplication.do_load_combo([[_(u"All digital devices")]]) # Load the Construction RAMSTKComboBox(). self.cmbConstruction.do_load_combo([["FLOTOX"], [_(u"Textured Poly")]]) # Load the error correction code RAMSTKComboBox(). self.cmbECC.do_load_combo( [[_(u"No on-chip ECC")], [_(u"On-chip Hamming code")], [_(u"Two-Needs-One redundant cell approach")]]) # Load the manufacturing process RAMSTKComboBox(). self.cmbManufacturing.do_load_combo([["QML or QPL"], ["Non-QML or non-QPL"]]) # Load the package RAMSTKComboBox(). self.cmbPackage.do_load_combo( [[_(u"Hermetic DIP w/ Solder or Weld Seal")], [_(u"Hermetic Pin Grid Array (PGA)")], [_(u"Hermetic SMT (Leaded and Nonleaded)")], [_(u"DIP w/ Glass Seal")], [_(u"Flatpacks w/ Axial Leads")], ["Can"], [_(u"Nonhermetic DIP")], [_(u"Nonhermetic Pin Grid Array (PGA)")], [_(u"Nonhermetic SMT")]]) # Load the technology RAMSTKComboBox(). try: if _attributes['hazard_rate_method_id'] == 1: if _attributes['subcategory_id'] == 9: _data = [["MMIC"], [_(u"Digital")]] else: _data = [["Bipolar"], ["MOS"]] else: _data = self._dic_technology[_attributes['subcategory_id']] except KeyError: _data = [] self.cmbTechnology.do_load_combo(_data) # Load the device type RAMSTKComboBox(). try: _data = self._dic_types[_attributes['subcategory_id']] except KeyError: _data = [] self.cmbType.do_load_combo(_data) return _return
def _do_load_comboboxes(self, **kwargs): """ Load the semiconductor RKTComboBox()s. This method is used to load the specification RAMSTKComboBox() whenever the semiconductor subcategory is changed. :param int subcategory_id: the newly selected semiconductor subcategory ID. :return: False if successful or True if an error is encountered. :rtype: bool """ _return = False _attributes = AssessmentInputs.do_load_comboboxes(self, **kwargs) # Load the quality level RAMSTKComboBox(). if _attributes['hazard_rate_method_id'] == 1: if self._subcategory_id == 13: _data = [[_(u"Hermetic Package")], [_(u"Nonhermetic with Facet Coating")], [_(u"Nonhermetic without Facet Coating")]] else: _data = [["JANTXV"], ["JANTX"], ["JAN"], [_(u"Lower")], [_(u"Plastic")]] else: try: _data = self._dic_quality[self._subcategory_id] except KeyError: _data = [] self.cmbQuality.do_load_combo(_data) # Load the application RAMSTKComboBox(). try: _data = self._dic_applications[self._subcategory_id] except KeyError: _data = [] self.cmbApplication.do_load_combo(_data) # Load the construction RAMSTKComboBox(). self.cmbConstruction.do_load_combo( [[_(u"Metallurgically Bonded")], [_(u"Non-Metallurgically Bonded and Spring Loaded Contacts")]]) # Load the matching network RAMSTKComboBox(). try: _data = self._dic_matchings[self._subcategory_id] except KeyError: _data = [] self.cmbMatching.do_load_combo(_data) # Load the package RAMSTKComboBox(). self.cmbPackage.do_load_combo(self._lst_packages) # Load the type RAMSTKComboBox(). try: if (_attributes['hazard_rate_method_id'] == 1 and self._subcategory_id == 11): _data = [[_(u"Photodetector")], [_(u"Opto-Isolator")], [_(u"Emitter")]] else: _data = self._dic_types[self._subcategory_id] except KeyError: _data = [] self.cmbType.do_load_combo(_data) return _return