本文整理汇总了Python中model.elements.PeriodicTable.deepCopy方法的典型用法代码示例。如果您正苦于以下问题:Python PeriodicTable.deepCopy方法的具体用法?Python PeriodicTable.deepCopy怎么用?Python PeriodicTable.deepCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model.elements.PeriodicTable
的用法示例。
在下文中一共展示了PeriodicTable.deepCopy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from model.elements import PeriodicTable [as 别名]
# 或者: from model.elements.PeriodicTable import deepCopy [as 别名]
def __init__(self, win):
qt4todo('what to do with all those options?')
## ElementColorsDialog.__init__(self, win, None, 0,
## Qt.WStyle_Customize | Qt.WStyle_NormalBorder |
## Qt.WStyle_Title | Qt.WStyle_SysMenu)
QDialog.__init__(self, win)
self.setupUi(self)
self.connect(self.okButton, SIGNAL("clicked()"), self.ok)
self.connect(self.loadColorsPB, SIGNAL("clicked()"), self.read_element_rgb_table)
self.connect(self.saveColorsPB, SIGNAL("clicked()"), self.write_element_rgb_table)
self.connect(self.cancelButton, SIGNAL("clicked()"), self.reject)
self.connect(self.defaultButton, SIGNAL("clicked()"), self.loadDefaultProp)
self.connect(self.alterButton, SIGNAL("clicked()"), self.loadAlterProp)
self.connect(self.elementButtonGroup, SIGNAL("clicked(int)"), self.setElementInfo)
self.connect(self.previewPB, SIGNAL("clicked()"), self.preview_color_change)
self.connect(self.restorePB, SIGNAL("clicked()"), self.restore_current_color)
self.w = win
self.fileName = None
self.isElementModified = False
self.isFileSaved = False
self.oldTable = PeriodicTable.deepCopy()
self.elemTable = PeriodicTable
self.displayMode = self._displayList[0]
# The next line fixes a bug. Thumbview expects self.gridLayout on
# line 117 of Thumbview.py. Mark 2007-10-19.
self.gridLayout = self.gridlayout
self.elemGLPane = ElementView(self, "element glPane", self.w.glpane)
# Put the GL widget inside the frame
flayout = QVBoxLayout(self.elementFrame)
flayout.setMargin(1)
flayout.setSpacing(1)
flayout.addWidget(self.elemGLPane, 1)
def elementId(symbol):
return PeriodicTable.getElement(symbol).eltnum
self.toolButton6.setChecked(True)
self.elementButtonGroup.setId(self.toolButton6, elementId("C"))
self.elementButtonGroup.setId(self.toolButton8, elementId("O"))
self.elementButtonGroup.setId(self.toolButton10, elementId("Ne"))
self.elementButtonGroup.setId(self.toolButton9, elementId("F"))
self.elementButtonGroup.setId(self.toolButton13, elementId("Al"))
self.elementButtonGroup.setId(self.toolButton17, elementId("Cl"))
self.elementButtonGroup.setId(self.toolButton5, elementId("B"))
self.elementButtonGroup.setId(self.toolButton10_2, elementId("Ar"))
self.elementButtonGroup.setId(self.toolButton15, elementId("P"))
self.elementButtonGroup.setId(self.toolButton16, elementId("S"))
self.elementButtonGroup.setId(self.toolButton14, elementId("Si"))
self.elementButtonGroup.setId(self.toolButton33, elementId("As"))
self.elementButtonGroup.setId(self.toolButton34, elementId("Se"))
self.elementButtonGroup.setId(self.toolButton35, elementId("Br"))
self.elementButtonGroup.setId(self.toolButton36, elementId("Kr"))
self.elementButtonGroup.setId(self.toolButton32, elementId("Ge"))
self.elementButtonGroup.setId(self.toolButton7, elementId("N"))
self.elementButtonGroup.setId(self.toolButton2, elementId("He"))
self.elementButtonGroup.setId(self.toolButton1, elementId("H"))
self.elementButtonGroup.setId(self.toolButton0, elementId("X"))
self.connect(self.toolButton6, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton8, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton10, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton9, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton13, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton17, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton5, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton10_2, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton15, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton16, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton14, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton33, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton34, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton35, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton36, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton32, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton7, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton2, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton1, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connect(self.toolButton0, SIGNAL("clicked()"), self.updateElemColorDisplay)
self.connectChangingControls()
self.saveColorsPB.setWhatsThis(
"""Save the current color settings for elements in a text file.""")
self.defaultButton.setWhatsThis(
"""Restore current element colors to the default colors.""")
self.loadColorsPB.setWhatsThis(
"""Load element colors from an external text file.""")
self.alterButton.setWhatsThis(
"""Set element colors to the alternate color set.""")