Пример #1
0
def show_all_shortcuts(force=False):
    mode = get_shortcut_mode()
    if not force and mode == "all":
        return
    set_shortcut_mode("all")
    add_entries(all_level_shortcuts)
    master_ui.helpWidget.show()
Пример #2
0
def show_confirm_shortcuts():
    mode = get_shortcut_mode()
    if mode == "confirm":
        return
    set_shortcut_mode("confirm")
    add_entries(confirm_level_shortcuts)
    master_ui.helpWidget.show()
Пример #3
0
def show_info_shortcuts():
    mode = get_shortcut_mode()
    if mode != "all":
        return
    set_shortcut_mode("info")
    add_entries(info_level_shortcuts)
    master_ui.helpWidget.show()
Пример #4
0
def show_new_note_shortcuts():
    mode = get_shortcut_mode()
    if mode == "new_note" or mode == "all":
        return
    set_shortcut_mode("new_note")
    add_entries(new_note_level_shortcuts)
    master_ui.helpWidget.show()
Пример #5
0
def show_move_shortcuts():
    mode = get_shortcut_mode()
    if mode == "move":
        return
    set_shortcut_mode("move")
    add_entries(move_level_shortcuts)
    master_ui.helpWidget.show()
Пример #6
0
def show_master_shortcuts():
    mode = get_shortcut_mode()
    ui.setFocus()
    if mode != "top":
        return
    else:
        set_shortcut_mode("master")
        add_entries(master_level_shortcuts)
    master_ui.helpWidget.show()
Пример #7
0
def show_top_shortcuts(force=False):
    mode = get_shortcut_mode()
    ui.setFocus()
    if mode == "top":
        return
    elif mode == "new_note" and not force:
        add_entries(new_note_level_shortcuts)
    elif mode == "info" and not force:
        add_entries(info_level_shortcuts)
    elif mode == "all" and not force:
        add_entries(all_level_shortcuts)
    else:
        set_shortcut_mode("top")
        add_entries(top_level_shortcuts)
    master_ui.helpWidget.show()
Пример #8
0
def init_handler(ui_instance):
    global ui
    ui = ui_instance
    from src.reference.reference import set_shortcut_mode
    set_shortcut_mode("top")