本文整理汇总了Python中PM.PM_LineEdit.PM_LineEdit.setReadOnly方法的典型用法代码示例。如果您正苦于以下问题:Python PM_LineEdit.setReadOnly方法的具体用法?Python PM_LineEdit.setReadOnly怎么用?Python PM_LineEdit.setReadOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_LineEdit.PM_LineEdit
的用法示例。
在下文中一共展示了PM_LineEdit.setReadOnly方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_MovePropertyManager
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit import setReadOnly [as 别名]
#.........这里部分代码省略.........
title = "",
buttonList = BUTTON_LIST,
checkedId = 1,
setAsDefault = True,
)
self.transFreeButton =self.freeDragTranslateButtonGroup.getButtonById(1)
self.transXButton = self.freeDragTranslateButtonGroup.getButtonById(2)
self.transYButton = self.freeDragTranslateButtonGroup.getButtonById(3)
self.transZButton = self.freeDragTranslateButtonGroup.getButtonById(4)
self.transAlongAxisButton = \
self.freeDragTranslateButtonGroup.getButtonById(5)
self.moveFromToButton = PM_ToolButton(
inPmGroupBox,
text = "Translate from/to",
iconPath = "ui/actions/Properties Manager"\
"/Translate_Components.png",
spanWidth = True
)
self.moveFromToButton.setCheckable(True)
self.moveFromToButton.setAutoRaise(True)
self.moveFromToButton.setToolButtonStyle(
Qt.ToolButtonTextBesideIcon)
self.startCoordLineEdit = PM_LineEdit(
inPmGroupBox,
label = "ui/actions/Properties Manager"\
"/Move_Start_Point.png",
text = "Define 'from' and 'to' points",
setAsDefault = False,
)
self.startCoordLineEdit.setReadOnly(True)
self.startCoordLineEdit.setEnabled(False)
def _loadByDeltaGroupBox(self, inPmGroupBox):
"""
Load widgets in the translate By Delta group box, which is present
within the Translate groupbox.
@param inPmGroupBox: The Translate By Delta group box in the translate
group box.
@type inPmGroupBox: L{PM_GroupBox}
"""
self.moveDeltaXSpinBox = \
PM_DoubleSpinBox(
inPmGroupBox,
label = "ui/actions/Properties Manager/Delta_X.png",
value = 0.0,
setAsDefault = True,
minimum = -100.0,
maximum = 100.0,
singleStep = 1.0,
decimals = 3,
suffix = ' Angstroms',
spanWidth = False )
self.moveDeltaYSpinBox = \
PM_DoubleSpinBox(
inPmGroupBox,
label = "ui/actions/Properties Manager/Delta_Y.png",
value = 0.0,
setAsDefault = True,
minimum = -100.0,
maximum = 100.0,
示例2: Ui_BuildAtomsPropertyManager
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit import setReadOnly [as 别名]
#.........这里部分代码省略.........
PM_ComboBox( inPmGroupBox,
label = '',
choices = atomChooserChoices,
index = 0,
setAsDefault = False,
spanWidth = True )
#Following fixes bug 2550
self.atomChooserComboBox.setFocusPolicy(Qt.NoFocus)
self._addElementChooserGroupBox(inPmGroupBox)
self._add_PAM5_AtomChooserGroupBox(inPmGroupBox)
self._add_PAM3_AtomChooserGroupBox(inPmGroupBox)
def _loadSelectionOptionsGroupBox(self, inPmGroupBox):
"""
Load widgets in the Selection Options group box.
@param inPmGroupBox: The Selection Options box in the PM
@type inPmGroupBox: L{PM_GroupBox}
"""
self.selectionFilterCheckBox = \
PM_CheckBox( inPmGroupBox,
text = "Enable atom selection filter",
widgetColumn = 0,
state = Qt.Unchecked )
self.selectionFilterCheckBox.setDefaultValue(False)
self.filterlistLE = PM_LineEdit( inPmGroupBox,
label = "",
text = "",
setAsDefault = False,
spanWidth = True )
self.filterlistLE.setReadOnly(True)
if self.selectionFilterCheckBox.isChecked():
self.filterlistLE.setEnabled(True)
else:
self.filterlistLE.setEnabled(False)
self.showSelectedAtomInfoCheckBox = \
PM_CheckBox(
inPmGroupBox,
text = "Show Selected Atom Info",
widgetColumn = 0,
state = Qt.Unchecked)
self.selectedAtomPosGroupBox = \
PM_GroupBox( inPmGroupBox, title = "")
self._loadSelectedAtomPosGroupBox(self.selectedAtomPosGroupBox)
self.toggle_selectedAtomPosGroupBox(show = 0)
self.enable_or_disable_selectedAtomPosGroupBox( bool_enable = False)
self.reshapeSelectionCheckBox = \
PM_CheckBox( inPmGroupBox,
text = 'Dragging reshapes selection',
widgetColumn = 0,
state = Qt.Unchecked )
connect_checkbox_with_boolean_pref( self.reshapeSelectionCheckBox,
reshapeAtomsSelection_prefs_key )
env.prefs[reshapeAtomsSelection_prefs_key] = False
self.waterCheckBox = \