本文整理匯總了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,