本文整理汇总了Python中PM.PM_SpinBox.PM_SpinBox类的典型用法代码示例。如果您正苦于以下问题:Python PM_SpinBox类的具体用法?Python PM_SpinBox怎么用?Python PM_SpinBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PM_SpinBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _loadGroupBox3
def _loadGroupBox3(self, inPmGroupBox):
"""
Load widgets in group box 3.
"""
# "Number of Nanotubes" SpinBox
self.mwntCountSpinBox = \
PM_SpinBox( inPmGroupBox,
label = "Number :",
value = 1,
setAsDefault = True,
minimum = 1,
maximum = 10,
suffix = " nanotubes" )
self.mwntCountSpinBox.setSpecialValueText("SWNT")
# "Spacing" lineedit.
self.mwntSpacingField = \
PM_DoubleSpinBox( inPmGroupBox,
label = "Spacing :",
value = 2.46,
setAsDefault = True,
minimum = 1.0,
maximum = 10.0,
singleStep = 0.1,
decimals = 3,
suffix = " Angstroms" )
示例2: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 1.
@param pmGroupBox: group box that contains protein name combo box and
number of amino acids spin box
@see: L{PM_GroupBox}
"""
self._updateProteinList()
if len(self.protein_name_list) >= 1:
self.set_current_protein_chunk_name(self.protein_name_list[0])
self.structureComboBox = PM_ComboBox( pmGroupBox,
label = "Name:",
choices = self.protein_name_list,
setAsDefault = False)
#Urmi 20080713: May be useful to set the minimum value to not zero
#Now it does not matter, since its disabled. But zero as the minimum
#value in a spinbox does not work otherwise.
self.numberOfAASpinBox = \
PM_SpinBox( pmGroupBox,
label = "Amino Acids:",
value = 0,
setAsDefault = False,
minimum = 0,
maximum = 10000 )
#for now we do not allow changing number of residues
self.numberOfAASpinBox.setEnabled(False)
self.editPropertiesPushButton = PM_PushButton( pmGroupBox,
text = "Edit Sequence",
setAsDefault = True
)
示例3: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 1.
"""
self.nameLineEdit = PM_LineEdit( pmGroupBox,
label = "Name:",
text = "",
setAsDefault = False)
self.numberOfBasesSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Number of bases:",
value = self._numberOfBases,
setAsDefault = False,
minimum = 2,
maximum = 10000 )
self.disableStructHighlightingCheckbox = \
PM_CheckBox( pmGroupBox,
text = "Don't highlight while editing DNA",
widgetColumn = 0,
state = Qt.Unchecked,
setAsDefault = True,
spanWidth = True
)
#As of 2008-03-31, the properties such as number of bases will be
#editable only by using the resize handles.
self.numberOfBasesSpinBox.setEnabled(False)
return
示例4: _loadGroupBox1
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)
示例5: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 4.
"""
self.nameLineEdit = PM_LineEdit( pmGroupBox,
label = "Strand name:",
text = "",
setAsDefault = False)
self.numberOfBasesSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Number of bases:",
value = self._numberOfBases,
setAsDefault = False,
minimum = 2,
maximum = 10000 )
self.basesPerTurnDoubleSpinBox = \
PM_DoubleSpinBox( pmGroupBox,
label = "Bases per turn:",
value = self.basesPerTurn,
setAsDefault = True,
minimum = 8.0,
maximum = 20.0,
decimals = 2,
singleStep = 0.1 )
self.duplexRiseDoubleSpinBox = \
PM_DoubleSpinBox( pmGroupBox,
label = "Rise:",
value = self.duplexRise,
setAsDefault = True,
minimum = 2.0,
maximum = 4.0,
decimals = 3,
singleStep = 0.01 )
self.disableStructHighlightingCheckbox = \
PM_CheckBox( pmGroupBox,
text = "Don't highlight while editing DNA",
widgetColumn = 0,
state = Qt.Unchecked,
setAsDefault = True,
spanWidth = True
)
#As of 2008-03-31, the properties such as number of bases will be
#editable only by using the resize handles. post FNANO we will support
#the
self.numberOfBasesSpinBox.setEnabled(False)
self.basesPerTurnDoubleSpinBox.setEnabled(False)
self.duplexRiseDoubleSpinBox.setEnabled(False)
示例6: _loadBreakOptionsGroupbox
def _loadBreakOptionsGroupbox(self, pmGroupBox):
"""
Load widgets in this group box.
"""
self.assignColorToBrokenDnaStrandsCheckBox = \
PM_CheckBox(pmGroupBox ,
text = 'Assign new color to broken strands',
widgetColumn = 0,
spanWidth = True)
connect_checkbox_with_boolean_pref(
self.assignColorToBrokenDnaStrandsCheckBox,
assignColorToBrokenDnaStrands_prefs_key )
self.basesBeforeNextBreakSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Break Every:",
value = 3,
setAsDefault = False,
minimum = 1,
maximum = 10000,
suffix = " bases"
)
connect_spinBox_with_pref(
self.basesBeforeNextBreakSpinBox,
breakStrandsCommand_numberOfBasesBeforeNextBreak_prefs_key)
self.breakAllStrandsButton = PM_PushButton(
pmGroupBox,
label = "",
text = "do it" )
self._dnaStrandChooserGroupBox = PM_ObjectChooser(
pmGroupBox,
self.command,
modelObjectType = self.win.assy.DnaStrand,
title = "Choose strands " )
if not DEBUG_BREAK_OPTIONS_FEATURE:
self._dnaStrandChooserGroupBox.hide()
self.breakAllStrandsButton.hide()
self.basesBeforeNextBreakSpinBox.hide()
示例7: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 4.
"""
self.nameLineEdit = PM_LineEdit( pmGroupBox,
label = "Protein chunk name:",
text = "",
setAsDefault = False)
#Urmi 20080713: May be useful to set the minimum value to not zero
self.numberOfAASpinBox = \
PM_SpinBox( pmGroupBox,
label = "Number of amino acids:",
value = 0,
setAsDefault = False,
minimum = 0,
maximum = 10000 )
self.numberOfAASpinBox.setEnabled(False)
示例8: DnaStrand_PropertyManager
class DnaStrand_PropertyManager( DnaOrCnt_PropertyManager):
"""
The DnaStrand_PropertyManager class provides a Property Manager
for the DnaStrand_EditCommand.
@ivar title: The title that appears in the property manager header.
@type title: str
@ivar pmName: The name of this property manager. This is used to set
the name of the PM_Dialog object via setObjectName().
@type name: str
@ivar iconPath: The relative path to the PNG file that contains a
22 x 22 icon image that appears in the PM header.
@type iconPath: str
"""
title = "DnaStrand Properties"
iconPath = "ui/actions/Properties Manager/Strand.png"
def __init__( self, command ):
"""
Constructor for the Build DNA property manager.
"""
self.sequenceEditor = None
self._numberOfBases = 0
self._conformation = 'B-DNA'
self.dnaModel = 'PAM3'
_superclass.__init__( self, command)
self.showTopRowButtons( PM_DONE_BUTTON | \
PM_WHATS_THIS_BUTTON)
return
def _addGroupBoxes( self ):
"""
Add group boxes to this PM.
"""
self._pmGroupBox1 = PM_GroupBox( self, title = "Parameters" )
self._loadGroupBox1( self._pmGroupBox1 )
self._displayOptionsGroupBox = PM_GroupBox( self,
title = "Display Options" )
self._loadDisplayOptionsGroupBox( self._displayOptionsGroupBox )
#Sequence Editor. This is NOT a groupbox, needs cleanup. Doing it here
#so that the sequence editor gets connected! Perhaps
#superclass should define _loadAdditionalWidgets. -- Ninad2008-10-03
self._loadSequenceEditor()
return
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 1.
"""
self.nameLineEdit = PM_LineEdit( pmGroupBox,
label = "Name:",
text = "",
setAsDefault = False)
self.numberOfBasesSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Number of bases:",
value = self._numberOfBases,
setAsDefault = False,
minimum = 2,
maximum = 10000 )
self.disableStructHighlightingCheckbox = \
PM_CheckBox( pmGroupBox,
text = "Don't highlight while editing DNA",
widgetColumn = 0,
state = Qt.Unchecked,
setAsDefault = True,
spanWidth = True
)
#As of 2008-03-31, the properties such as number of bases will be
#editable only by using the resize handles.
self.numberOfBasesSpinBox.setEnabled(False)
return
def _loadSequenceEditor(self):
"""
Temporary code that shows the Sequence editor ..a doc widget docked
at the bottom of the mainwindow. The implementation is going to change
before 'rattleSnake' product release.
As of 2007-11-20: This feature (sequence editor) is waiting
for the ongoing dna model work to complete.
"""
self.sequenceEditor = self.win.createDnaSequenceEditorIfNeeded()
self.sequenceEditor.hide()
return
def _loadDisplayOptionsGroupBox(self, pmGroupBox):
"""
#.........这里部分代码省略.........
示例9: EditNanotube_PropertyManager
#.........这里部分代码省略.........
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
def _addToolTipText(self):
"""
Add Tooltip text
"""
pass
def _nameChanged(self):
"""
Slot for "Name" field.
@TODO: Include a validator for the name field.
"""
示例10: BackrubProteinSim_PropertyManager
#.........这里部分代码省略.........
labelColumn = 0,
label = "Only backbone rotation:",
minimum = 0.01,
maximum = 1.0,
value = 0.75,
decimals = 2,
singleStep = 0.01,
setAsDefault = False,
spanWidth = False)
self.onlyrotSpinBox = PM_DoubleSpinBox( pmGroupBox,
labelColumn = 0,
label = "Only rotamer rotation:",
minimum = 0.01,
maximum = 1.0,
decimals = 2,
value = 0.25,
singleStep = 0.01,
setAsDefault = False,
spanWidth = False)
self.mctempSpinBox = PM_DoubleSpinBox( pmGroupBox,
labelColumn = 0,
label = "MC simulation temperature:",
minimum = 0.1,
value = 0.6,
maximum = 1.0,
decimals = 2,
singleStep = 0.1,
setAsDefault = False,
spanWidth = False)
numResidues = self._getNumResiduesForCurrentProtein()
self.minresSpinBox = PM_SpinBox( pmGroupBox,
labelColumn = 0,
label = "Minimum number of residues:",
minimum = 2,
maximum = numResidues,
singleStep = 1,
setAsDefault = False,
spanWidth = False)
self.maxresSpinBox = PM_SpinBox( pmGroupBox,
labelColumn = 0,
label = "Maximum number of residues:",
minimum = 2,
maximum = numResidues,
singleStep = 1,
setAsDefault = False,
spanWidth = False)
if numResidues == 0:
self.minresSpinBox.setMaximum(numResidues + 2)
self.maxresSpinBox.setMaximum(numResidues + 2)
return
def _addWhatsThisText( self ):
"""
What's This text for widgets in this Property Manager.
"""
pass
def _addToolTipText(self):
"""
Tool Tip text for widgets in this Property Manager.
"""
示例11: DnaDuplexPropertyManager
#.........这里部分代码省略.........
self.dnaModelComboBox = \
PM_ComboBox( pmGroupBox,
label = "Model:",
choices = dnaModelChoices,
setAsDefault = True)
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,
示例12: _loadGroupBox2
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in group box.
"""
self.bondAngleWeightSimSpinBox = PM_DoubleSpinBox( pmGroupBox,
labelColumn = 0,
label = "Bond angle weight:",
minimum = 0.01,
decimals = 2,
maximum = 1.0,
singleStep = 0.01,
value = 1.0,
setAsDefault = False,
spanWidth = False)
bond_angle_param_list = ['Amber', 'Charmm']
self.bondAngleParamComboBox = PM_ComboBox( pmGroupBox,
label = "Bond angle parameters:",
choices = bond_angle_param_list,
setAsDefault = False)
self.onlybbSpinBox = PM_DoubleSpinBox( pmGroupBox,
labelColumn = 0,
label = "Only backbone rotation:",
minimum = 0.01,
maximum = 1.0,
value = 0.75,
decimals = 2,
singleStep = 0.01,
setAsDefault = False,
spanWidth = False)
self.onlyrotSpinBox = PM_DoubleSpinBox( pmGroupBox,
labelColumn = 0,
label = "Only rotamer rotation:",
minimum = 0.01,
maximum = 1.0,
decimals = 2,
value = 0.25,
singleStep = 0.01,
setAsDefault = False,
spanWidth = False)
self.mctempSpinBox = PM_DoubleSpinBox( pmGroupBox,
labelColumn = 0,
label = "MC simulation temperature:",
minimum = 0.1,
value = 0.6,
maximum = 1.0,
decimals = 2,
singleStep = 0.1,
setAsDefault = False,
spanWidth = False)
numResidues = self._getNumResiduesForCurrentProtein()
self.minresSpinBox = PM_SpinBox( pmGroupBox,
labelColumn = 0,
label = "Minimum number of residues:",
minimum = 2,
maximum = numResidues,
singleStep = 1,
setAsDefault = False,
spanWidth = False)
self.maxresSpinBox = PM_SpinBox( pmGroupBox,
labelColumn = 0,
label = "Maximum number of residues:",
minimum = 2,
maximum = numResidues,
singleStep = 1,
setAsDefault = False,
spanWidth = False)
if numResidues == 0:
self.minresSpinBox.setMaximum(numResidues + 2)
self.maxresSpinBox.setMaximum(numResidues + 2)
return
示例13: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box.
"""
self.numSimSpinBox = PM_SpinBox( pmGroupBox,
labelColumn = 0,
label = "Number of simulations:",
minimum = 1,
maximum = 999,
setAsDefault = False,
spanWidth = False)
self.ex1Checkbox = PM_CheckBox(pmGroupBox,
text = "Expand rotamer library for chi1 angle",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.ex1aroCheckbox = PM_CheckBox(pmGroupBox,
text = "Use large chi1 library for aromatic residues",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.ex2Checkbox = PM_CheckBox(pmGroupBox,
text = "Expand rotamer library for chi2 angle",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.ex2aroOnlyCheckbox = PM_CheckBox(pmGroupBox,
text = "Use large chi2 library only for aromatic residues",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.ex3Checkbox = PM_CheckBox(pmGroupBox,
text = "Expand rotamer library for chi3 angle",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.ex4Checkbox = PM_CheckBox(pmGroupBox,
text ="Expand rotamer library for chi4 angle",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.rotOptCheckbox = PM_CheckBox(pmGroupBox,
text ="Optimize one-body energy",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.tryBothHisTautomersCheckbox = PM_CheckBox(pmGroupBox,
text ="Try both histidine tautomers",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.softRepDesignCheckbox = PM_CheckBox(pmGroupBox,
text ="Use softer Lennard-Jones repulsive term",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.useElecRepCheckbox = PM_CheckBox(pmGroupBox,
text ="Use electrostatic repulsion",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.norepackDisulfCheckbox = PM_CheckBox(pmGroupBox,
text ="Don't re-pack disulphide bonds",
state = Qt.Unchecked,
setAsDefault = False,
widgetColumn = 0,
spanWidth = True)
self.otherCommandLineOptions = PM_TextEdit(pmGroupBox,
label = "Command line options:",
spanWidth = True)
self.otherCommandLineOptions.setFixedHeight(80)
self.okButton = PM_PushButton( pmGroupBox,
text = "Launch Rosetta",
setAsDefault = True,
spanWidth = True)
#.........这里部分代码省略.........
示例14: BuildProtein_PropertyManager
#.........这里部分代码省略.........
@param isConnect: If True the widget will send the signals to the slot
method.
@type isConnect: boolean
"""
if isConnect and self.isAlreadyConnected:
return
if not isConnect and self.isAlreadyDisconnected:
return
self.isAlreadyConnected = isConnect
self.isAlreadyDisconnected = not isConnect
if isConnect:
change_connect = self.win.connect
else:
change_connect = self.win.disconnect
def enable_or_disable_gui_actions(self, bool_enable = False):
"""
Enable or disable some gui actions when this property manager is
opened or closed, depending on the bool_enable.
"""
#TODO: This is bad. It would have been much better to enable/disable
#gui actions using a API method in command/commandSequencer which gets
#called when you enter another command exiting or suspending the
#previous one. . At present. it doesn't exist (first needs cleanup in
#command/command sequencer (Done and other methods._)-- Ninad 2008-01-09
if hasattr(self.editCommand, 'flyoutToolbar') and \
self.editCommand.flyoutToolbar:
self.editCommand.flyoutToolbar.exitProteinAction.setEnabled(not bool_enable)
def ok_btn_clicked(self):
"""
Slot for the OK button
"""
self.win.toolsDone()
def cancel_btn_clicked(self):
"""
Slot for the Cancel button.
"""
self.win.toolsCancel()
def _addWhatsThisText( self ):
"""
What's This text for widgets in the DNA Property Manager.
"""
pass
def _addToolTipText(self):
"""
Tool Tip text for widgets in the DNA Property Manager.
"""
pass
def _addGroupBoxes( self ):
"""
Add the DNA Property Manager group boxes.
"""
"""
Add the DNA Property Manager group boxes.
"""
self._pmGroupBox1 = PM_GroupBox( self, title = "Parameters" )
self._loadGroupBox1( self._pmGroupBox1 )
pass
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 4.
"""
self.nameLineEdit = PM_LineEdit( pmGroupBox,
label = "Protein chunk name:",
text = "",
setAsDefault = False)
#Urmi 20080713: May be useful to set the minimum value to not zero
self.numberOfAASpinBox = \
PM_SpinBox( pmGroupBox,
label = "Number of amino acids:",
value = 0,
setAsDefault = False,
minimum = 0,
maximum = 10000 )
self.numberOfAASpinBox.setEnabled(False)
示例15: DnaGeneratorPropertyManager
#.........这里部分代码省略.........
Add the DNA Property Manager group boxes.
"""
self._pmGroupBox1 = PM_GroupBox( self, title = "Strand Sequence" )
self._loadGroupBox1( self._pmGroupBox1 )
self._pmGroupBox2 = PM_GroupBox( self, title = "DNA Parameters" )
self._loadGroupBox2( self._pmGroupBox2 )
self._pmGroupBox3 = PM_GroupBox( self, title = "Endpoints" )
self._loadGroupBox3( self._pmGroupBox3 )
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box 1.
"""
# Duplex Length
self.duplexLengthSpinBox = \
PM_DoubleSpinBox( pmGroupBox,
label = "Duplex Length: ",
value = 0,
setAsDefault = False,
minimum = 0,
maximum = 34000,
singleStep = self.getDuplexRise("B-DNA"),
decimals = 3,
suffix = ' Angstroms')
self.connect( self.duplexLengthSpinBox,
SIGNAL("valueChanged(double)"),
self.duplexLengthChanged )
# Strand Length
self.strandLengthSpinBox = \
PM_SpinBox( pmGroupBox,
label = "Strand Length :",
value = 0,
setAsDefault = False,
minimum = 0,
maximum = 10000,
suffix = ' bases' )
self.connect( self.strandLengthSpinBox,
SIGNAL("valueChanged(int)"),
self.strandLengthChanged )
# New Base choices
newBaseChoices = []
for theBase in basesDict.keys():
newBaseChoices = newBaseChoices \
+ [ theBase + ' (' \
+ basesDict[theBase]['Name'] + ')' ]
try:
defaultBaseChoice = basesDict.keys().index('N')
except:
defaultBaseChoice = 0
# Strand Sequence
self.sequenceTextEdit = \
PM_TextEdit( pmGroupBox,
label = "",
spanWidth = True )
self.sequenceTextEdit.setCursorWidth(2)
self.sequenceTextEdit.setWordWrapMode( QTextOption.WrapAnywhere )
self.connect( self.sequenceTextEdit,