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


Python StcStyle.parse方法代碼示例

本文整理匯總了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")
開發者ID:LihMeh,項目名稱:outwiker,代碼行數:10,代碼來源:stcstyleparser.py

示例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")
開發者ID:LihMeh,項目名稱:outwiker,代碼行數:10,代碼來源:stcstyleparser.py

示例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")
開發者ID:LihMeh,項目名稱:outwiker,代碼行數:10,代碼來源:stcstyleparser.py

示例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")
開發者ID:LihMeh,項目名稱:outwiker,代碼行數:10,代碼來源:stcstyleparser.py

示例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")
開發者ID:Jenyay,項目名稱:outwiker,代碼行數:10,代碼來源:test_stcstyleparser.py

示例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")
開發者ID:Jenyay,項目名稱:outwiker,代碼行數:10,代碼來源:test_stcstyleparser.py

示例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
開發者ID:Jenyay,項目名稱:outwiker,代碼行數:11,代碼來源:config.py

示例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)
開發者ID:LihMeh,項目名稱:outwiker,代碼行數:5,代碼來源:stcstyleparser.py


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