本文整理汇总了Python中outwiker.gui.hotkeyparser.HotKeyParser.fromString方法的典型用法代码示例。如果您正苦于以下问题:Python HotKeyParser.fromString方法的具体用法?Python HotKeyParser.fromString怎么用?Python HotKeyParser.fromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类outwiker.gui.hotkeyparser.HotKeyParser
的用法示例。
在下文中一共展示了HotKeyParser.fromString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testParse7
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def testParse7 (self):
hotkey = HotKeyParser.fromString (u"+")
self.assertEqual (hotkey.key, u"+")
self.assertFalse (hotkey.ctrl)
self.assertFalse (hotkey.shift)
self.assertFalse (hotkey.alt)
示例2: testParse5
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def testParse5 (self):
hotkey = HotKeyParser.fromString (u"Shift+Alt+Ctrl+F1")
self.assertEqual (hotkey.key, "F1")
self.assertTrue (hotkey.ctrl)
self.assertTrue (hotkey.shift)
self.assertTrue (hotkey.alt)
示例3: testParse4
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def testParse4 (self):
hotkey = HotKeyParser.fromString (u"Alt+A")
self.assertEqual (hotkey.key, "A")
self.assertFalse (hotkey.ctrl)
self.assertFalse (hotkey.shift)
self.assertTrue (hotkey.alt)
示例4: testParse13
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def testParse13 (self):
hotkey = HotKeyParser.fromString (u" Ctrl + F1 ")
self.assertEqual (hotkey.key, u"F1")
self.assertTrue (hotkey.ctrl)
self.assertFalse (hotkey.shift)
self.assertFalse (hotkey.alt)
示例5: testParse9
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def testParse9 (self):
hotkey = HotKeyParser.fromString (u"ShIfT+ALT+ctrl+F1")
self.assertEqual (hotkey.key, "F1")
self.assertTrue (hotkey.ctrl)
self.assertTrue (hotkey.shift)
self.assertTrue (hotkey.alt)
示例6: testParse8
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def testParse8(self):
hotkey = HotKeyParser.fromString("Ctrl++")
self.assertEqual(hotkey.key, "+")
self.assertTrue(hotkey.ctrl)
self.assertFalse(hotkey.shift)
self.assertFalse(hotkey.alt)
示例7: _loadValue
# 需要导入模块: from outwiker.gui.hotkeyparser import HotKeyParser [as 别名]
# 或者: from outwiker.gui.hotkeyparser.HotKeyParser import fromString [as 别名]
def _loadValue (self):
"""
Получить значение. В производных классах этот метод переопределяется
"""
return HotKeyParser.fromString (self.config.get (self.section, self.param))