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


Python PM_ToolButton.setToolButtonStyle方法代碼示例

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


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

示例1: _loadMovieFilesGroupBox

# 需要導入模塊: from PM.PM_ToolButton import PM_ToolButton [as 別名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 別名]
 def _loadMovieFilesGroupBox(self, inPmGroupBox):
     """
     Load widgets in the Open/Save Movie Files group box.
     @param inPmGroupBox: The Open/Save Movie Files groupbox in the PM
     @type  inPmGroupBox: L{PM_GroupBox} 
     """
     
     for action in self.fileOpenMovieAction, self.fileSaveMovieAction:
         btn = PM_ToolButton(inPmGroupBox,
                             text = str(action.text()),
                             spanWidth = True)
         btn.setDefaultAction(action)
         btn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:15,代碼來源:Ui_MoviePropertyManager.py

示例2: Ui_MovePropertyManager

# 需要導入模塊: from PM.PM_ToolButton import PM_ToolButton [as 別名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 別名]

#.........這裏部分代碼省略.........
              "ui/actions/Properties Manager/TranslateY.png", "", "Y", 2),
            ( "QToolButton", 4,  "TRANSZ",  
              "ui/actions/Properties Manager/TranslateZ.png", "", "Z", 3),
            ( "QToolButton", 5,  "ROT_TRANS_ALONG_AXIS",  
              "ui/actions/Properties Manager/translate+rotate-A.png", "", \
              "A", 4)
                        
            ]
            
        self.freeDragTranslateButtonGroup = \
            PM_ToolButtonRow( inPmGroupBox, 
                               title        = "",
                               buttonList   = BUTTON_LIST,
                               checkedId    = 1,
                               setAsDefault = True,
                               )
        self.transFreeButton =self.freeDragTranslateButtonGroup.getButtonById(1)
        self.transXButton = self.freeDragTranslateButtonGroup.getButtonById(2)
        self.transYButton = self.freeDragTranslateButtonGroup.getButtonById(3)
        self.transZButton = self.freeDragTranslateButtonGroup.getButtonById(4)
        self.transAlongAxisButton = \
            self.freeDragTranslateButtonGroup.getButtonById(5)
        
        self.moveFromToButton = PM_ToolButton(
                    inPmGroupBox, 
                    text = "Translate from/to",
                    iconPath  = "ui/actions/Properties Manager"\
                    "/Translate_Components.png",
                    spanWidth = True
                    
                    )
        self.moveFromToButton.setCheckable(True)
        self.moveFromToButton.setAutoRaise(True)
        self.moveFromToButton.setToolButtonStyle(
            Qt.ToolButtonTextBesideIcon)
        
        
        self.startCoordLineEdit = PM_LineEdit( 
            inPmGroupBox, 
            label        = "ui/actions/Properties Manager"\
                    "/Move_Start_Point.png",
            text         = "Define 'from' and 'to' points",
            setAsDefault = False,
            )
        self.startCoordLineEdit.setReadOnly(True)
        self.startCoordLineEdit.setEnabled(False)
        
    def _loadByDeltaGroupBox(self, inPmGroupBox):
        """
        Load widgets in the translate By Delta group box, which is present 
        within the Translate groupbox.
        @param inPmGroupBox: The Translate By Delta group box in the translate 
                             group box. 
        @type  inPmGroupBox: L{PM_GroupBox}
        """

        self.moveDeltaXSpinBox = \
            PM_DoubleSpinBox( 
                inPmGroupBox, 
                label        = "ui/actions/Properties Manager/Delta_X.png",
                value        = 0.0, 
                setAsDefault = True,
                minimum      = -100.0, 
                maximum      =  100.0, 
                singleStep   = 1.0, 
                decimals     = 3, 
開發者ID:elfion,項目名稱:nanoengineer,代碼行數:70,代碼來源:Ui_MovePropertyManager.py

示例3: QuteMolPropertyManager

# 需要導入模塊: from PM.PM_ToolButton import PM_ToolButton [as 別名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 別名]
class QuteMolPropertyManager(Command_PropertyManager):
    """
    The QuteMolPropertyManager class provides a Property Manager for
    QuteMolX, allowing its launch for external rendering of the model.
    """

    # The title that appears in the Property Manager header.
    title = "QuteMolX"
    # The name of this Property Manager. This will be set to
    # the name of the PM_Dialog object via setObjectName().
    pmName = title
    # The relative path to the PNG file that appears in the header
    iconPath = "ui/actions/Properties Manager/QuteMol.png"

    # DNA Display choices.
    _axes_display_choices = [ "Render axes",
                              "Hide axes" ]

    _bases_display_choices = [ "Render bases",
                               "Hide bases" ]
                               #"Color bases black",
                               #"Color bases by type" ]

    # PDB exclude flags = _axesFlags | _basesFlags
    _axesFlags  = EXCLUDE_HIDDEN_ATOMS
    _basesFlags = EXCLUDE_HIDDEN_ATOMS

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

        _superclass.__init__(self, command)

        self.showTopRowButtons( PM_DONE_BUTTON | \
                                PM_WHATS_THIS_BUTTON)

        msg = "Select a QuteMolX rendering style and click the "\
        "<b>Launch QuteMolX</b> button when ready."

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

    def _addGroupBoxes(self):
        """
        Add the 1st group box to the Property Manager.
        """
        self.pmGroupBox1 = PM_GroupBox(self, title = "DNA Display Options")
        self._loadGroupBox1(self.pmGroupBox1)

        self.pmGroupBox2 = PM_GroupBox(self, title = "Launch")
        self._loadGroupBox2(self.pmGroupBox2)

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

        @param pmGroupBox: The 1st group box in the PM.
        @type  pmGroupBox: L{PM_GroupBox}
        """

        self.axesCombobox = PM_ComboBox(
            pmGroupBox,
            label        = 'Axes: ',
            choices      = self._axes_display_choices,
            index        = 0,
            setAsDefault = True,
            spanWidth    = False )

        self.basesCombobox = PM_ComboBox(
            pmGroupBox,
            label        = 'Bases: ',
            choices      = self._bases_display_choices,
            index        = 0,
            setAsDefault = True,
            spanWidth    = False )

    def _loadGroupBox2(self, pmGroupBox):
        """
        Load widgets in 2nd group box.

        @param pmGroupBox: The 1st group box in the PM.
        @type  pmGroupBox: L{PM_GroupBox}
        """

        self.launchQuteMolButton = PM_ToolButton(
            pmGroupBox,
            text      = "Launch QuteMolX",
            iconPath  = "ui/actions/Properties Manager/QuteMol.png",
            spanWidth = True )

        self.launchQuteMolButton.setToolButtonStyle(
            Qt.ToolButtonTextBesideIcon)

    def _addWhatsThisText(self):
        """
        "What's This" text for widgets in this Property Manager.
        """
        from ne1_ui.WhatsThisText_for_PropertyManagers import whatsThis_QuteMolPropertyManager
        whatsThis_QuteMolPropertyManager(self)
#.........這裏部分代碼省略.........
開發者ID:alaindomissy,項目名稱:nanoengineer,代碼行數:103,代碼來源:QuteMolPropertyManager.py

示例4: QuteMolPropertyManager

# 需要導入模塊: from PM.PM_ToolButton import PM_ToolButton [as 別名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 別名]
class QuteMolPropertyManager(PM_Dialog):
    """
    The QuteMolPropertyManager class provides a Property Manager for 
    QuteMolX, allowing its launch for external rendering of the model.
    """
    
    # The title that appears in the Property Manager header.
    title = "QuteMolX"
    # The name of this Property Manager. This will be set to
    # the name of the PM_Dialog object via setObjectName().
    pmName = title
    # The relative path to the PNG file that appears in the header
    iconPath = "ui/actions/Properties Manager/QuteMol.png"
    
    # DNA Display choices.
    _axes_display_choices = [ "Render axes", 
                              "Hide axes" ]
    
    _bases_display_choices = [ "Render bases", 
                               "Hide bases" ]
                               #"Color bases black",
                               #"Color bases by type" ]
                       
    # PDB exclude flags = _axesFlags | _basesFlags
    _axesFlags  = EXCLUDE_HIDDEN_ATOMS
    _basesFlags = EXCLUDE_HIDDEN_ATOMS
    
    def __init__(self, win):
        """
        Construct the QuteMolX Property Manager.
        
        @param win: The main window.
        @type  win: QMainWindow
        """
        self.win = win
        self.pw  = None
        
        PM_Dialog.__init__( self, self.pmName, self.iconPath, self.title )
        
        msg = "Select a QuteMolX rendering style and click the \
        <b>Launch QuteMolX</b> button when ready."
        
        # This causes the "Message" box to be displayed as well.
        self.updateMessage(msg)
        
        # Hide Preview and Restore defaults button for Alpha9.
        self.hideTopRowButtons(PM_RESTORE_DEFAULTS_BUTTON | PM_PREVIEW_BUTTON)

    def _addGroupBoxes(self):
        """
        Add the 1st group box to the Property Manager.
        """
        self.pmGroupBox1 = PM_GroupBox(self, title = "DNA Display Options")
        self._loadGroupBox1(self.pmGroupBox1)
        
        self.pmGroupBox2 = PM_GroupBox(self, title = "Launch")
        self._loadGroupBox2(self.pmGroupBox2)
        
    def _loadGroupBox1(self, pmGroupBox):
        """
        Load widgets in 1st group box.
        
        @param pmGroupBox: The 1st group box in the PM.
        @type  pmGroupBox: L{PM_GroupBox}
        """
        
        self.axesCombobox = PM_ComboBox( 
            pmGroupBox,
            label        = 'Axes: ', 
            choices      = self._axes_display_choices, 
            index        = 0, 
            setAsDefault = True,
            spanWidth    = False )
        
        self.basesCombobox = PM_ComboBox( 
            pmGroupBox,
            label        = 'Bases: ', 
            choices      = self._bases_display_choices, 
            index        = 0, 
            setAsDefault = True,
            spanWidth    = False )
        
    def _loadGroupBox2(self, pmGroupBox):
        """
        Load widgets in 2nd group box.
        
        @param pmGroupBox: The 1st group box in the PM.
        @type  pmGroupBox: L{PM_GroupBox}
        """
        
        self.launchQuteMolButton = PM_ToolButton(
            pmGroupBox, 
            text      = "Launch QuteMolX",
            iconPath  = "ui/actions/Properties Manager/QuteMol.png",
            spanWidth = True )           

        self.launchQuteMolButton.setToolButtonStyle(
            Qt.ToolButtonTextBesideIcon)
        
    def _addWhatsThisText(self):
#.........這裏部分代碼省略.........
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:103,代碼來源:QuteMolPropertyManager.py

示例5: InsertNanotube_PropertyManager

# 需要導入模塊: from PM.PM_ToolButton import PM_ToolButton [as 別名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 別名]

#.........這裏部分代碼省略.........
        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.

    def _loadGroupBox1(self, pmGroupBox):
        """
        Load widgets in group box 1.
        """
        #Following toolbutton facilitates entering a temporary NanotubeLineMode
        #to create a CNT using endpoints of the specified line.
        self.specifyCntLineButton = PM_ToolButton(
            pmGroupBox,
            text = "Specify Endpoints",
            iconPath  = "ui/actions/Properties Manager/Pencil.png",
            spanWidth = True
        )
        self.specifyCntLineButton.setCheckable(True)
        self.specifyCntLineButton.setAutoRaise(True)
        self.specifyCntLineButton.setToolButtonStyle(
            Qt.ToolButtonTextBesideIcon)

        #EndPoint1 and endPoint2 coordinates. These widgets are hidden
        # as of 2007- 12 - 05
        self._endPoint1SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
                                                label = "End Point 1")
        self.x1SpinBox = self._endPoint1SpinBoxes.xSpinBox
        self.y1SpinBox = self._endPoint1SpinBoxes.ySpinBox
        self.z1SpinBox = self._endPoint1SpinBoxes.zSpinBox

        self._endPoint2SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
                                                label = "End Point 2")
        self.x2SpinBox = self._endPoint2SpinBoxes.xSpinBox
        self.y2SpinBox = self._endPoint2SpinBoxes.ySpinBox
        self.z2SpinBox = self._endPoint2SpinBoxes.zSpinBox

        self._endPoint1SpinBoxes.hide()
        self._endPoint2SpinBoxes.hide()

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

        _ntTypeChoices = ['Carbon',
                          'Boron Nitride']
        self.ntTypeComboBox  = \
            PM_ComboBox( pmGroupBox,
                         label         =  "Type:",
                         choices       =  _ntTypeChoices,
                         setAsDefault  =  True)
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:69,代碼來源:InsertNanotube_PropertyManager.py

示例6: DnaDuplexPropertyManager

# 需要導入模塊: from PM.PM_ToolButton import PM_ToolButton [as 別名]
# 或者: from PM.PM_ToolButton.PM_ToolButton import setToolButtonStyle [as 別名]

#.........這裏部分代碼省略.........
        Add the DNA Property Manager group boxes.
        """
        self._pmReferencePlaneGroupBox = PM_GroupBox( self,
                                                      title = "Placement Options" )
        self._loadReferencePlaneGroupBox( self._pmReferencePlaneGroupBox )

        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 )


    def _loadGroupBox1(self, pmGroupBox):
        """
        Load widgets in group box 3.
        """
        #Folllowing toolbutton facilitates entering a temporary DnaLineMode
        #to create a DNA using endpoints of the specified line.
        self.specifyDnaLineButton = PM_ToolButton(
            pmGroupBox,
            text = "Specify Endpoints",
            iconPath  = "ui/actions/Properties Manager/Pencil.png",
            spanWidth = True
        )
        self.specifyDnaLineButton.setCheckable(True)
        self.specifyDnaLineButton.setAutoRaise(True)
        self.specifyDnaLineButton.setToolButtonStyle(
            Qt.ToolButtonTextBesideIcon)

        #EndPoint1 and endPoint2 coordinates. These widgets are hidden
        # as of 2007- 12 - 05
        self._endPoint1SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
                                                          label = "End Point 1")
        self.x1SpinBox = self._endPoint1SpinBoxes.xSpinBox
        self.y1SpinBox = self._endPoint1SpinBoxes.ySpinBox
        self.z1SpinBox = self._endPoint1SpinBoxes.zSpinBox

        self._endPoint2SpinBoxes = PM_CoordinateSpinBoxes(pmGroupBox,
                                                          label = "End Point 2")
        self.x2SpinBox = self._endPoint2SpinBoxes.xSpinBox
        self.y2SpinBox = self._endPoint2SpinBoxes.ySpinBox
        self.z2SpinBox = self._endPoint2SpinBoxes.zSpinBox

        self._endPoint1SpinBoxes.hide()
        self._endPoint2SpinBoxes.hide()

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

        self.conformationComboBox  = \
            PM_ComboBox( pmGroupBox,
                         label         =  "Conformation:",
                         choices       =  ["B-DNA"],
                         setAsDefault  =  True)

        dnaModelChoices = ['PAM3', 'PAM5']
        self.dnaModelComboBox = \
開發者ID:ematvey,項目名稱:NanoEngineer-1,代碼行數:70,代碼來源:DnaDuplexPropertyManager.py


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