本文整理汇总了Python中PM.PM_ComboBox.PM_ComboBox类的典型用法代码示例。如果您正苦于以下问题:Python PM_ComboBox类的具体用法?Python PM_ComboBox怎么用?Python PM_ComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PM_ComboBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _loadGroupBox2
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in group box.
"""
dnaRenditionChoices = ['3D (default)',
'2D with base letters',
'2D ball and stick',
'2D ladder']
self.dnaRenditionComboBox = \
PM_ComboBox( pmGroupBox,
label = "Rendition:",
choices = dnaRenditionChoices,
setAsDefault = True)
dnaComponentChoices = ['Axis',
'Strands',
'Struts',
'Nucleotides']
self.dnaComponentComboBox = \
PM_ComboBox( pmGroupBox,
label = "Component:",
choices = dnaComponentChoices,
setAsDefault = True)
self._loadAxisGroupBox()
self._loadStrandsGroupBox()
self._loadStrutsGroupBox()
self._loadNucleotidesGroupBox()
widgetList = [self.axisGroupBox,
self.strandsGroupBox,
self.strutsGroupBox,
self.nucleotidesGroupBox]
self.dnaComponentStackedWidget = \
PM_StackedWidget( pmGroupBox,
self.dnaComponentComboBox,
widgetList )
standLabelColorChoices = ['Hide',
'Show (in strand color)',
'Black',
'White',
'Custom color...']
self.standLabelColorComboBox = \
PM_ComboBox( pmGroupBox,
label = "Strand labels:",
choices = standLabelColorChoices,
setAsDefault = True)
# This disables "Component" widgets if rendition style is 2D.
self.change_dnaRendition(env.prefs[dnaRendition_prefs_key])
示例2: _loadAxisGroupBox
def _loadAxisGroupBox(self):
"""
Load the Axis group box.
"""
axisGroupBox = PM_GroupBox( None )
self.axisGroupBox = axisGroupBox
axisShapeChoices = ['None', 'Wide tube', 'Narrow tube']
self.axisShapeComboBox = \
PM_ComboBox( axisGroupBox ,
label = "Shape:",
choices = axisShapeChoices,
setAsDefault = True)
self.axisScaleDoubleSpinBox = \
PM_DoubleSpinBox( axisGroupBox,
label = "Scale:",
value = 1.00,
setAsDefault = True,
minimum = 0.1,
maximum = 2.0,
decimals = 2,
singleStep = 0.1 )
axisColorChoices = ['Same as chunk',
'Base order',
'Base order (discrete)',
'Base type',
'Strand order']
self.axisColorComboBox = \
PM_ComboBox( axisGroupBox ,
label = "Color:",
choices = axisColorChoices,
setAsDefault = True)
endingTypeChoices = ['Flat',
'Taper start',
'Taper end',
'Taper both',
'Spherical']
self.axisEndingStyleComboBox = \
PM_ComboBox( axisGroupBox ,
label = "Ending style:",
choices = endingTypeChoices,
setAsDefault = True)
示例3: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box.
"""
includeStrandsChoices = ["All strands in model",
"Selected strands only"]
self.includeStrandsComboBox = \
PM_ComboBox( pmGroupBox,
label = "Include strands:",
choices = includeStrandsChoices,
setAsDefault = True)
self.numberOfBasesLineEdit = \
PM_LineEdit( pmGroupBox,
label = "Number of bases:",
text = str(self.getNumberOfBases()))
self.numberOfBasesLineEdit.setEnabled(False)
self.viewDnaOrderFileButton = \
PM_PushButton( pmGroupBox,
label = "",
text = "View DNA Order File...",
spanWidth = True)
示例4: _loadGroupBox3
def _loadGroupBox3(self, pmGroupBox):
"""
Load widgets in group box.
"""
# hover highlighting style and color
self.hoverHighlightingStyleComboBox = \
PM_ComboBox( pmGroupBox,
label = "Highlighting:",
)
self._loadHoverHighlightingStyleItems()
hhColorList = [yellow, orange, red, magenta,
cyan, blue, white, black, gray]
hhColorNames = ["Yellow (default)", "Orange", "Red", "Magenta",
"Cyan", "Blue", "White", "Black", "Other color..."]
self.hoverHighlightingColorComboBox = \
PM_ColorComboBox(pmGroupBox,
colorList = hhColorList,
colorNames = hhColorNames,
color = env.prefs[hoverHighlightingColor_prefs_key]
)
# selection style and color
self.selectionStyleComboBox = \
PM_ComboBox( pmGroupBox,
label = "Selection:",
)
self._loadSelectionStyleItems()
selColorList = [darkgreen, green, orange, red,
magenta, cyan, blue, white, black,
gray]
selColorNames = ["Dark green (default)", "Green", "Orange", "Red",
"Magenta", "Cyan", "Blue", "White", "Black",
"Other color..."]
self.selectionColorComboBox = \
PM_ColorComboBox(pmGroupBox,
colorList = selColorList,
colorNames = selColorNames,
color = env.prefs[selectionColor_prefs_key]
)
return
示例5: _loadStrandsGroupBox
def _loadStrandsGroupBox(self):
"""
Load the Strands group box.
"""
strandsGroupBox = PM_GroupBox( None )
self.strandsGroupBox = strandsGroupBox
strandsShapeChoices = ['None', 'Cylinders', 'Tube']
self.strandsShapeComboBox = \
PM_ComboBox( strandsGroupBox ,
label = "Shape:",
choices = strandsShapeChoices,
setAsDefault = True)
self.strandsScaleDoubleSpinBox = \
PM_DoubleSpinBox( strandsGroupBox,
label = "Scale:",
value = 1.00,
setAsDefault = True,
minimum = 0.1,
maximum = 5.0,
decimals = 2,
singleStep = 0.1 )
strandsColorChoices = ['Same as chunk',
'Base order',
'Strand order']
self.strandsColorComboBox = \
PM_ComboBox( strandsGroupBox ,
label = "Color:",
choices = strandsColorChoices,
setAsDefault = True)
strandsArrowsChoices = ['None',
'5\'',
'3\'',
'5\' and 3\'']
self.strandsArrowsComboBox = \
PM_ComboBox( strandsGroupBox ,
label = "Arrows:",
choices = strandsArrowsChoices,
setAsDefault = True)
示例6: _loadNucleotidesGroupBox
def _loadNucleotidesGroupBox(self):
"""
Load the Nucleotides group box.
"""
nucleotidesGroupBox = PM_GroupBox( None )
self.nucleotidesGroupBox = nucleotidesGroupBox
nucleotidesShapeChoices = ['None',
'Sugar spheres',
'Base cartoons']
self.nucleotidesShapeComboBox = \
PM_ComboBox( nucleotidesGroupBox ,
label = "Shape:",
choices = nucleotidesShapeChoices,
setAsDefault = True)
self.nucleotidesScaleDoubleSpinBox = \
PM_DoubleSpinBox( nucleotidesGroupBox,
label = "Scale:",
value = 1.00,
setAsDefault = True,
minimum = 0.1,
maximum = 3.0,
decimals = 2,
singleStep = 0.1 )
nucleotidesColorChoices = ['Same as strand',
'Base order',
'Strand order',
'Base type']
self.nucleotidesColorComboBox = \
PM_ComboBox( nucleotidesGroupBox ,
label = "Color:",
choices = nucleotidesColorChoices,
setAsDefault = True)
self.dnaStyleBasesDisplayLettersCheckBox = \
PM_CheckBox(nucleotidesGroupBox ,
text = 'Display base letters',
widgetColumn = 1
)
示例7: _loadGroupBox2
def _loadGroupBox2( self, pmGroupBox ):
"""
Load widgets in group box 2.
"""
self.modelComboBox = \
PM_ComboBox( pmGroupBox,
label = "Model :",
choices = self._modelChoices,
setAsDefault = True)
self.conformationComboBox = \
PM_ComboBox( pmGroupBox,
label = "Conformation :",
choices = ["B-DNA"],
setAsDefault = True)
self.connect( self.conformationComboBox,
SIGNAL("currentIndexChanged(int)"),
self.conformationComboBoxChanged )
self.basesPerTurnComboBox= \
PM_ComboBox( pmGroupBox,
label = "Bases Per Turn :",
choices = ["10.0", "10.5", "10.67"],
setAsDefault = True)
# I may decide to reintroduce "base-pair chunks" at a later time.
# Please talk to me if you have a strong feeling about including
# this. Mark 2007-08-19.
createChoices = ["Strand chunks", \
"Single chunk" ]
#@ "Base-pair chunks"]
self.createComboBox = \
PM_ComboBox( pmGroupBox,
label = "Create :",
choices = createChoices,
index = 0,
setAsDefault = True,
spanWidth = False )
示例8: _loadGroupBox2
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in group box.
"""
proteinStyleChoices = [
"CA trace (wire)",
"CA trace (cylinders)",
"CA trace (ball and stick)",
"Tube",
"Ladder",
"Zigzag",
"Flat ribbon",
"Solid ribbon",
"Cartoons",
"Fancy cartoons",
"Peptide tiles",
]
self.proteinStyleComboBox = PM_ComboBox(
pmGroupBox, label="Style:", choices=proteinStyleChoices, setAsDefault=True
)
scaleChoices = ["Constant", "Secondary structure", "B-factor"]
self.scaleComboBox = PM_ComboBox(pmGroupBox, label="Scaling:", choices=scaleChoices, setAsDefault=True)
self.scaleFactorDoubleSpinBox = PM_DoubleSpinBox(
pmGroupBox,
label="Scaling factor:",
value=1.00,
setAsDefault=True,
minimum=0.1,
maximum=3.0,
decimals=1,
singleStep=0.1,
)
self.splineDoubleSpinBox = PM_DoubleSpinBox(
pmGroupBox, label="Resolution:", value=4, setAsDefault=True, minimum=2, maximum=8, decimals=0, singleStep=1
)
self.smoothingCheckBox = PM_CheckBox(pmGroupBox, text="Smoothing", setAsDefault=True)
示例9: _loadStrutsGroupBox
def _loadStrutsGroupBox(self):
"""
Load the Struts group box.
"""
strutsGroupBox = PM_GroupBox( None )
self.strutsGroupBox = strutsGroupBox
strutsShapeChoices = ['None',
'Base-axis-base cylinders',
'Straight cylinders']
self.strutsShapeComboBox = \
PM_ComboBox( strutsGroupBox ,
label = "Shape:",
choices = strutsShapeChoices,
setAsDefault = True)
self.strutsScaleDoubleSpinBox = \
PM_DoubleSpinBox( strutsGroupBox,
label = "Scale:",
value = 1.00,
setAsDefault = True,
minimum = 0.1,
maximum = 3.0,
decimals = 2,
singleStep = 0.1 )
strutsColorChoices = ['Same as strand',
'Base order',
'Strand order',
'Base type']
self.strutsColorComboBox = \
PM_ComboBox( strutsGroupBox ,
label = "Color:",
choices = strutsColorChoices,
setAsDefault = True)
示例10: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in 1st group box.
@param pmGroupBox: The 1st group box in the PM.
@type pmGroupBox: L{PM_GroupBox}
"""
self.axesCombobox = PM_ComboBox(
pmGroupBox,
label = 'Axes: ',
choices = self._axes_display_choices,
index = 0,
setAsDefault = True,
spanWidth = False )
self.basesCombobox = PM_ComboBox(
pmGroupBox,
label = 'Bases: ',
choices = self._bases_display_choices,
index = 0,
setAsDefault = True,
spanWidth = False )
示例11: _loadFuseOptionsGroupBox
def _loadFuseOptionsGroupBox(self, inPmGroupBox):
"""
Load the widgets inside the Fuse Options groupbox.
"""
#@ Warning: If you change fuseChoices, you must also change the
# constants MAKEBONDS and FUSEATOMS in FuseChunks_Command.py.
# This implementation is fragile and should be fixed. Mark 2008-07-16
fuseChoices = ['Make bonds between chunks',
'Fuse overlapping atoms']
self.fuseComboBox = \
PM_ComboBox( inPmGroupBox,
label = '',
choices = fuseChoices,
index = 0,
setAsDefault = False,
spanWidth = True)
self.connect(self.fuseComboBox,
SIGNAL("activated(const QString&)"),
self.parentMode.change_fuse_mode)
self.fusePushButton = PM_PushButton( inPmGroupBox,
label = "",
text = "Make Bonds",
spanWidth = True )
self.connect( self.fusePushButton,
SIGNAL("clicked()"),
self.parentMode.fuse_something)
self.toleranceSlider = PM_Slider( inPmGroupBox,
currentValue = 100,
minimum = 0,
maximum = 300,
label = \
'Tolerance:100% => 0 bondable pairs'
)
self.connect(self.toleranceSlider,
SIGNAL("valueChanged(int)"),
self.parentMode.tolerance_changed)
self.mergeChunksCheckBox = PM_CheckBox( inPmGroupBox,
text = 'Merge chunks',
widgetColumn = 0,
state = Qt.Checked )
示例12: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box.
"""
#stereoSettingsGroupBox = PM_GroupBox( None )
self.stereoEnabledCheckBox = \
PM_CheckBox(pmGroupBox,
text = 'Enable Stereo View',
widgetColumn = 1
)
stereoModeChoices = ['Relaxed view',
'Cross-eyed view',
'Red/blue anaglyphs',
'Red/cyan anaglyphs',
'Red/green anaglyphs']
self.stereoModeComboBox = \
PM_ComboBox( pmGroupBox,
label = "Stereo Mode:",
choices = stereoModeChoices,
setAsDefault = True)
self.stereoModeComboBox.setCurrentIndex(env.prefs[stereoViewMode_prefs_key]-1)
self.stereoSeparationSlider = \
PM_Slider( pmGroupBox,
currentValue = 50,
minimum = 0,
maximum = 300,
label = 'Separation'
)
self.stereoSeparationSlider.setValue(env.prefs[stereoViewSeparation_prefs_key])
self.stereoAngleSlider = \
PM_Slider( pmGroupBox,
currentValue = 50,
minimum = 0,
maximum = 100,
label = 'Angle'
)
self.stereoAngleSlider.setValue(env.prefs[stereoViewAngle_prefs_key])
self._updateWidgets()
示例13: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in groubox 1.
"""
self.heightField = \
PM_DoubleSpinBox( pmGroupBox,
label = "Height :",
value = 20.0,
setAsDefault = True,
minimum = 1.0,
maximum = 100.0,
singleStep = 1.0,
decimals = 3,
suffix = ' Angstroms')
self.widthField = \
PM_DoubleSpinBox( pmGroupBox,
label = "Width :",
value = 20.0,
setAsDefault = True,
minimum = 1.0,
maximum = 100.0,
singleStep = 1.0,
decimals = 3,
suffix = ' Angstroms')
self.bondLengthField = \
PM_DoubleSpinBox( pmGroupBox,
label = "Bond Length :",
value = CC_GRAPHITIC_BONDLENGTH,
setAsDefault = True,
minimum = 1.0,
maximum = 3.0,
singleStep = 0.1,
decimals = 3,
suffix = ' Angstroms')
endingChoices = ["None", "Hydrogen", "Nitrogen"]
self.endingsComboBox= \
PM_ComboBox( pmGroupBox,
label = "Endings :",
choices = endingChoices,
index = 0,
setAsDefault = True,
spanWidth = False )
示例14: _loadGroupBox2
def _loadGroupBox2(self, pmGroupBox):
"""
Load widgets in group box.
"""
#background color combo box
self.backgroundColorComboBox = \
PM_ComboBox( pmGroupBox,
label = "Color:",
spanWidth = False)
self._loadBackgroundColorItems()
self.enableFogCheckBox = \
PM_CheckBox( pmGroupBox, text = "Enable fog" )
connect_checkbox_with_boolean_pref( self.enableFogCheckBox, fogEnabled_prefs_key )
return
示例15: _loadGroupBox1
def _loadGroupBox1(self, pmGroupBox):
"""
Load widgets in group box.
"""
aa_list = []
for mol in self.win.assy.molecules:
if mol.isProteinChunk():
aa_list = mol.protein.get_amino_acid_id_list()
break
self.aminoAcidsComboBox = PM_ComboBox( pmGroupBox,
label = "Residue:",
choices = aa_list,
setAsDefault = False)
self.previousAAPushButton = \
PM_PushButton( pmGroupBox,
text = "Previous AA",
setAsDefault = True)
self.nextAAPushButton = \
PM_PushButton( pmGroupBox,
text = "Next AA",
setAsDefault = True)
self.recenterViewCheckBox = \
PM_CheckBox( pmGroupBox,
text = "Re-center view",
setAsDefault = True,
state = Qt.Checked)
self.expandAllPushButton = \
PM_PushButton( pmGroupBox,
text = "Expand All",
setAsDefault = True)
self.collapseAllPushButton = \
PM_PushButton( pmGroupBox,
text = "Collapse All",
setAsDefault = True)