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


Python Settings.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import __init__ [as 别名]
    def __init__(self, **args):
        """Create the default settings."""
        Settings.__init__(self, 'StyleSheet', setnsmode='stylesheet', **args)
        self.pixmap = 'settings_stylesheet'

        for subset in self.registeredsettings:
            self.add( subset() )
开发者ID:JoonyLi,项目名称:veusz,代码行数:9,代码来源:stylesheet.py

示例2: __init__

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import __init__ [as 别名]
    def __init__(self, name, **args):
        Settings.__init__(self, name, **args)

        self.add( setting.Color(
                'color', 'black',
                descr = _('Fill colour'),
                usertext=_('Color')) )
        self.add( setting.FillStyleExtended(
                'style', 'solid',
                descr = _('Fill style'),
                usertext=_('Style')) )

        self.add( setting.Bool(
                'hide', False,
                descr = _('Hide the fill'),
                usertext=_('Hide')) )

        self.add( setting.Int(
                'transparency', 0,
                descr = _('Transparency percentage'),
                usertext = _('Transparency'),
                minval = 0,
                maxval = 100 ) )
        self.add( setting.DistancePt(
                'linewidth', '0.5pt',
                descr = _('Width of hatch or pattern line'),
                usertext=_('Line width')) )
        self.add( setting.LineStyle(
                'linestyle', 'solid',
                descr = _('Hatch or pattern line style'),
                usertext=_('Line style')) )
        self.add( setting.DistancePt(
                'patternspacing', '5pt',
                descr = _('Hatch or pattern spacing'),
                usertext = _('Spacing')) )
        self.add( setting.Color(
                'backcolor', 'white',
                descr = _('Hatch or pattern background color'),
                usertext = _('Back color') ) )
        self.add( setting.Int(
                'backtransparency', 0,
                descr = _('Hatch or pattern background transparency percentage'),
                usertext = _('Back trans.'),
                minval = 0,
                maxval = 100 ) )
        self.add( setting.Bool(
                'backhide', True,
                descr = _('Hide hatch or pattern background'),
                usertext=_('Back hide')) )
开发者ID:JoonyLi,项目名称:veusz,代码行数:51,代码来源:collections.py

示例3: __init__

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import __init__ [as 别名]
    def __init__(self, name, **args):
        Settings.__init__(self, name, **args)

        self.add( setting.Color( 'color', 'black',
                                 descr = 'Fill colour',
                                 usertext='Color') )
        self.add( setting.FillStyle( 'style', 'solid',
                                     descr = 'Fill style',
                                     usertext='Style') )
        self.add( setting.Int( 'transparency', 0,
                               descr = 'Transparency percentage',
                               usertext = 'Transparency',
                               minval = 0,
                               maxval = 100 ) )
        self.add( setting.Bool( 'hide', False,
                                descr = 'Hide the fill',
                                usertext='Hide') )
开发者ID:asirinelli,项目名称:veusz,代码行数:19,代码来源:collections.py

示例4: __init__

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import __init__ [as 别名]
 def __init__(self, name):
     Settings.__init__(self, name, setnsmode='groupedsetting')
     self.add( setting.DatasetOrFloatList(
             'points', '',
             descr = _('Use color value (0-1) in dataset to paint points'),
             usertext=_('Color markers')), 7 )
     self.add( setting.Float(
             'min', 0.,
             descr = _('Minimum value of color dataset'),
             usertext = _('Min val') ))
     self.add( setting.Float(
             'max', 1.,
             descr = _('Maximum value of color dataset'),
             usertext = _('Max val') ))
     self.add( setting.Choice(
             'scaling',
             ['linear', 'sqrt', 'log', 'squared'],
             'linear',
             descr = _('Scaling to transform numbers to color'),
             usertext=_('Scaling')))
开发者ID:shainline,项目名称:veusz,代码行数:22,代码来源:collections.py

示例5: __init__

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import __init__ [as 别名]
 def __init__(self):
     default_path = os.path.join(os.path.dirname(__file__), 'settings.cfg')
     user_path = initialize_settings('ride', default_path)
     Settings.__init__(self, user_path)
     self._settings_dir = os.path.dirname(user_path)
     self.set('install root', os.path.dirname(os.path.dirname(__file__)))
开发者ID:IlfirinPL,项目名称:RIDE,代码行数:8,代码来源:__init__.py


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