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


Python PM_SpinBox.setSpecialValueText方法代码示例

本文整理汇总了Python中PM.PM_SpinBox.PM_SpinBox.setSpecialValueText方法的典型用法代码示例。如果您正苦于以下问题:Python PM_SpinBox.setSpecialValueText方法的具体用法?Python PM_SpinBox.setSpecialValueText怎么用?Python PM_SpinBox.setSpecialValueText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PM.PM_SpinBox.PM_SpinBox的用法示例。


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

示例1: NanotubeGeneratorPropertyManager

# 需要导入模块: from PM.PM_SpinBox import PM_SpinBox [as 别名]
# 或者: from PM.PM_SpinBox.PM_SpinBox import setSpecialValueText [as 别名]

#.........这里部分代码省略.........
        self.twistSpinBox = \
            PM_SpinBox( inPmGroupBox, 
                        label        = "Twist :", 
                        value        = 0, 
                        setAsDefault = True,
                        minimum      = 0, 
                        maximum      = 100, # What should maximum be?
                        suffix       = " deg/A" )
        
        self.bendSpinBox = \
            PM_SpinBox( inPmGroupBox, 
                        label        = "Bend :", 
                        value        = 0, 
                        setAsDefault = True,
                        minimum      = 0, 
                        maximum      = 360,
                        suffix       = " deg" )
    
    def _loadGroupBox3(self, inPmGroupBox):
        """
        Load widgets in group box 3.
        """
        
        # "Number of Nanotubes" SpinBox
        self.mwntCountSpinBox = \
            PM_SpinBox( inPmGroupBox, 
                        label        = "Number :", 
                        value        = 1, 
                        setAsDefault = True,
                        minimum      = 1, 
                        maximum      = 10,
                        suffix       = " nanotubes" )
        
        self.mwntCountSpinBox.setSpecialValueText("SWNT")
            
        # "Spacing" lineedit.
        self.mwntSpacingField = \
            PM_DoubleSpinBox( inPmGroupBox,
                              label        = "Spacing :", 
                              value        = 2.46, 
                              setAsDefault = True,
                              minimum      = 1.0, 
                              maximum      = 10.0, 
                              singleStep   = 0.1, 
                              decimals     = 3, 
                              suffix       = " Angstroms" )
    
    def _addWhatsThisText(self):
        """
        What's This text for widgets in this Property Manager.  
        """
        from ne1_ui.WhatsThisText_for_PropertyManagers import whatsThis_NanotubeGeneratorPropertyManager
        whatsThis_NanotubeGeneratorPropertyManager(self)
        
    def _addToolTipText(self):
        """
        Tool Tip text for widgets in this Property Manager.  
        """
        from ne1_ui.ToolTipText_for_PropertyManagers import ToolTip_NanotubeGeneratorPropertyManager
        ToolTip_NanotubeGeneratorPropertyManager(self)
        
    def chirality_fixup(self, spinBoxValueJunk = None):
        """
        Slot for several validators for different parameters.
        This gets called each time a user types anything into a widget or 
        changes a spinbox.
开发者ID:,项目名称:,代码行数:70,代码来源:

示例2: InsertNanotube_PropertyManager

# 需要导入模块: from PM.PM_SpinBox import PM_SpinBox [as 别名]
# 或者: from PM.PM_SpinBox.PM_SpinBox import setSpecialValueText [as 别名]

#.........这里部分代码省略.........
        self.twistSpinBox = \
            PM_SpinBox( inPmGroupBox,
                        label        = "Twist:",
                        value        = 0,
                        setAsDefault = True,
                        minimum      = 0,
                        maximum      = 100, # What should maximum be?
                        suffix       = " deg/A" )

        self.bendSpinBox = \
            PM_SpinBox( inPmGroupBox,
                        label        = "Bend:",
                        value        = 0,
                        setAsDefault = True,
                        minimum      = 0,
                        maximum      = 360,
                        suffix       = " deg" )

    def _loadGroupBox4(self, inPmGroupBox):
        """
        Load widgets in group box 4.
        """

        # "Number of Nanotubes" SpinBox
        self.mwntCountSpinBox = \
            PM_SpinBox( inPmGroupBox,
                        label        = "Number:",
                        value        = 1,
                        setAsDefault = True,
                        minimum      = 1,
                        maximum      = 10,
                        suffix       = " nanotubes" )

        self.mwntCountSpinBox.setSpecialValueText("SWNT")

        # "Spacing" lineedit.
        self.mwntSpacingDoubleSpinBox = \
            PM_DoubleSpinBox( inPmGroupBox,
                              label        = "Spacing:",
                              value        = 2.46,
                              setAsDefault = True,
                              minimum      = 1.0,
                              maximum      = 10.0,
                              singleStep   = 0.1,
                              decimals     = 3,
                              suffix       = " Angstroms" )

    def _loadGroupBox5(self, pmGroupBox):
        """
        Load widgets in group box 5.
        """
        self._rubberbandLineGroupBox = PM_GroupBox(
            pmGroupBox,
            title = 'Rubber band Line:')

        ntLineChoices = ['Ladder']
        self.ntRubberBandLineDisplayComboBox = \
            PM_ComboBox( self._rubberbandLineGroupBox ,
                         label         =  " Display as:",
                         choices       =  ntLineChoices,
                         setAsDefault  =  True)

        self.lineSnapCheckBox = \
            PM_CheckBox(self._rubberbandLineGroupBox ,
                        text         = 'Enable line snap' ,
                        widgetColumn = 1,
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:70,代码来源:InsertNanotube_PropertyManager.py


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