當前位置: 首頁>>代碼示例>>Python>>正文


Python EditCommand_PM.EditCommand_PM類代碼示例

本文整理匯總了Python中command_support.EditCommand_PM.EditCommand_PM的典型用法代碼示例。如果您正苦於以下問題:Python EditCommand_PM類的具體用法?Python EditCommand_PM怎麽用?Python EditCommand_PM使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了EditCommand_PM類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: update_props_if_needed_before_closing

    def update_props_if_needed_before_closing(self):
        """
        This updates some cosmetic properties of the Plane (e.g. fill color,
        border color, etc.) before closing the Property Manager.
        """

        # Example: The Plane Property Manager is open and the user is
        # 'previewing' the plane. Now the user clicks on "Build > Atoms"
        # to invoke the next command (without clicking "Done").
        # This calls openPropertyManager() which replaces the current PM
        # with the Build Atoms PM.  Thus, it creates and inserts the Plane
        # that was being previewed. Before the plane is permanently inserted
        # into the part, it needs to change some of its cosmetic properties
        # (e.g. fill color, border color, etc.) which distinguishes it as
        # a new plane in the part. This function changes those properties.
        # ninad 2007-06-13

        #called in updatePropertyManager in MWsemeantics.py --(Partwindow class)

        EditCommand_PM.update_props_if_needed_before_closing(self)

        #Don't draw the direction arrow when the object is finalized.
        if self.command.struct and \
           self.command.struct.offsetParentGeometry:

            dirArrow = self.command.struct.offsetParentGeometry.directionArrow
            dirArrow.setDrawRequested(False)
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:27,代碼來源:PlanePropertyManager.py

示例2: close

 def close(self):
     """
     Close this Property manager.
     """
     if self.attachedAtomsListWidget:
         self.attachedAtomsListWidget.clearTags()
     EditCommand_PM.close(self)
開發者ID:elfion,項目名稱:nanoengineer,代碼行數:7,代碼來源:MotorPropertyManager.py

示例3: __init__

    def __init__( self, win, editCommand ):
        """
        Constructor for the Build DNA property manager.
        """
        
        #For model changed signal
        self.previousSelectionParams = None
         
        #Urmi 20080713: set the protein chunk name and its length
        #for the first available chunk and not the selected one, that's
        #not implemented as yet
        
        #self.showProteinParametersAndSequenceEditorForInit(win)
        
        #see self.connect_or_disconnect_signals for comment about this flag
        self.isAlreadyConnected = False
        self.isAlreadyDisconnected = False           
        
        EditCommand_PM.__init__( self, 
                                    win,
                                    editCommand)


        DebugMenuMixin._init1( self )

        self.showTopRowButtons( PM_DONE_BUTTON | \
                                PM_CANCEL_BUTTON | \
                                PM_WHATS_THIS_BUTTON)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:28,代碼來源:BuildProtein_PropertyManager.py

示例4: show

 def show(self):
     """
     Show this PM 
     As of 2007-11-20, it also shows the Sequence Editor widget and hides 
     the history widget. This implementation may change in the near future
     """
     EditCommand_PM.show(self) 
     self.updateListWidgets()    
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:8,代碼來源:BuildDna_PropertyManager.py

示例5: close

 def close(self):
     """
     Overrides superclass close method
     """
     self.sequenceEditor.hide()
     env.history.statusbar_msg("")
     EditCommand_PM.close(self)
     return
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:8,代碼來源:BuildProtein_PropertyManager.py

示例6: close

 def close(self):
     """
     Closes the Property Manager. Overrides EditCommand_PM.close()
     """
     #Clear tags, if any, due to the selection in the self.strandListWidget.
     #self.nanotubeListWidget.clear()
     env.history.statusbar_msg("")
     EditCommand_PM.close(self)
     return
開發者ID:elfion,項目名稱:nanoengineer,代碼行數:9,代碼來源:BuildNanotube_PropertyManager.py

示例7: close

 def close(self):
     """
     Closes the Property Manager. Overrides EditCommand_PM.close()
     """
     #Clear tags, if any, due to the selection in the self.strandListWidget.        
     if self.segmentListWidget:
         self.segmentListWidget.clear()
                
     EditCommand_PM.close(self)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:9,代碼來源:BuildNanotube_PropertyManager.py

示例8: show

 def show(self):
     """
     Overrides superclass show method
     """
     env.history.statusbar_msg("")
     self._updateProteinListForShow()
     self._showProteinParametersAndSequenceEditor()
     EditCommand_PM.show(self)
     self.updateMessage()
     return
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:10,代碼來源:BuildProtein_PropertyManager.py

示例9: show

    def show(self):
        """
        Show this PM
        As of 2007-11-20, it also shows the Sequence Editor widget and hides
        the history widget. This implementation may change in the near future
        """
        EditCommand_PM.show(self)

        self.updateMessage("Use appropriate command in the command "\
                               "toolbar to create or modify a DNA Object"\
                               "<br>" )
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:11,代碼來源:BuildDna_PropertyManager.py

示例10: show

    def show(self):
        """
        Show the  motor Property Manager.
        """
        EditCommand_PM.show(self)
        #It turns out that if updateCosmeticProps is called before
        #EditCommand_PM.show, the 'preview' properties are not updated
        #when you are editing an existing R.Motor. Don't know the cause at this
        #time, issue is trivial. So calling it in the end -- Ninad 2007-10-03
        if self.command and self.command.struct:
            self.command.struct.updateCosmeticProps(previewing = True)

        self.updateAttachedAtomListWidget()
開發者ID:elfion,項目名稱:nanoengineer,代碼行數:13,代碼來源:MotorPropertyManager.py

示例11: show

    def show(self):
        """
        Show the PM. Extends superclass method.
        @note: _update_UI_do_updates() gets called immediately after this and
               updates PM widgets with their correct values/settings.
        """

        env.history.statusbar_msg("")
        EditCommand_PM.show(self)

        # NOTE: Think about moving this msg to _update_UI_do_updates() where
        # custom msgs can be created based on the current selection, etc.
        # Mark 2008-12-14
        msg = "Select <b>Insert Nanotube</b> to create a nanotube or " "select an existing nantube to modify it."
        self.updateMessage(msg)
        return
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:16,代碼來源:BuildNanotube_PropertyManager.py

示例12: connect_or_disconnect_signals

    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

        EditCommand_PM.connect_or_disconnect_signals(self, isConnect)

        self.attachedAtomsListWidget.connect_or_disconnect_signals(isConnect)
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:16,代碼來源:MotorPropertyManager.py

示例13: __init__

    def __init__(self, command):
        """
        Construct the  Motor Property Manager.
        """

        EditCommand_PM.__init__( self, command)

        msg = "Attach a " + self.title + " to the selected atoms"

        # This causes the "Message" box to be displayed as well.
        self.updateMessage(msg)

        self.glpane = self.win.glpane

        # Hide Restore defaults button for Alpha9.
        self.hideTopRowButtons(PM_PREVIEW_BUTTON | PM_RESTORE_DEFAULTS_BUTTON)
開發者ID:elfion,項目名稱:nanoengineer,代碼行數:16,代碼來源:MotorPropertyManager.py

示例14: __init__

    def __init__( self, command ):
        """
        Constructor for the Build DNA property manager.
        """

        self.current_protein = ""
        self.sequenceEditor = command.win.createProteinSequenceEditorIfNeeded()

        #see self.connect_or_disconnect_signals for comment about this flag
        self.isAlreadyConnected = False
        self.isAlreadyDisconnected = False

        EditCommand_PM.__init__( self, command)

        self.showTopRowButtons( PM_DONE_BUTTON | \
                                PM_CANCEL_BUTTON | \
                                PM_WHATS_THIS_BUTTON)
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:17,代碼來源:BuildProtein_PropertyManager.py

示例15: show

    def show(self):
        """
        Show the Plane Property Manager.
        """
        EditCommand_PM.show(self)
        #It turns out that if updateCosmeticProps is called before 
        #EditCommand_PM.show, the 'preview' properties are not updated 
        #when you are editing an existing plane. Don't know the cause at this
        #time, issue is trivial. So calling it in the end -- Ninad 2007-10-03

        if self.editCommand.struct:

            plane = self.editCommand.struct 
            plane.updateCosmeticProps(previewing = True)
            if plane.imagePath:
                self.imageDisplayFileChooser.setText(plane.imagePath)
            self.imageDisplayCheckBox.setChecked(plane.display_image) 
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:17,代碼來源:PlanePropertyManager.py


注:本文中的command_support.EditCommand_PM.EditCommand_PM類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。