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


Python WikiPageFactory.registerActions方法代码示例

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


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

示例1: registerActions

# 需要导入模块: from outwiker.pages.wiki.wikipage import WikiPageFactory [as 别名]
# 或者: from outwiker.pages.wiki.wikipage.WikiPageFactory import registerActions [as 别名]
def registerActions (application):
    """
    Зарегистрировать действия
    """
    # Действия, связанные с разными типами страниц
    from outwiker.pages.html.htmlpage import HtmlPageFactory
    HtmlPageFactory.registerActions (application)

    from outwiker.pages.wiki.wikipage import WikiPageFactory
    WikiPageFactory.registerActions (application)

    actionController = application.actionController
    from outwiker.gui.actionslist import actionsList, polyactionsList

    # Register the normal actions
    map(lambda item: actionController.register(item[0](application),
                                               item[1]),
        actionsList)

    # Register the polyactions
    map(lambda item: actionController.register(PolyAction(application,
                                                          item[0],
                                                          item[1],
                                                          item[2]),
                                               item[3]),
        polyactionsList)
开发者ID:,项目名称:,代码行数:28,代码来源:

示例2: registerActions

# 需要导入模块: from outwiker.pages.wiki.wikipage import WikiPageFactory [as 别名]
# 或者: from outwiker.pages.wiki.wikipage.WikiPageFactory import registerActions [as 别名]
def registerActions (application):
    """
    Зарегистрировать действия
    """
    # Действия, связанные с разными типами страниц
    from outwiker.pages.html.htmlpage import HtmlPageFactory
    HtmlPageFactory.registerActions (application)

    from outwiker.pages.wiki.wikipage import WikiPageFactory
    WikiPageFactory.registerActions (application)


    # Открыть...
    from outwiker.actions.open import OpenAction
    application.actionController.register (
        OpenAction (application),
        HotKey ("O", ctrl=True))

    # Создать...
    from outwiker.actions.new import NewAction
    application.actionController.register (
        NewAction (application),
        HotKey ("N", ctrl=True))

    # Открыть только для чтения
    from outwiker.actions.openreadonly import OpenReadOnlyAction
    application.actionController.register (
        OpenReadOnlyAction (application),
        HotKey ("O", ctrl=True, shift=True))

    # Закрыть
    from outwiker.actions.close import CloseAction
    application.actionController.register (
        CloseAction (application),
        HotKey ("W", ctrl=True, shift=True))

    # Сохранить
    from outwiker.actions.save import SaveAction
    application.actionController.register (
        SaveAction (application),
        HotKey ("S", ctrl=True))

    # Печать
    from outwiker.actions.printaction import PrintAction
    application.actionController.register (
        PrintAction (application),
        HotKey ("P", ctrl=True))

    # Выход
    from outwiker.actions.exit import ExitAction
    application.actionController.register (
        ExitAction (application),
        HotKey ("F4", alt=True))

    # Показать / скрыть панель с прикрепленными файлами
    from outwiker.actions.showhideattaches import ShowHideAttachesAction
    application.actionController.register (
        ShowHideAttachesAction (application))

    # Показать / скрыть панель с деревом заметок
    from outwiker.actions.showhidetree import ShowHideTreeAction
    application.actionController.register (
        ShowHideTreeAction (application))

    # Показать / скрыть панель с тегами
    from outwiker.actions.showhidetags import ShowHideTagsAction
    application.actionController.register (
        ShowHideTagsAction (application))

    # Полноэкранный режим
    from outwiker.actions.fullscreen import FullScreenAction
    application.actionController.register (
        FullScreenAction (application),
        HotKey ("F11"))

    # Поиск
    from outwiker.actions.search import SearchAction, SearchNextAction, SearchPrevAction, SearchAndReplaceAction
    application.actionController.register (
        SearchAction (application),
        HotKey ("F", ctrl=True))

    application.actionController.register (
        SearchNextAction (application),
        HotKey ("F3"))

    application.actionController.register (
        SearchPrevAction (application),
        HotKey ("F3", shift=True))

    application.actionController.register (
        SearchAndReplaceAction (application),
        HotKey ("H", ctrl=True))


    # Вызов настроек
    from outwiker.actions.preferences import PreferencesAction
    application.actionController.register (
        PreferencesAction (application),
        HotKey ("F8", ctrl=True))

#.........这里部分代码省略.........
开发者ID:theoden-dd,项目名称:outwiker,代码行数:103,代码来源:commands.py


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