def __init__(self, code_view): super().__init__(create_default_actions=True) self._code_view = code_view self.panels.append(panels.LineNumberPanel()) self.panels.append(panels.FoldingPanel()) self.modes.append(modes.SymbolMatcherMode()) self.setTabChangesFocus(False) self.setReadOnly(True) self.constant_actions = [] self.operator_actions = [] self.variable_actions = [] self.selected_actions = [] self.call_actions = [] self.default_actions = [] self._initialize_context_menus() self._selected_node = None self.action_rename_variable = None # but we don't need some of the actions self.remove_action(self.action_undo) self.remove_action(self.action_redo) self.remove_action(self.action_cut) self.remove_action(self.action_paste) self.remove_action(self.action_duplicate_line) self.remove_action(self.action_swap_line_up) self.remove_action(self.action_swap_line_down)
def __init__(self, code_view): super().__init__(create_default_actions=True) self._code_view = code_view self.panels.append(panels.LineNumberPanel()) self.panels.append(panels.FoldingPanel()) self.modes.append(modes.SymbolMatcherMode()) self.setTabChangesFocus(False) self.setReadOnly(True) # but we don't need some of the actions self.remove_action(self.action_undo) self.remove_action(self.action_redo) self.remove_action(self.action_cut) self.remove_action(self.action_paste) self.remove_action(self.action_duplicate_line) self.remove_action(self.action_swap_line_up) self.remove_action(self.action_swap_line_down)