def local_show():
     row = self.header_index("name")
     sub_name = ""
     if row >= 0:
         sub_name = self.tblGeneric.item(row, column).text()
     edit_these = []
     infiltration_section = self.project.infiltration
     if isinstance(infiltration_section.value, list):
         if len(infiltration_section.value) > 0:
             for item in infiltration_section.value:
                 if item.subcatchment == str(self.tblGeneric.item(0, column).text()):
                     edit_these.append(item)
         if len(edit_these) == 0:
             infiltration = self.project.options.infiltration.upper()
             if infiltration == "HORTON":
                 new_item = HortonInfiltration()
             elif infiltration == "MODIFIED_HORTON":
                 new_item = HortonInfiltration()
             elif infiltration == "GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif infiltration == "MODIFIED_GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif infiltration == "CURVE_NUMBER":
                 new_item = CurveNumberInfiltration()
             else:
                 new_item = HortonInfiltration()
             if self._main_form and self._main_form.project_settings:
                 self._main_form.project_settings.apply_default_infiltration_attributes(new_item)
             new_item.subcatchment = sub_name
             infiltration_section.value.append(new_item)
             edit_these.append(new_item)
     editor = frmInfiltration(self, edit_these, None, "SWMM Infiltration Editor")
     editor.show()
 def local_show():
     edit_these = []
     infiltration_section = self.project.find_section('INFILTRATION')
     if isinstance(infiltration_section.value, list):
         if len(infiltration_section.value) > 0:
             for item in infiltration_section.value:
                 if item.subcatchment == str(
                         self.tblGeneric.item(0, column).text()):
                     edit_these.append(item)
         if len(edit_these) == 0:
             option_section = self.project.find_section('OPTIONS')
             new_item = HortonInfiltration()
             if option_section.infiltration == "HORTON":
                 new_item = HortonInfiltration()
             elif option_section.infiltration == "MODIFIED_HORTON":
                 new_item = HortonInfiltration()
             elif option_section.infiltration == "GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif option_section.infiltration == "MODIFIED_GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif option_section.infiltration == "CURVE_NUMBER":
                 new_item = CurveNumberInfiltration()
             infiltration_section.value.append(new_item)
             edit_these.append(new_item)
     editor = frmInfiltration(self, edit_these, None,
                              "SWMM Infiltration Editor")
     editor.show()
 def local_show():
     frm = frmInfiltration(self, [], None, "Default Infiltration Model",
                           defaults=self.defaults)
     #frm.set_from(self.project, "")
     frm.setWindowModality(QtCore.Qt.ApplicationModal)
     frm.show()
     self.refresh_column = column
     self.property_sub_changed = True
     self.set_infilmodel_cell(0)
 def local_show():
     edit_these = []
     infiltration_section = self.project.find_section('INFILTRATION')
     if isinstance(infiltration_section.value, list):
         if len(infiltration_section.value) == 0:
             option_section = self.project.find_section('OPTIONS')
             new_item = HortonInfiltration()
             if option_section.infiltration == "HORTON":
                 new_item = HortonInfiltration()
             elif option_section.infiltration == "MODIFIED_HORTON":
                 new_item = HortonInfiltration()
             elif option_section.infiltration == "GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif option_section.infiltration == "MODIFIED_GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif option_section.infiltration == "CURVE_NUMBER":
                 new_item = CurveNumberInfiltration()
             infiltration_section.value.append(new_item)
         edit_these.extend(infiltration_section.value)
     editor = frmInfiltration(self, edit_these, "SWMM Infiltration Editor")
     editor.show()
 def local_show():
     edit_these = []
     infiltration_section = self.project.find_section('INFILTRATION')
     if isinstance(infiltration_section.value, list):
         if len(infiltration_section.value) == 0:
             option_section = self.project.find_section('OPTIONS')
             new_item = HortonInfiltration()
             if option_section.infiltration == "HORTON":
                 new_item = HortonInfiltration()
             elif option_section.infiltration == "MODIFIED_HORTON":
                 new_item = HortonInfiltration()
             elif option_section.infiltration == "GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif option_section.infiltration == "MODIFIED_GREEN_AMPT":
                 new_item = GreenAmptInfiltration()
             elif option_section.infiltration == "CURVE_NUMBER":
                 new_item = CurveNumberInfiltration()
             infiltration_section.value.append(new_item)
         edit_these.extend(infiltration_section.value)
     editor = frmInfiltration(self, edit_these,
                              "SWMM Infiltration Editor")
     editor.show()