示例#1
0
    def create_shortcuts(self, parent):
        """Create shortcuts for this widget"""
        # Configurable
        findnext = config_shortcut(self.find_next, context='_',
                                   name='Find next', parent=parent)
        findprev = config_shortcut(self.find_previous, context='_',
                                   name='Find previous', parent=parent)
        togglefind = config_shortcut(self.show, context='_',
                                     name='Find text', parent=parent)
        togglereplace = config_shortcut(self.toggle_replace_widgets,
                                        context='_', name='Replace text',
                                        parent=parent)
        # Fixed
        fixed_shortcut("Escape", self, self.hide)

        return [findnext, findprev, togglefind, togglereplace]
示例#2
0
    def create_shortcuts(self):
        inspect = config_shortcut(self._control.inspect_current_object,
                                  context='Console', name='Inspect current object',
                                  parent=self)
        clear_console = config_shortcut(self.clear_console, context='Console',
                                        name='Clear shell', parent=self)

        # Fixed shortcuts
        fixed_shortcut("Ctrl+T", self, lambda: self.new_client.emit())
        fixed_shortcut("Ctrl+R", self, lambda: self.reset_namespace())
        fixed_shortcut(SHORTCUT_INLINE, self,
                       lambda: self._control.enter_array_inline())
        fixed_shortcut(SHORTCUT_TABLE, self,
                       lambda: self._control.enter_array_table())

        return [inspect, clear_console]
示例#3
0
文件: shell.py 项目: G-VAR/spyder
 def create_shortcuts(self):
     fixed_shortcut(SHORTCUT_INLINE, self, lambda: self.enter_array_inline())
     fixed_shortcut(SHORTCUT_TABLE, self, lambda: self.enter_array_table())
     inspectsc = config_shortcut(self.inspect_current_object,
                                 context='Console',
                                 name='Inspect current object',
                                 parent=self)
     return [inspectsc]
示例#4
0
 def create_shortcuts(self):
     fixed_shortcut(SHORTCUT_INLINE, self,
                    lambda: self.enter_array_inline())
     fixed_shortcut(SHORTCUT_TABLE, self, lambda: self.enter_array_table())
     inspectsc = config_shortcut(self.inspect_current_object,
                                 context='Console',
                                 name='Inspect current object',
                                 parent=self)
     return [inspectsc]
示例#5
0
    def create_shortcuts(self, parent):
        """Create shortcuts for this widget"""
        # Configurable
        findnext = config_shortcut(self.find_next,
                                   context='_',
                                   name='Find next',
                                   parent=parent)
        findprev = config_shortcut(self.find_previous,
                                   context='_',
                                   name='Find previous',
                                   parent=parent)
        togglefind = config_shortcut(self.show,
                                     context='_',
                                     name='Find text',
                                     parent=parent)
        togglereplace = config_shortcut(self.toggle_replace_widgets,
                                        context='_',
                                        name='Replace text',
                                        parent=parent)
        # Fixed
        fixed_shortcut("Escape", self, self.hide)

        return [findnext, findprev, togglefind, togglereplace]