当前位置: 首页>>代码示例>>Python>>正文


Python PM_GroupBox.PM_GroupBox类代码示例

本文整理汇总了Python中PM.PM_GroupBox.PM_GroupBox的典型用法代码示例。如果您正苦于以下问题:Python PM_GroupBox类的具体用法?Python PM_GroupBox怎么用?Python PM_GroupBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PM_GroupBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update

    def update(self):
        """
        Updates the clipboard items in the L{PM_Clipboard} groupbox. Also
        updates its element viewer.
        """
        PM_GroupBox.update(self)
        self.pastableItems = self.w.assy.shelf.getPastables()
        i = self.clipboardListWidget.currentRow()
        self.clipboardListWidget.clear()
        newModel = None

        if len(self.pastableItems):
            for item in self.pastableItems:
                self.clipboardListWidget.addItem(item.name)

            if i >= self.clipboardListWidget.count():
                i = self.clipboardListWidget.count() - 1

            if i < 0:
                i = 0

            self.clipboardListWidget.setCurrentItem(
                    self.clipboardListWidget.item(i))


            newModel = self.pastableItems[i]

        self._updateElementViewer(newModel)
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:28,代码来源:PM_Clipboard.py

示例2: _addGroupBoxes

    def _addGroupBoxes( self ):
        """
        Add the Insert Nanotube Property Manager group boxes.
        """

        self._pmGroupBox1 = PM_GroupBox( self, title = "Endpoints" )
        self._loadGroupBox1( self._pmGroupBox1 )
        self._pmGroupBox1.hide()

        self._pmGroupBox2 = PM_GroupBox( self, title = "Parameters" )
        self._loadGroupBox2( self._pmGroupBox2 )

        self._displayOptionsGroupBox = PM_GroupBox( self,
                                                    title = "Display Options" )
        self._loadDisplayOptionsGroupBox( self._displayOptionsGroupBox )

        self._pmGroupBox3 = PM_GroupBox( self, title = "Nanotube Distortion" )
        self._loadGroupBox3( self._pmGroupBox3 )
        self._pmGroupBox3.hide() #@ Temporary.

        self._pmGroupBox4 = PM_GroupBox( self, title = "Multi-Walled CNTs" )
        self._loadGroupBox4( self._pmGroupBox4 )
        self._pmGroupBox4.hide() #@ Temporary.

        self._pmGroupBox5 = PM_GroupBox( self, title = "Advanced Options" )
        self._loadGroupBox5( self._pmGroupBox5 )
        self._pmGroupBox5.hide() #@ Temporary.
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:27,代码来源:InsertNanotube_PropertyManager.py

示例3: restoreDefault

 def restoreDefault(self):
     """
     Restores the default checked (selected) element and atom type buttons.
     """
     PM_GroupBox.restoreDefault(self)
     self._updateAtomTypesButtons()
     return
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:7,代码来源:PM_MolecularModelingKit.py

示例4: _loadRotateGroupBox

 def _loadRotateGroupBox(self, inPmGroupBox):
     """
     Load widgets in the Rotate group box, 
     @param inPmGroupBox: The Rotate GroupBox in the PM
     @type  inPmGroupBox: L{PM_GroupBox}
     """
     
     rotateChoices = [ "Free Drag", "By Specified Angle"]
     
     self.rotateComboBox = \
         PM_ComboBox( inPmGroupBox,
                      label        = '', 
                      choices      = rotateChoices, 
                      index        = 0, 
                      setAsDefault = False,
                      spanWidth    = True )
     
     self.rotateAsUnitCB = \
         PM_CheckBox( inPmGroupBox,
                      text         = 'Rotate as a unit' ,
                      widgetColumn = 0,
                      state        = Qt.Checked )
     
            
     self.freeDragRotateGroupBox = PM_GroupBox( inPmGroupBox )
     self._loadFreeDragRotateGroupBox(self.freeDragRotateGroupBox)
     
     self.bySpecifiedAngleGroupBox = PM_GroupBox( inPmGroupBox )
     self._loadBySpecifiedAngleGroupBox(self.bySpecifiedAngleGroupBox)
     
     self.updateRotateGroupBoxes(0)    
开发者ID:elfion,项目名称:nanoengineer,代码行数:31,代码来源:Ui_MovePropertyManager.py

示例5: _loadTranslateGroupBox

 def _loadTranslateGroupBox(self, inPmGroupBox):
     """
     Load widgets in the Translate group box.
     @param inPmGroupBox: The Translate group box in the PM
     @type  inPmGroupBox: L{PM_GroupBox}
     """
     
     translateChoices = [ "Free Drag", 
                          "By Delta XYZ", 
                          "To XYZ Position" ]
     
     self.translateComboBox = \
         PM_ComboBox( inPmGroupBox,
                      label        = '', 
                      choices      = translateChoices, 
                      index        = 0, 
                      setAsDefault = False,
                      spanWidth    = True )
     
     self.freeDragTranslateGroupBox = PM_GroupBox( inPmGroupBox )
     self._loadFreeDragTranslateGroupBox(self.freeDragTranslateGroupBox)
             
     self.byDeltaGroupBox = PM_GroupBox( inPmGroupBox )
     self._loadByDeltaGroupBox(self.byDeltaGroupBox)
     
     self.toPositionGroupBox = PM_GroupBox( inPmGroupBox )
     self._loadToPositionGroupBox(self.toPositionGroupBox)
     
     self.updateTranslateGroupBoxes(0)
开发者ID:elfion,项目名称:nanoengineer,代码行数:29,代码来源:Ui_MovePropertyManager.py

示例6: __init__

 def __init__(self, 
              parentWidget,
              glpane = None,
              title = 'Preview'
              ):
     """
     Appends a PM_PreviewGroupBox widget to I{parentWidget},a L{PM_Dialog}
             
     @param parentWidget: The parent dialog (Property manager) containing 
                          this  widget.
     @type  parentWidget: L{PM_Dialog}
     
     @param glpane: GLPane object used in construction of the 
                    L{self.elementViewer}
     @type  glpane: L{GLPane} or None
     
     @param title: The title (button) text.
     @type  title: str      
     
     """
     PM_GroupBox.__init__(self, parentWidget, title)
     
     self.glpane = glpane 
     self.parentWidget = parentWidget        
     self._loadPreviewGroupBox()
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:25,代码来源:PM_PreviewGroupBox.py

示例7: __init__

    def __init__(self,
                 parentWidget,
                 paramsForCheckBoxes=(),
                 checkBoxColumn=1,
                 title=''):
        """
        @param parentWidget: The parent dialog or group box containing this
                             widget.
        @type  parentWidget: L{PM_Dialog} or L{PM_GroupBox}
        
        @param title: The title (button) text. If empty, no title is added.
        @type  title: str
        
        @param paramsForCheckBoxes: A list object that contains tuples like the
               following : ('checkBoxTextString' , preference_key). The 
               checkboxes will be constucted by looping over this list.
        @type paramsForCheckBoxes:list
        @param checkBoxColumn: The widget column in which all the checkboxes
               will be inserted. 
        @type  checkBoxColumn: int
        
        @see: DnaDuplexPropertyManager._loadDisplayOptionsGroupBox for an 
              example use.
        """
        PM_GroupBox.__init__(self, parentWidget, title=title)

        self._checkBoxColumn = checkBoxColumn

        #Also maintain all checkboxes created by this class in this list,
        #just in case the caller needs them. (need access methods for this)
        self.checkBoxes = []

        #Create checkboxes and also connect them to their preference keys.
        self._addCheckBoxes(paramsForCheckBoxes)
开发者ID:octopus89,项目名称:NanoEngineer-1,代码行数:34,代码来源:PM_PrefsCheckBoxes.py

示例8: __init__

    def __init__(self, parentWidget, title="Clipboard", win=None, elementViewer=None):

        """
        Appends a PM_Clipboard groupbox widget to I{parentWidget},a L{PM_Dialog}
                
        @param parentWidget: The parent dialog (Property manager) containing 
                             this  widget.
        @type  parentWidget: L{PM_Dialog}
        
        @param title: The title (button) text.
        @type  title: str
        
        @param win: MainWindow object
        @type  win: L{MWsemantics} or None
        
        @param elementViewer: The associated preview pane groupbox. If provided, 
                              The selected item in L{self.clipboardListWidget}
                              is shown (previewed) by L{elementViewer}.
                              The object being previewed can then be deposited 
                              into the 3D workspace.
        @type  elementViewer: L{PM_PreviewGroupBox} or None
        
        """

        self.w = win
        self.elementViewer = elementViewer
        self.elementViewer.setDisplay(diTUBES)
        self.pastableItems = None

        PM_GroupBox.__init__(self, parentWidget, title)

        self._loadClipboardGroupbox()
开发者ID:octopus89,项目名称:NanoEngineer-1,代码行数:32,代码来源:PM_Clipboard.py

示例9: expand

 def expand(self):
     """
     Expand this group box i.e. show all its contents and change the look 
     and feel of the groupbox button. It also sets the gridlayout margin and
     spacing to 0. (necessary to get rid of the extra space inside the 
     groupbox.)       
     
     @see: L{PM_GroupBox.expand}
     """
     PM_GroupBox.expand(self)
     self.gridLayout.setMargin(0)
     self.gridLayout.setSpacing(0)
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:12,代码来源:PM_PreviewGroupBox.py

示例10: expand

    def expand(self):
        """
        Expand this group box i.e. show all its contents and change the look
        and feel of the groupbox button. It also sets the gridlayout margin and
        spacing to 0. (necessary to get rid of the extra space inside the
        groupbox.)

        @see: L{PM_GroupBox.expand}
        """
        PM_GroupBox.expand(self)
        # If we don't do this, we get a small space b/w the
        # title button and the MessageTextEdit widget.
        # Extra code unnecessary, but more readable.
        # Mark 2007-05-21
        self.gridLayout.setMargin(0)
        self.gridLayout.setSpacing(0)
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:16,代码来源:PM_MessageGroupBox.py

示例11: __init__

    def __init__(self, 
                 parentWidget,
                 title = 'Part Library',
                 win   = None,
                 elementViewer = None
                 ):            
        self.w = win
        self.elementViewer = elementViewer
        # piotr 080410 changed diTUBES to diTrueCPK
        self.elementViewer.setDisplay(diTrueCPK)
        self.partLib = None
        self.newModel = None

        PM_GroupBox.__init__(self, parentWidget, title)

        self._loadPartLibGroupBox()
开发者ID:elfion,项目名称:nanoengineer,代码行数:16,代码来源:PM_PartLib.py

示例12: _addGroupBoxes

    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
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:16,代码来源:DnaStrand_PropertyManager.py

示例13: _loadSelectionOptionsGroupBox

    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 = \
            PM_CheckBox( inPmGroupBox,
                         text         = "Z depth filter (water surface)",
                         widgetColumn = 0,
                         state        = Qt.Unchecked  )
开发者ID:foulowl,项目名称:nanoengineer,代码行数:56,代码来源:Ui_BuildAtomsPropertyManager.py

示例14: _addGroupBoxes

 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 )
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:10,代码来源:DnaStrand_PropertyManager.py

示例15: _addGroupBoxes

 def _addGroupBoxes(self):
     """
     Add groupboxes to the Property Manager dialog. 
     """
     
     self.translateGroupBox = PM_GroupBox( self, 
                                           title = "Translate",
                                           connectTitleButton = False)
     self.translateGroupBox.titleButton.setShortcut('T')
     self._loadTranslateGroupBox(self.translateGroupBox)
     
     self.rotateGroupBox = PM_GroupBox( self, 
                                        title = "Rotate",
                                        connectTitleButton = False)
     self.rotateGroupBox.titleButton.setShortcut('R')
     self._loadRotateGroupBox(self.rotateGroupBox)
     
     self.translateGroupBox.collapse()
     self.rotateGroupBox.collapse()
开发者ID:elfion,项目名称:nanoengineer,代码行数:19,代码来源:Ui_MovePropertyManager.py


注:本文中的PM.PM_GroupBox.PM_GroupBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。