本文整理匯總了Python中code_saturne.Base.QtPage.ComboModel.getItems方法的典型用法代碼示例。如果您正苦於以下問題:Python ComboModel.getItems方法的具體用法?Python ComboModel.getItems怎麽用?Python ComboModel.getItems使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類code_saturne.Base.QtPage.ComboModel
的用法示例。
在下文中一共展示了ComboModel.getItems方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: FluidCharacteristicsView
# 需要導入模塊: from code_saturne.Base.QtPage import ComboModel [as 別名]
# 或者: from code_saturne.Base.QtPage.ComboModel import getItems [as 別名]
#.........這裏部分代碼省略.........
if tag == 'volume_viscosity':
__combo.setEnabled(True)
c = self.mdl.getPropertyMode(tag)
if c == 'variable':
__button.setEnabled(True)
else:
__button.setEnabled(False)
self.groupBoxViscv0.show()
else:
if tag == 'specific_heat':
self.groupBoxCp.setTitle('Specific heat')
self.case.undoStartGlobal()
def updateTypeChoice(self):
"""
add/suppress thermo tables for each proprties
"""
for tag, symbol in self.lst:
__model = getattr(self, "model" + symbol)
if self.mdl.getMaterials() == "user_material":
__model.disableItem(str_model='thermal_law')
else:
__model.enableItem(str_model='thermal_law')
c = self.mdl.getPropertyMode(tag)
__model.setItem(str_model=c)
def updateMethod(self):
"""
update method list with material choice
"""
for nb in range(len(self.modelMethod.getItems())):
self.modelMethod.delItem(0)
self.comboBoxPhas.hide()
self.labelPhas.hide()
if self.mdl.getMaterials() == "user_material":
self.modelMethod.addItem(self.tr('user properties'), 'user_properties')
else :
if EOS == 1:
material = self.mdl.getMaterials()
self.ava.setMethods(material)
fls = self.ava.whichMethods()
for fli in fls:
self.modelMethod.addItem(self.tr(fli),fli)
if self.mdl.getMethod() != "freesteam":
self.comboBoxPhas.show()
self.labelPhas.show()
if self.freesteam == 1 and self.mdl.getMaterials() == "Water":
self.modelMethod.addItem(self.tr("freesteam"), "freesteam")
# update comboBoxMethod
method = self.mdl.getMethod()
self.modelMethod.setItem(str_model=method)
self.updateReference()
def updateReference(self):
"""
update Reference with material, method and field nature choice
"""
# update lineEditReference