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


Python PM_PushButton.PM_PushButton類代碼示例

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


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

示例1: _loadGroupBox1

    def _loadGroupBox1(self, pmGroupBox):
        """
        Load widgets in group box.
        """

        self.structure1LineEdit = PM_LineEdit(pmGroupBox, label="First structure:", setAsDefault=False)
        self.structure1LineEdit.setEnabled(False)

        self.structure2LineEdit = PM_LineEdit(pmGroupBox, label="Second structure:", setAsDefault=False)
        self.structure2LineEdit.setEnabled(False)

        self.thresholdDoubleSpinBox = PM_DoubleSpinBox(
            pmGroupBox,
            label="Threshold:",
            value=self.threshold,
            setAsDefault=True,
            minimum=0.0,
            maximum=360.0,
            decimals=1,
            singleStep=30.0,
            suffix=" deg",
            spanWidth=False,
        )

        self.comparePushButton = PM_PushButton(pmGroupBox, text="Compare", setAsDefault=True)

        self.hidePushButton = PM_PushButton(pmGroupBox, text="Hide differences", setAsDefault=True)
        return
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:28,代碼來源:CompareProteins_PropertyManager.py

示例2: _loadGroupBox2

    def _loadGroupBox2(self, pmGroupBox):
        """
        Load widgets in the second group box.
        """

        self.headerdata_seq = ['', 'ID', 'Set', 'BR', 'Descriptor']

        self.recenterViewCheckBox  = \
            PM_CheckBox( pmGroupBox,
                         text          =  "Re-center view on selected residue",
                         setAsDefault  =  True,
                         widgetColumn  = 0,
                         state         = Qt.Unchecked)

        self.selectAllPushButton = PM_PushButton( pmGroupBox,
            text         =  "All",
            setAsDefault  =  True)

        self.selectAllPushButton.setFixedHeight(25)

        self.selectNonePushButton = PM_PushButton( pmGroupBox,
            text       =  "None",
            setAsDefault  =  True)

        self.selectNonePushButton.setFixedHeight(25)

        self.selectInvertPushButton = PM_PushButton( pmGroupBox,
            text       =  "Invert",
            setAsDefault  =  True)

        self.selectInvertPushButton.setFixedHeight(25)

        buttonList = [ ('PM_PushButton', self.selectAllPushButton, 0, 0),
                       ('PM_PushButton', self.selectNonePushButton, 1, 0),
                       ('PM_PushButton', self.selectInvertPushButton, 2, 0)]

        self.buttonGrid = PM_WidgetGrid( pmGroupBox,
                                         widgetList = buttonList)


        self.sequenceTable = PM_TableWidget( pmGroupBox)
        #self.sequenceTable.setModel(self.tableModel)
        self.sequenceTable.resizeColumnsToContents()
        self.sequenceTable.verticalHeader().setVisible(False)
        #self.sequenceTable.setRowCount(0)
        self.sequenceTable.setColumnCount(5)

        self.checkbox = QCheckBox()


        self.sequenceTable.setFixedHeight(345)

        self.sequenceTable.setGridStyle(Qt.NoPen)

        self.sequenceTable.setHorizontalHeaderLabels(self.headerdata_seq)
        ###self._fillSequenceTable()
        self.showSequencePushButton = PM_PushButton( pmGroupBox,
            text       =  "Show Sequence",
            setAsDefault  =  True,
            spanWidth = True)
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:60,代碼來源:EditResidues_PropertyManager.py

示例3: _loadGroupBox2

    def _loadGroupBox2(self, pmGroupBox): ### RENAME button attrs
        self.startButton = \
            PM_PushButton( pmGroupBox,
                           label     = "",
                           text      = "Bigger",
                           spanWidth = False ) ###BUG: button spans PM width, in spite of this setting
        self.startButton.setAction( self.button_Bigger, cmdname = "Bigger")
        
        self.stopButton = \
            PM_PushButton( pmGroupBox,
                           label     = "",
                           text      = "Smaller",
                           spanWidth = False )
        self.stopButton.setAction( self.button_Smaller, cmdname = "Smaller")

        return
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:16,代碼來源:test_connectWithState_PM.py

示例4: _loadGroupBox1

 def _loadGroupBox1(self, pmGroupBox):
     """
     Load widgets in group box.
     """
     
     includeStrandsChoices = ["All strands in model",
                              "Selected strands only"]
     
     self.includeStrandsComboBox  = \
         PM_ComboBox( pmGroupBox,
                      label         =  "Include strands:", 
                      choices       =  includeStrandsChoices,
                      setAsDefault  =  True)
     
     self.numberOfBasesLineEdit  = \
         PM_LineEdit( pmGroupBox,
                      label  =  "Number of bases:",
                      text   = str(self.getNumberOfBases()))
     self.numberOfBasesLineEdit.setEnabled(False)
     
     self.viewDnaOrderFileButton = \
         PM_PushButton( pmGroupBox,
                        label     = "",
                        text      = "View DNA Order File...",
                        spanWidth = True)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:25,代碼來源:OrderDna_PropertyManager.py

示例5: _loadLayerPropertiesGroupBox

    def _loadLayerPropertiesGroupBox(self, inPmGroupBox):
        """
        Load widgets in the Layer Properties group box.
        @param inPmGroupBox: The Layer Properties groupbox in the PM
        @type  inPmGroupBox: L{PM_GroupBox}
        """

        self.currentLayerComboBox = \
            PM_ComboBox( inPmGroupBox,
                         index     = 0,
                         spanWidth = True
                        )

        self.addLayerButton = PM_PushButton(inPmGroupBox)
        self.addLayerButton.setIcon(
            geticon('ui/actions/Properties Manager/addlayer.png'))
        self.addLayerButton.setFixedSize(QSize(26, 26))
        self.addLayerButton.setIconSize(QSize(22, 22))

        # A widget list to create a widget row.
        # Format:
        # - Widget type,
        # - widget object,
        # - column

        firstRowWidgetList = [('PM_ComboBox', self.currentLayerComboBox, 1),
                              ('PM_PushButton', self.addLayerButton, 2)
                              ]

        widgetRow = PM_WidgetRow(inPmGroupBox,
                                 title     = '',
                                 widgetList = firstRowWidgetList,
                                 label = "Layer:",
                                 labelColumn  = 0,
                                 )

        self.layerCellsSpinBox = \
             PM_SpinBox( inPmGroupBox,
                        label         =  "Lattice cells:",
                        labelColumn   =  0,
                        value         =  2,
                        minimum       =  1,
                        maximum       =  25
                      )

        self.layerThicknessLineEdit = PM_LineEdit(inPmGroupBox,
                                         label        = "Thickness:",
                                         text         = "",
                                         setAsDefault = False,
                                         spanWidth    = False )

        #self.layerThicknessLineEdit.setReadOnly(True)
        self.layerThicknessLineEdit.setDisabled(True)
        tooltip = "Thickness of layer in Angstroms"
        self.layerThicknessLineEdit.setToolTip(tooltip)
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:55,代碼來源:Ui_BuildCrystal_PropertyManager.py

示例6: _loadGroupBox1

    def _loadGroupBox1(self, pmGroupBox):
        """
        load widgets in groupbox1
        """

        self.nanotubeListWidget = PM_SelectionListWidget(pmGroupBox, self.win, label="", heightByRows=12)
        self.nanotubeListWidget.setObjectName("nanotubeListWidget")
        self.nanotubeListWidget.setTagInstruction("PICK_ITEM_IN_GLPANE")

        self.editNanotubePropertiesButton = PM_PushButton(pmGroupBox, label="", text="Edit Properties...")
        self.editNanotubePropertiesButton.setEnabled(False)
        return
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:12,代碼來源:BuildNanotube_PropertyManager.py

示例7: _loadGroupBox3

 def _loadGroupBox3(self, pmGroupBox):
     """
     load widgets in groupbox3
     """
     
     self.segmentListWidget = PM_SelectionListWidget(pmGroupBox,
                                                    self.win,
                                                    label = "",
                                                    heightByRows = 4 )
     self.segmentListWidget.setObjectName('Segment_list_widget')
     self.segmentListWidget.setTagInstruction('PICK_ITEM_IN_GLPANE')
     
 
     self.editSegmentPropertiesButton = PM_PushButton( 
         pmGroupBox,
         label = "",
         text  = "Edit Properties..." )
     self.editSegmentPropertiesButton.setEnabled(False)
     
     self.searchForCrossoversButton = PM_PushButton( 
         pmGroupBox,
         label = "",
         text  = "Search For Crossovers..." )
     self.searchForCrossoversButton.setEnabled(False)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:24,代碼來源:BuildDna_PropertyManager.py

示例8: _loadGroupBox2

 def _loadGroupBox2(self, pmGroupBox):
     """
     load widgets in groupbox2
     """
     
     self.strandListWidget = PM_SelectionListWidget(pmGroupBox,
                                                    self.win,
                                                    label = "",
                                                    heightByRows = 9 )
     self.strandListWidget.setTagInstruction('PICK_ITEM_IN_GLPANE')
 
     self.editStrandPropertiesButton = PM_PushButton( 
         pmGroupBox,
         label = "",
         text  = "Edit Properties..." )
     self.editStrandPropertiesButton.setEnabled(False)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:16,代碼來源:BuildDna_PropertyManager.py

示例9: _loadBreakOptionsGroupbox

    def _loadBreakOptionsGroupbox(self, pmGroupBox):
        """
        Load widgets in this group box.
        """

        self.assignColorToBrokenDnaStrandsCheckBox = \
            PM_CheckBox(pmGroupBox ,
                        text         = 'Assign new color to broken strands',
                        widgetColumn = 0,
                        spanWidth = True)

        connect_checkbox_with_boolean_pref(
            self.assignColorToBrokenDnaStrandsCheckBox,
            assignColorToBrokenDnaStrands_prefs_key )



        self.basesBeforeNextBreakSpinBox = \
            PM_SpinBox( pmGroupBox,
                        label         =  "Break Every:",
                        value         =  3,
                        setAsDefault  =  False,
                        minimum       =  1,
                        maximum       =  10000,
                        suffix       = " bases"
                        )

        connect_spinBox_with_pref(
            self.basesBeforeNextBreakSpinBox,
            breakStrandsCommand_numberOfBasesBeforeNextBreak_prefs_key)

        self.breakAllStrandsButton = PM_PushButton(
            pmGroupBox,
            label = "",
            text  = "do it" )


        self._dnaStrandChooserGroupBox = PM_ObjectChooser(
            pmGroupBox,
            self.command,
            modelObjectType = self.win.assy.DnaStrand,
            title = "Choose strands " )

        if not DEBUG_BREAK_OPTIONS_FEATURE:
            self._dnaStrandChooserGroupBox.hide()
            self.breakAllStrandsButton.hide()
            self.basesBeforeNextBreakSpinBox.hide()
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:47,代碼來源:BreakStrands_PropertyManager.py

示例10: test_connectWithState_PM


#.........這裏部分代碼省略.........
                              minimum       =  3,
                              maximum       =  self._sMaxCylinderHeight,
                              singleStep    =  0.25,
                              decimals      =  self._sCoordinateDecimals,
                              suffix        =  ' ' + self._sCoordinateUnits )
        # REVIEW: is it ok that the above will set some wrong defaultValue,
        # to be immediately corrected by the following connection with state?
        self.cylinderHeightSpinbox.connectWithState(
            cylinderHeight_stateref,
            debug_metainfo = True
         )

        # ==
        
        # cylinder width (a double, stored in the command object,
        #  defined there using the State macro -- note, this is not yet a good
        #  enough example for state stored in a Node)

        cylinderWidth_stateref = ObjAttr_StateRef( self.commandrun, 'cylinderWidth')

        ## TEMPORARY: just make sure it's defined in there
        junk = cylinderWidth_stateref.defaultValue
        
        self.cylinderWidthSpinbox  =  \
            PM_DoubleSpinBox( pmGroupBox,
                              label         =  "cylinder width:",
##                              value         =  defaultValue,
##                              setAsDefault  =  True,
##                                  ### REVISE: the default value should come from the cylinderWidth_stateref
                                  # (and so, probably, should min, max, step, units...)
                              minimum       =  0.1,
                              maximum       =  15.0,
                              singleStep    =  0.1,
                              decimals      =  self._sCoordinateDecimals,
                              suffix        =  ' ' + self._sCoordinateUnits )
        
        self.cylinderWidthSpinbox.connectWithState(
                                cylinderWidth_stateref,
                                debug_metainfo = True )

        # ==
        
        # cylinder round caps (boolean)
        
        cylinderRoundCaps_stateref = Preferences_StateRef( CYLINDER_ROUND_CAPS_PREFS_KEY,
                                                           CYLINDER_ROUND_CAPS_DEFAULT_VALUE ) ### TODO: get from model
        ## TEMPORARY: just make sure it's defined in there
        junk = cylinderRoundCaps_stateref.defaultValue
        
        self.cylinderRoundCapsCheckbox = PM_CheckBox(pmGroupBox, text = 'round caps on cylinder')
##        self.cylinderRoundCapsCheckbox.setDefaultValue(CYLINDER_ROUND_CAPS_DEFAULT_VALUE)
##            # note: setDefaultValue is an extension to the PM_CheckBox API, not yet finalized
        self.cylinderRoundCapsCheckbox.connectWithState(
                                cylinderRoundCaps_stateref,
                                debug_metainfo = True )

        # ==
        
        # cylinder vertical or horizontal (boolean)
        cylinderVertical_stateref = ObjAttr_StateRef( self.commandrun, 'cylinderVertical' )
        
        self.cylinderVerticalCheckbox = PM_CheckBox(pmGroupBox, text = 'cylinder is vertical')
##        self.cylinderVerticalCheckbox.setDefaultValue(CYLINDER_VERTICAL_DEFAULT_VALUE)
##            ### REVISE: the default value should come from the stateref
        self.cylinderVerticalCheckbox.connectWithState(
                                cylinderVertical_stateref,
                                debug_metainfo = True )
        
        return # from _loadGroupBox1

    def _loadGroupBox2(self, pmGroupBox): ### RENAME button attrs
        self.startButton = \
            PM_PushButton( pmGroupBox,
                           label     = "",
                           text      = "Bigger",
                           spanWidth = False ) ###BUG: button spans PM width, in spite of this setting
        self.startButton.setAction( self.button_Bigger, cmdname = "Bigger")
        
        self.stopButton = \
            PM_PushButton( pmGroupBox,
                           label     = "",
                           text      = "Smaller",
                           spanWidth = False )
        self.stopButton.setAction( self.button_Smaller, cmdname = "Smaller")

        return
        
    def button_Bigger(self):
        self.commandrun.cmd_Bigger()

    def button_Smaller(self):
        self.commandrun.cmd_Smaller()
        
    def _addWhatsThisText(self):
        """What's This text for some of the widgets in the Property Manager."""
        self.cylinderHeightSpinbox.setWhatsThis("cylinder height (stored in prefs)")
        self.cylinderWidthSpinbox.setWhatsThis("cylinder width (stored as State in the command object)")
        return
    
    pass # end of class
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:101,代碼來源:test_connectWithState_PM.py

示例11: BuildDna_PropertyManager


#.........這裏部分代碼省略.........
                    if isinstance(node, self.win.assy.DnaSegment):
                        segmentList.append(node)

                self.command.struct.apply2all(func)
                self.segmentListWidget.insertItems(
                    row = 0,
                    items = segmentList)
            else:
                self.segmentListWidget.clear()


    def _addGroupBoxes( self ):
        """
        Add the DNA Property Manager group boxes.
        """
        #Unused 'References List Box' to be revided. (just commented out for the
        #time being.
        ##self._pmGroupBox1 = PM_GroupBox( self, title = "Reference Plane" )
        ##self._loadGroupBox1( self._pmGroupBox1 )

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

        self._pmGroupBox3 = PM_GroupBox( self, title = "Segments" )
        self._loadGroupBox3( self._pmGroupBox3 )

        self._loadBaseNumberLabelGroupBox(self)


    def _loadGroupBox1(self, pmGroupBox):
        """
        load widgets in groupbox1
        """
        self.referencePlaneListWidget = PM_SelectionListWidget(
            pmGroupBox,
            self.win,
            label = "",
            color = pmReferencesListWidgetColor,
            heightByRows = 2)

    def _loadGroupBox2(self, pmGroupBox):
        """
        load widgets in groupbox2
        """

        self.strandListWidget = PM_SelectionListWidget(pmGroupBox,
                                                       self.win,
                                                       label = "",
                                                       heightByRows = 9 )
        self.strandListWidget.setTagInstruction('PICK_ITEM_IN_GLPANE')

        self.editStrandPropertiesButton = PM_PushButton(
            pmGroupBox,
            label = "",
            text  = "Edit Properties..." )
        self.editStrandPropertiesButton.setEnabled(False)

    def _loadGroupBox3(self, pmGroupBox):
        """
        load widgets in groupbox3
        """

        self.segmentListWidget = PM_SelectionListWidget(pmGroupBox,
                                                       self.win,
                                                       label = "",
                                                       heightByRows = 4 )
        self.segmentListWidget.setObjectName('Segment_list_widget')
        self.segmentListWidget.setTagInstruction('PICK_ITEM_IN_GLPANE')


        self.editSegmentPropertiesButton = PM_PushButton(
            pmGroupBox,
            label = "",
            text  = "Edit Properties..." )
        self.editSegmentPropertiesButton.setEnabled(False)

        self.searchForCrossoversButton = PM_PushButton(
            pmGroupBox,
            label = "",
            text  = "Search For Crossovers..." )
        self.searchForCrossoversButton.setEnabled(False)


    def _loadBaseNumberLabelGroupBox(self, pmGroupBox):
        """
        """
        self._baseNumberLabelGroupBox = PM_DnaBaseNumberLabelsGroupBox(pmGroupBox,
                                                                       self.command)

    def _addWhatsThisText( self ):
        """
        What's This text for widgets in the DNA Property Manager.
        """
        pass

    def _addToolTipText(self):
        """
        Tool Tip text for widgets in the DNA Property Manager.
        """
        pass
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:101,代碼來源:BuildDna_PropertyManager.py

示例12: CompareProteins_PropertyManager


#.........這裏部分代碼省略.........
        """
        pass

    def _addToolTipText(self):
        """
        Tool Tip text for widgets in this Property Manager.
        """
        pass

    def _loadGroupBox1(self, pmGroupBox):
        """
        Load widgets in group box.
        """

        self.structure1LineEdit = PM_LineEdit(pmGroupBox, label="First structure:", setAsDefault=False)
        self.structure1LineEdit.setEnabled(False)

        self.structure2LineEdit = PM_LineEdit(pmGroupBox, label="Second structure:", setAsDefault=False)
        self.structure2LineEdit.setEnabled(False)

        self.thresholdDoubleSpinBox = PM_DoubleSpinBox(
            pmGroupBox,
            label="Threshold:",
            value=self.threshold,
            setAsDefault=True,
            minimum=0.0,
            maximum=360.0,
            decimals=1,
            singleStep=30.0,
            suffix=" deg",
            spanWidth=False,
        )

        self.comparePushButton = PM_PushButton(pmGroupBox, text="Compare", setAsDefault=True)

        self.hidePushButton = PM_PushButton(pmGroupBox, text="Hide differences", setAsDefault=True)
        return

    def _compareProteins(self):
        """
        Slot for Compare button.

        Compares two selected proteins of the same length.
        Amino acids that differ greater than the "threshold"
        value are displayed in two colors (red for the first protein
        and yellow for the second protein) and are only visible when
        the two proteins are displayed in the
        reduced display style.
        """
        from utilities.constants import red, orange, green, cyan

        if not self.proteinChunk1 or not self.proteinChunk2:
            return

        protein_1 = self.proteinChunk1.protein
        protein_2 = self.proteinChunk2.protein

        if protein_1 and protein_2:
            aa_list_1 = protein_1.get_amino_acids()
            aa_list_2 = protein_2.get_amino_acids()
            protein_1.collapse_all_rotamers()
            protein_2.collapse_all_rotamers()
            if len(aa_list_1) == len(aa_list_2):
                for aa1, aa2 in zip(aa_list_1, aa_list_2):
                    aa1.color = None
                    aa2.color = None
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:67,代碼來源:CompareProteins_PropertyManager.py

示例13: OrderDna_PropertyManager

class OrderDna_PropertyManager(Command_PropertyManager):
    """
    The OrderDna_PropertyManager class provides a Property Manager 
    for the B{Order Dna} command on the flyout toolbar in the 
    Build > Dna mode. 

    @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         =  "Order DNA"
    pmName        =  title
    iconPath      =  "ui/actions/Command Toolbar/BuildDna/OrderDna.png"
    
    def __init__( self, command ):
        """
        Constructor for the property manager.
        """
        
        _superclass.__init__(self, command)
        
        self.assy = self.win.assy

        self.showTopRowButtons( PM_DONE_BUTTON | \
                                PM_WHATS_THIS_BUTTON)
        
        self.update_includeStrands() # Updates the message box.
        return
        
        
    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.viewDnaOrderFileButton,
                        SIGNAL("clicked()"), 
                        self.viewDnaOrderFile)
        
        change_connect( self.includeStrandsComboBox,
                      SIGNAL("activated(int)"),
                      self.update_includeStrands )
        return
       
    def _addGroupBoxes( self ):
        """
        Add the Property Manager group boxes.
        """        
        self._pmGroupBox1 = PM_GroupBox( self, title = "Options" )
        self._loadGroupBox1( self._pmGroupBox1 )
    
    def _loadGroupBox1(self, pmGroupBox):
        """
        Load widgets in group box.
        """
        
        includeStrandsChoices = ["All strands in model",
                                 "Selected strands only"]
        
        self.includeStrandsComboBox  = \
            PM_ComboBox( pmGroupBox,
                         label         =  "Include strands:", 
                         choices       =  includeStrandsChoices,
                         setAsDefault  =  True)
        
        self.numberOfBasesLineEdit  = \
            PM_LineEdit( pmGroupBox,
                         label  =  "Total nucleotides:",
                         text   = str(self.getNumberOfBases()))
        self.numberOfBasesLineEdit.setEnabled(False)
        
        self.numberOfXBasesLineEdit  = \
            PM_LineEdit( pmGroupBox,
                         label  =  "Unassigned:",
                         text   = str(self.getNumberOfBases(unassignedOnly = True)))
        self.numberOfXBasesLineEdit.setEnabled(False)
        
        self.viewDnaOrderFileButton = \
            PM_PushButton( pmGroupBox,
                           label     = "",
                           text      = "View DNA Order File...",
                           spanWidth = True)
        return
    
#.........這裏部分代碼省略.........
開發者ID:elfion,項目名稱:nanoengineer,代碼行數:101,代碼來源:OrderDna_PropertyManager.py

示例14: Ui_BuildCrystal_PropertyManager


#.........這裏部分代碼省略.........
                         "", "+", 0 ),

                        ( "QToolButton", 1,  "Clockwise",
                          "ui/actions/Properties Manager/rotate_plus.png",
                          "", "-", 1 )
                        ]

        self.gridRotateButtonRow = \
            PM_ToolButtonRow( inPmGroupBox,
                              title        = "",
                              buttonList   = GRID_ANGLE_BUTTONS,
                              label        = 'Rotate grid:',
                              isAutoRaise  =  False,
                              isCheckable  =  False
                            )
        self.rotGridAntiClockwiseButton = \
            self.gridRotateButtonRow.getButtonById(0)
        self.rotGridClockwiseButton = \
            self.gridRotateButtonRow.getButtonById(1)

    def _loadLayerPropertiesGroupBox(self, inPmGroupBox):
        """
        Load widgets in the Layer Properties group box.
        @param inPmGroupBox: The Layer Properties groupbox in the PM
        @type  inPmGroupBox: L{PM_GroupBox}
        """

        self.currentLayerComboBox = \
            PM_ComboBox( inPmGroupBox,
                         index     = 0,
                         spanWidth = True
                        )

        self.addLayerButton = PM_PushButton(inPmGroupBox)
        self.addLayerButton.setIcon(
            geticon('ui/actions/Properties Manager/addlayer.png'))
        self.addLayerButton.setFixedSize(QSize(26, 26))
        self.addLayerButton.setIconSize(QSize(22, 22))

        # A widget list to create a widget row.
        # Format:
        # - Widget type,
        # - widget object,
        # - column

        firstRowWidgetList = [('PM_ComboBox', self.currentLayerComboBox, 1),
                              ('PM_PushButton', self.addLayerButton, 2)
                              ]

        widgetRow = PM_WidgetRow(inPmGroupBox,
                                 title     = '',
                                 widgetList = firstRowWidgetList,
                                 label = "Layer:",
                                 labelColumn  = 0,
                                 )

        self.layerCellsSpinBox = \
             PM_SpinBox( inPmGroupBox,
                        label         =  "Lattice cells:",
                        labelColumn   =  0,
                        value         =  2,
                        minimum       =  1,
                        maximum       =  25
                      )

        self.layerThicknessLineEdit = PM_LineEdit(inPmGroupBox,
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:67,代碼來源:Ui_BuildCrystal_PropertyManager.py

示例15: Ui_ProteinSequenceEditor


#.........這裏部分代碼省略.........
        self.saveSequenceButton.hide()

        #Find and replace widgets --
        self.findLineEdit = \
            PM_LineEdit( self,
                         label        = "",
                         spanWidth    = False)
        self.findLineEdit.setMaximumWidth(60)

        self.replaceLineEdit = \
            PM_LineEdit( self,
                         label        = "  Replace:",
                         spanWidth    = False)
        self.replaceLineEdit.setMaximumWidth(60)

        self.findOptionsToolButton = PM_ToolButton(self)
        self.findOptionsToolButton.setMaximumWidth(12)
        self.findOptionsToolButton.setAutoRaise(True)

        self.findOptionsToolButton.setPopupMode(QToolButton.MenuButtonPopup)

        self._setFindOptionsToolButtonMenu()

        self.findNextToolButton = PM_ToolButton(
            self,
            iconPath = "ui/actions/Properties Manager/Find_Next.png")
        self.findNextToolButton.setAutoRaise(True)

        self.findPreviousToolButton = PM_ToolButton(
            self,
            iconPath = "ui/actions/Properties Manager/Find_Previous.png")
        self.findPreviousToolButton.setAutoRaise(True)

        self.replacePushButton = PM_PushButton(self, text = "Replace")

        # Hide Replace widgets until we add support for transmuting residues.
        # Mark 2008-12-19
        #self.replaceLabel.hide()
        self.replacePushButton.hide()
        self.replaceLineEdit.hide()

        self.warningSign = QLabel(self)
        self.warningSign.setPixmap(
            getpixmap('ui/actions/Properties Manager/Warning.png'))
        self.warningSign.hide()

        self.phraseNotFoundLabel = QLabel(self)
        self.phraseNotFoundLabel.setText("Sequence Not Found")
        self.phraseNotFoundLabel.hide()

        #Widgets to include in the widget row.
        widgetList = [('PM_ToolButton', self.loadSequenceButton, 0),
                      ('PM_ToolButton', self.saveSequenceButton, 1),
                      ('QLabel', "                                     Find:", 4),
                      ('PM_LineEdit',   self.findLineEdit, 5),
                      ('PM_ToolButton', self.findOptionsToolButton, 6),
                      ('PM_ToolButton', self.findPreviousToolButton, 7),
                      ('PM_ToolButton', self.findNextToolButton, 8),
                      #('PM_Label',      self.replaceLabel, 9),
                      ('PM_TextEdit',   self.replaceLineEdit, 9),
                      ('PM_PushButton', self.replacePushButton, 10),
                      ('PM_Label', self.warningSign, 11),
                      ('PM_Label', self.phraseNotFoundLabel, 12),
                      ('QSpacerItem', 5, 5, 13) ]

        widgetRow = PM_WidgetRow(self,
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:67,代碼來源:Ui_ProteinSequenceEditor.py


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