def setpipelists(self): self._tubinglist = database_manager.query("ReferencePipe", cols=["id", "name"], wcol="quality", wval="tubing") self._stainlesslist = database_manager.query("ReferencePipe", cols=["id", "name"], wcol="quality", wval="stainless") self._carbonlist = database_manager.query("ReferencePipe", cols=["id", "name"], wcol="quality", wval="carbon")
def fluid(self, value): self._fluid_id = value answerlist = database_manager.query("ReferenceFluid", wcol="id", wval=value) ans = answerlist[0] self._fluid = ReferenceFluid(ans["name"], ans["sg"], ans["viscosity"], ans["tempC"])
def _setPipeWidgetList(self): self._pipewidgetlist = [] for item in self.pipelist: a = database_manager.query( "ReferencePipe", cols=["name", "quality", "dnom_in", "dact_in"], wcol="id", wval=item[0]) ans = a[0] self._pipewidgetlist.append( ReferencePipe(ans[0], ans[1], ans[2], ans[3]))
def _setPipeWidgetList(self): self._pipewidgetlist = [] for item in self.pipelist: a = database_manager.query("ReferencePipe", cols=["name", "quality", "dnom_in", "dact_in"], wcol="id", wval=item[0]) ans = a[0] self._pipewidgetlist.append(ReferencePipe( ans[0], ans[1], ans[2], ans[3]))
def setfluidlist(self): self._fluidlist = database_manager.query("ReferenceFluid", cols=["id", "name"])