コード例 #1
0
    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
0
    def __init__(self, commandSequencer, struct = None):
        """
        Constructor for BuildDna_EditCommand
        """

        EditCommand.__init__(self, commandSequencer)
        self.struct = struct
コード例 #3
0
    def __init__(self, commandSequencer, struct=None):
        """
        Constructor for BuildNanotube_EditCommand
        """

        EditCommand.__init__(self, commandSequencer)
        self.struct = struct
コード例 #4
0
    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
コード例 #5
0
    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
コード例 #6
0
    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
コード例 #7
0
    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
コード例 #8
0
    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
コード例 #9
0
    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
コード例 #10
0
    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
コード例 #11
0
    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
コード例 #12
0
    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
コード例 #13
0
    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 
        rotary motor or it may be used for an existing rotary motor. 

        @param win: The NE1 main window.
        @type  win: QMainWindow

        @param struct: The model object (in this case a 'rotary 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{RotaryMotor} or None

        @see: L{RotaryMotor.__init__}
        """
        EditCommand.__init__(self, commandSequencer)
        self.struct = struct
コード例 #14
0
    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
コード例 #15
0
    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
コード例 #16
0
    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