本文整理汇总了Python中PM.PM_SpinBox.PM_SpinBox.setDisabled方法的典型用法代码示例。如果您正苦于以下问题:Python PM_SpinBox.setDisabled方法的具体用法?Python PM_SpinBox.setDisabled怎么用?Python PM_SpinBox.setDisabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_SpinBox.PM_SpinBox
的用法示例。
在下文中一共展示了PM_SpinBox.setDisabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: EditNanotube_PropertyManager
# 需要导入模块: from PM.PM_SpinBox import PM_SpinBox [as 别名]
# 或者: from PM.PM_SpinBox.PM_SpinBox import setDisabled [as 别名]
#.........这里部分代码省略.........
msg = "Select a nanotube to edit."
self.updateMessage(msg)
return
def _addGroupBoxes( self ):
"""
Add the Property Manager group boxes.
"""
self._pmGroupBox1 = PM_GroupBox( self, title = "Parameters" )
self._loadGroupBox1( self._pmGroupBox1 )
self._displayOptionsGroupBox = PM_GroupBox( self,
title = "Display Options" )
self._loadDisplayOptionsGroupBox( self._displayOptionsGroupBox )
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 4.
"""
self.nameLineEdit = PM_LineEdit( pmGroupBox,
label = "Name:",
text = "",
setAsDefault = False)
# Nanotube Length
self.ntLengthLineEdit = \
PM_LineEdit( pmGroupBox,
label = "Length: ",
text = "0.0 Angstroms",
setAsDefault = False)
self.ntLengthLineEdit.setDisabled(True)
# Nanotube Radius
self.ntDiameterLineEdit = \
PM_LineEdit( pmGroupBox,
label = "Nanotube Diameter: ",
setAsDefault = False)
self.ntDiameterLineEdit.setDisabled(True)
# Nanotube chirality. These are disabled (read-only) for now. --Mark
self.chiralityNSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Chirality (n) :",
minimum = 2,
maximum = 100,
setAsDefault = True )
self.chiralityNSpinBox.setDisabled(True)
self.chiralityMSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Chirality (m) :",
minimum = 0,
maximum = 100,
setAsDefault = True )
self.chiralityMSpinBox.setDisabled(True)
def _addWhatsThisText(self):
"""
Add what's this text.
"""
pass
示例2: DnaDuplexPropertyManager
# 需要导入模块: from PM.PM_SpinBox import PM_SpinBox [as 别名]
# 或者: from PM.PM_SpinBox.PM_SpinBox import setDisabled [as 别名]
#.........这里部分代码省略.........
self.basesPerTurnDoubleSpinBox = \
PM_DoubleSpinBox( pmGroupBox,
label = "Bases per turn:",
value = env.prefs[bdnaBasesPerTurn_prefs_key],
setAsDefault = True,
minimum = 8.0,
maximum = 20.0,
decimals = 2,
singleStep = 0.1 )
self.duplexRiseDoubleSpinBox = \
PM_DoubleSpinBox( pmGroupBox,
label = "Rise:",
value = env.prefs[bdnaRise_prefs_key],
setAsDefault = True,
minimum = 2.0,
maximum = 4.0,
decimals = 3,
singleStep = 0.01 )
# Strand Length (i.e. the number of bases)
self.numberOfBasePairsSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Base pairs:",
value = self._numberOfBases,
setAsDefault = False,
minimum = 0,
maximum = 10000 )
self.numberOfBasePairsSpinBox.setDisabled(True)
# Duplex Length
self.duplexLengthLineEdit = \
PM_LineEdit( pmGroupBox,
label = "Duplex length: ",
text = "0.0 Angstroms",
setAsDefault = False)
self.duplexLengthLineEdit.setDisabled(True)
def _loadDisplayOptionsGroupBox(self, pmGroupBox):
"""
Load widgets in the Display Options GroupBox
@see: DnaOrCnt_PropertyManager. _loadDisplayOptionsGroupBox
"""
#Call the superclass method that loads the cursor text checkboxes.
#Note, as of 2008-05-19, the superclass, DnaOrCnt_PropertyManager
#only loads the cursor text groupboxes. Subclasses like this can
#call custom methods like self._loadCursorTextCheckBoxes etc if they
#don't need all groupboxes that the superclass loads.
_superclass._loadDisplayOptionsGroupBox(self, pmGroupBox)
self._rubberbandLineGroupBox = PM_GroupBox(
pmGroupBox,
title = 'Rubber band line:')
dnaLineChoices = ['Ribbons', 'Ladder']
self.dnaRubberBandLineDisplayComboBox = \
PM_ComboBox( self._rubberbandLineGroupBox ,
label = " Display as:",
choices = dnaLineChoices,