本文整理汇总了Python中outwiker.gui.stcstyle.StcStyle.parse方法的典型用法代码示例。如果您正苦于以下问题:Python StcStyle.parse方法的具体用法?Python StcStyle.parse怎么用?Python StcStyle.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类outwiker.gui.stcstyle.StcStyle
的用法示例。
在下文中一共展示了StcStyle.parse方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testParse_14
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_14 (self):
style = StcStyle.parse (u"back:#222222,bold,,,underline")
self.assertEqual (style.bold, True)
self.assertEqual (style.italic, False)
self.assertEqual (style.underline, True)
self.assertEqual (style.fore, u"#000000")
self.assertEqual (style.back, u"#222222")
示例2: testParse_03
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_03 (self):
style = StcStyle.parse (u"fore:#000000,bold")
self.assertEqual (style.bold, True)
self.assertEqual (style.italic, False)
self.assertEqual (style.underline, False)
self.assertEqual (style.fore, u"#000000")
self.assertEqual (style.back, u"#FFFFFF")
示例3: testParse_12
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_12 (self):
style = StcStyle.parse (u"fore:#AAAAAA,back:#222222,bold,underline")
self.assertEqual (style.bold, True)
self.assertEqual (style.italic, False)
self.assertEqual (style.underline, True)
self.assertEqual (style.fore, u"#AAAAAA")
self.assertEqual (style.back, u"#222222")
示例4: testParse_05
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_05 (self):
style = StcStyle.parse (u"FORE:#AAAAAA")
self.assertEqual (style.bold, False)
self.assertEqual (style.italic, False)
self.assertEqual (style.underline, False)
self.assertEqual (style.fore, u"#AAAAAA")
self.assertEqual (style.back, u"#FFFFFF")
示例5: testParse_04
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_04(self):
style = StcStyle.parse("fore:#AAAAAA")
self.assertEqual(style.bold, False)
self.assertEqual(style.italic, False)
self.assertEqual(style.underline, False)
self.assertEqual(style.fore, "#AAAAAA")
self.assertEqual(style.back, "#FFFFFF")
示例6: testParse_11
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_11(self):
style = StcStyle.parse(" fore:#AAAAAA , back:#222222 , bold,italic , underline ")
self.assertEqual(style.bold, True)
self.assertEqual(style.italic, True)
self.assertEqual(style.underline, True)
self.assertEqual(style.fore, "#AAAAAA")
self.assertEqual(style.back, "#222222")
示例7: _loadValue
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def _loadValue(self):
"""
Получить значение. В производных классах этот метод переопределяется
"""
style = StcStyle.parse(self.config.get(self.section, self.param))
if style is None:
raise ValueError
return style
示例8: testParse_invalid
# 需要导入模块: from outwiker.gui.stcstyle import StcStyle [as 别名]
# 或者: from outwiker.gui.stcstyle.StcStyle import parse [as 别名]
def testParse_invalid (self):
self.assertEqual (StcStyle.parse (u"sdgsgd"), None)
self.assertEqual (StcStyle.parse (u"fore:#AAAAAA,back:#222222,boldasdfa"), None)