本文整理汇总了Python中PM.PM_LineEdit.PM_LineEdit.text方法的典型用法代码示例。如果您正苦于以下问题:Python PM_LineEdit.text方法的具体用法?Python PM_LineEdit.text怎么用?Python PM_LineEdit.text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PM.PM_LineEdit.PM_LineEdit
的用法示例。
在下文中一共展示了PM_LineEdit.text方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DnaStrand_PropertyManager
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit import text [as 别名]
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):
"""
#.........这里部分代码省略.........
示例2: DnaStrand_PropertyManager
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit import text [as 别名]
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"
pmName = title
iconPath = "ui/actions/Properties Manager/Strand.png"
def __init__( self, win, editCommand ):
"""
Constructor for the Build DNA property manager.
"""
#For model changed signal
self.previousSelectionParams = None
#see self.connect_or_disconnect_signals for comment about this flag
self.isAlreadyConnected = False
self.isAlreadyDisconnected = False
self.sequenceEditor = None
self._numberOfBases = 0
self._conformation = 'B-DNA'
self.duplexRise = 3.18
self.basesPerTurn = 10
self.dnaModel = 'PAM3'
_superclass.__init__( self,
win,
editCommand)
self.showTopRowButtons( PM_DONE_BUTTON | \
PM_WHATS_THIS_BUTTON)
self._loadSequenceEditor()
msg = "Use resize handles to resize the strand. Use sequence editor"\
"to assign a new sequence or the current one to a file."
self.updateMessage(msg)
def _addGroupBoxes( self ):
"""
Add the DNA 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 = "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,
#.........这里部分代码省略.........
示例3: EditNanotube_PropertyManager
# 需要导入模块: from PM.PM_LineEdit import PM_LineEdit [as 别名]
# 或者: from PM.PM_LineEdit.PM_LineEdit import text [as 别名]
class EditNanotube_PropertyManager( DnaOrCnt_PropertyManager ):
"""
The NanotubeSegmenta_PropertyManager class provides a Property Manager
for the EditNanotube_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 = "Nanotube Properties"
pmName = title
iconPath = "ui/actions/Command Toolbar/BuildNanotube/EditNanotube.png"
def __init__( self, command ):
"""
Constructor for the Cnt Segment Properties property manager.
"""
#For model changed signal
self.previousSelectionParams = None
#see self.connect_or_disconnect_signals for comment about this flag
self.isAlreadyConnected = False
self.isAlreadyDisconnected = False
# Initialized here. Their values will be set in
# _update_widgets_in_PM_before_show()
self.endPoint1 = V(0, 0, 0)
self.endPoint2 = V(0, 0, 0)
_superclass.__init__( self, command)
self.showTopRowButtons( PM_DONE_BUTTON | \
PM_CANCEL_BUTTON | \
PM_WHATS_THIS_BUTTON)
def connect_or_disconnect_signals(self, isConnect):
"""
Connect or disconnect widget signals sent to their slot methods.
This can be overridden in subclasses. By default it does nothing.
@param isConnect: If True the widget will send the signals to the slot
method.
@type isConnect: boolean
"""
if isConnect:
change_connect = self.win.connect
else:
change_connect = self.win.disconnect
change_connect(self.nameLineEdit,
SIGNAL("editingFinished()"),
self._nameChanged)
change_connect(self.showCursorTextCheckBox,
SIGNAL('stateChanged(int)'),
self._update_state_of_cursorTextGroupBox)
return
def show(self):
"""
Show this property manager. Overrides EditCommand_PM.show()
This method also retrives the name information from the
command's structure for its name line edit field.
@see: EditNanotube_EditCommand.getStructureName()
@see: self.close()
"""
_superclass.show(self)
#if self.command is not None:
#name = self.command.getStructureName()
#if name is not None:
#self.nameLineEdit.setText(name)
def close(self):
"""
Close this property manager.
Also sets the name of the self.command's structure to the one
displayed in the line edit field.
@see self.show()
@see: EditNanotube_EditCommand.setStructureName
"""
if self.command is not None:
name = str(self.nameLineEdit.text())
self.command.setStructureName(name)
_superclass.close(self)
def _connect_showCursorTextCheckBox(self):
"""
Connect the show cursor text checkbox with user prefs_key.
Overrides
DnaOrCnt_PropertyManager._connect_showCursorTextCheckBox
"""
#.........这里部分代码省略.........