本文整理汇总了Python中command_support.EditCommand.EditCommand.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python EditCommand.__init__方法的具体用法?Python EditCommand.__init__怎么用?Python EditCommand.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类command_support.EditCommand.EditCommand
的用法示例。
在下文中一共展示了EditCommand.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer, struct = None):
"""
Constructor for DnaDuplex_EditCommand
"""
EditCommand.__init__(self, commandSequencer)
#_fallbackDnaGroup stores the DnaSegments created while in
#this command. This temporary dnaGroup is created IF AND ONLY IF
#DnaDuplex_EditCommand is unable to access the dnaGroup object of the
#parent BuildDna_EditCommand. (so if this group gets created, it should
#be considered as a bug. While exiting the command the list of segments
#of this group is given to the BuildDna_EditCommand where they get
#their new parent. @see self.restore_gui
self._fallbackDnaGroup = None
#_parentDnaGroup is the dnagroup of BuildDna_EditCommand
self._parentDnaGroup = None
#Maintain a list of segments created while this command was running.
#Note that the segments , when created will be added directly to the
# self._parentDnaGroup (or self._fallbackDnaGroup if there is a bug)
# But self._parentDnaGroup (which must be = the dnaGroup of
# BuildDna_EditCommand.) may already contain DnaSegments (added earlier)
# so, we can not use group.steal_members() in case user cancels the
#structure creation (segment addition).
self._segmentList = []
self.struct = struct
示例2: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer, struct = None):
"""
Constructor for BuildDna_EditCommand
"""
EditCommand.__init__(self, commandSequencer)
self.struct = struct
示例3: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer, struct = None):
"""
Constructor for InsertNanotube_EditCommand
"""
EditCommand.__init__(self, commandSequencer)
#Maintain a list of segments created while this command was running.
self._segmentList = []
self.struct = struct
示例4: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer, struct = None):
"""
Constructor for DnaDuplex_EditCommand
"""
glpane = commandSequencer
State_preMixin.__init__(self, glpane)
EditCommand.__init__(self, commandSequencer)
self.struct = struct
#Graphics handles for editing the structure .
self.handles = []
self.grabbedHandle = None
示例5: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer):
"""
Constructor for InsertDna_EditCommand
"""
# used by self.command_update_internal_state()
self._previous_model_change_indicator = None
glpane = commandSequencer.assy.glpane
State_preMixin.__init__(self, glpane)
EditCommand.__init__(self, commandSequencer)
# Graphics handles for editing the structure .
self.handles = []
self.grabbedHandle = None
示例6: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer):
"""
Constructor for InsertDna_EditCommand
"""
glpane = commandSequencer.assy.glpane
State_preMixin.__init__(self, glpane)
EditCommand.__init__(self, commandSequencer)
#Graphics handles for editing the structure .
self.handles = []
self.grabbedHandle = None
#Initialize DEBUG preference
pref_nt_segment_resize_by_recreating_nanotube()
return
示例7: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer, struct = None):
"""
Constructs an Edit Controller Object. The editCommand,
depending on what client code needs it to do, may create a new
Linear motor or it may be used for an existing linear motor.
@param win: The NE1 main window.
@type win: QMainWindow
@param struct: The model object (in this case a 'linear motor') that the
this EditCommand may create and/or edit
If struct object is specified, it means this
editCommand will be used to edit that struct.
@type struct: L{LinearMotor} or None
@see: L{LinearMotor.__init__}
"""
EditCommand.__init__(self, commandSequencer)
self.struct = struct
示例8: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer):
"""
Constructor for InsertDna_EditCommand
"""
glpane = commandSequencer.assy.glpane
State_preMixin.__init__(self, glpane)
EditCommand.__init__(self, commandSequencer)
#It uses BuildDna_EditCommand.flyoutToolbar ( in other words, that
#toolbar is still accessible and not changes while in this command)
flyoutToolbar = None
#Graphics handles for editing the structure .
self.handles = []
self.grabbedHandle = None
#This is used for comarison purpose in model_changed method to decide
#whether to update the sequence.
self._previousNumberOfBases = None
示例9: __init__
# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import __init__ [as 别名]
def __init__(self, commandSequencer, struct = None):
"""
Constructor for DnaDuplex_EditCommand
"""
glpane = commandSequencer
State_preMixin.__init__(self, glpane)
EditCommand.__init__(self, commandSequencer)
self.struct = struct
#DnaSegment object to which this strand belongs
self._parentDnaSegment = None
#It uses BuildDna_EditCommand.flyoutToolbar ( in other words, that
#toolbar is still accessible and not changes while in this command)
flyoutToolbar = None
#Graphics handles for editing the structure .
self.handles = []
self.grabbedHandle = None
#This is used for comarison purpose in model_changed method to decide
#whether to update the sequence.
self._previousNumberOfBases = None