def color_oldDB_sections(self, old_section, intg_section, combo_section):
"""display old sections in red color.
Args:
old_section(str): Old sections from IS 808 1984
intg_section(str): Revised sections from IS 808 2007
combo_section(QcomboBox): Beam/Column dropdown list
Returns:
"""
for col in old_section:
if col in intg_section:
indx = intg_section.index(str(col))
combo_section.setItemData(indx, QBrush(QColor("red")), Qt.TextColorRole)
duplicate = [i for i, x in enumerate(intg_section) if intg_section.count(x) > 1]
for i in duplicate:
combo_section.setItemData(i, QBrush(QColor("red")), Qt.TextColorRole)
评论列表
文章目录