예제 #1
0
 def create_shortcuts(self):
     new_shortcut(SHORTCUT_INLINE, self, lambda: self.enter_array_inline())
     new_shortcut(SHORTCUT_TABLE, self, lambda: self.enter_array_table())        
     inspectsc = create_shortcut(self.inspect_current_object,
                                 context='Console',
                                 name='Inspect current object',
                                 parent=self)
     return [inspectsc]
예제 #2
0
파일: shell.py 프로젝트: mikofski/spyder
 def create_shortcuts(self):
     new_shortcut(SHORTCUT_INLINE, self, lambda: self.enter_array_inline())
     new_shortcut(SHORTCUT_TABLE, self, lambda: self.enter_array_table())
     inspectsc = create_shortcut(self.inspect_current_object,
                                 context='Console',
                                 name='Inspect current object',
                                 parent=self)
     return [inspectsc]
예제 #3
0
    def create_shortcuts(self):
        inspect = create_shortcut(self._control.inspect_current_object,
                                  context='Console', name='Inspect current object',
                                  parent=self)
        clear_console = create_shortcut(self.clear_console, context='Console',
                                        name='Clear shell', parent=self)

        # Fixed shortcuts
        new_shortcut("Ctrl+T", self,
                     lambda: self.emit(SIGNAL("new_ipyclient()")))

        return [inspect, clear_console]
예제 #4
0
    def __init__(self, parent, model):
        QTableView.__init__(self, parent)
        self.setModel(model)

        self.sort_old = [None]
        self.header_class = self.horizontalHeader()
        self.header_class.sectionClicked.connect(self.sortByColumn)
        self.menu = self.setup_menu()
        new_shortcut(QKeySequence.Copy, self, self.copy)
        self.horizontalScrollBar().valueChanged.connect(
            lambda val: self.load_more_data(val, columns=True))
        self.verticalScrollBar().valueChanged.connect(
            lambda val: self.load_more_data(val, rows=True))
예제 #5
0
    def __init__(self, parent, model):
        QTableView.__init__(self, parent)
        self.setModel(model)

        self.sort_old = [None]
        self.header_class = self.horizontalHeader()
        self.header_class.sectionClicked.connect(self.sortByColumn)
        self.menu = self.setup_menu()
        new_shortcut(QKeySequence.Copy, self, self.copy)
        self.horizontalScrollBar().valueChanged.connect(
                            lambda val: self.load_more_data(val, columns=True))
        self.verticalScrollBar().valueChanged.connect(
                               lambda val: self.load_more_data(val, rows=True))
예제 #6
0
    def create_shortcuts(self, parent):
        """Create shortcuts for this widget"""
        # Configurable
        findnext = create_shortcut(self.find_next, context="Editor", name="Find next", parent=parent)
        findprev = create_shortcut(self.find_previous, context="Editor", name="Find previous", parent=parent)
        togglefind = create_shortcut(self.show, context="Editor", name="Find text", parent=parent)
        togglereplace = create_shortcut(
            self.toggle_replace_widgets, context="Editor", name="Replace text", parent=parent
        )
        # Fixed
        new_shortcut("Escape", self, self.hide)

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

        # Fixed shortcuts
        new_shortcut("Ctrl+T", self,
                     lambda: self.emit(SIGNAL("new_ipyclient()")))

        return [inspect, clear_console]
예제 #8
0
    def __init__(self, parent, model, dtype, shape):
        QTableView.__init__(self, parent)

        self.setModel(model)
        self.setItemDelegate(ArrayDelegate(dtype, self))
        total_width = 0
        for k in range(shape[1]):
            total_width += self.columnWidth(k)
        self.viewport().resize(min(total_width, 1024), self.height())
        self.shape = shape
        self.menu = self.setup_menu()
        new_shortcut(QKeySequence.Copy, self, self.copy)
        self.horizontalScrollBar().valueChanged.connect(
                            lambda val: self.load_more_data(val, columns=True))
        self.verticalScrollBar().valueChanged.connect(
                               lambda val: self.load_more_data(val, rows=True))
예제 #9
0
    def __init__(self, parent, model, dtype, shape):
        QTableView.__init__(self, parent)

        self.setModel(model)
        self.setItemDelegate(ArrayDelegate(dtype, self))
        total_width = 0
        for k in range(shape[1]):
            total_width += self.columnWidth(k)
        self.viewport().resize(min(total_width, 1024), self.height())
        self.shape = shape
        self.menu = self.setup_menu()
        new_shortcut(QKeySequence.Copy, self, self.copy)
        self.horizontalScrollBar().valueChanged.connect(
            lambda val: self.load_more_data(val, columns=True))
        self.verticalScrollBar().valueChanged.connect(
            lambda val: self.load_more_data(val, rows=True))
예제 #10
0
    def create_shortcuts(self, parent):
        """Create shortcuts for this widget"""
        # Configurable
        findnext = create_shortcut(self.find_next, context='Editor',
                                   name='Find next', parent=parent)
        findprev = create_shortcut(self.find_previous, context='Editor',
                                   name='Find previous', parent=parent)
        togglefind = create_shortcut(self.show, context='Editor',
                                     name='Find text', parent=parent)
        togglereplace = create_shortcut(self.toggle_replace_widgets,
                                        context='Editor', name='Replace text',
                                        parent=parent)
        # Fixed
        new_shortcut("Escape", self, self.hide)

        return [findnext, findprev, togglefind, togglereplace]
예제 #11
0
파일: tabs.py 프로젝트: Micseb/spyder
 def __init__(self, parent, actions=None, menu=None,
              corner_widgets=None, menu_use_tooltips=False):
     BaseTabs.__init__(self, parent, actions, menu,
                       corner_widgets, menu_use_tooltips)
     tab_bar = TabBar(self, parent)
     tab_bar.sig_move_tab.connect(self.move_tab)
     tab_bar.sig_move_tab[(str, int, int)].connect(
                                       self.move_tab_from_another_tabwidget)
     self.setTabBar(tab_bar)
     
     new_shortcut("Ctrl+Tab", parent, lambda: self.tab_navigate(1))
     new_shortcut("Shift+Ctrl+Tab", parent, lambda: self.tab_navigate(-1))
     new_shortcut("Ctrl+W", parent,
                  lambda: self.sig_close_tab.emit(self.currentIndex()))
     new_shortcut("Ctrl+F4", parent,
                  lambda: self.sig_close_tab.emit(self.currentIndex()))
예제 #12
0
 def __init__(self, parent, actions=None, menu=None,
              corner_widgets=None, menu_use_tooltips=False):
     BaseTabs.__init__(self, parent, actions, menu,
                       corner_widgets, menu_use_tooltips)
     tab_bar = TabBar(self, parent)
     self.connect(tab_bar, SIGNAL('move_tab(int,int)'), self.move_tab)
     self.connect(tab_bar, SIGNAL('move_tab(QString,int,int)'),
                  self.move_tab_from_another_tabwidget)
     self.setTabBar(tab_bar)
     
     new_shortcut("Ctrl+Tab", parent, lambda: self.tab_navigate(1))
     new_shortcut("Shift+Ctrl+Tab", parent, lambda: self.tab_navigate(-1))
     new_shortcut("Ctrl+W", parent, lambda: self.emit(SIGNAL("close_tab(int)"),
                                                      self.currentIndex()))
     new_shortcut("Ctrl+F4", parent, lambda: self.emit(SIGNAL("close_tab(int)"),
                                                       self.currentIndex()))
예제 #13
0
    def __init__(self,
                 parent,
                 actions=None,
                 menu=None,
                 corner_widgets=None,
                 menu_use_tooltips=False):
        BaseTabs.__init__(self, parent, actions, menu, corner_widgets,
                          menu_use_tooltips)
        tab_bar = TabBar(self, parent)
        tab_bar.sig_move_tab.connect(self.move_tab)
        tab_bar.sig_move_tab[(str, int, int)].connect(
            self.move_tab_from_another_tabwidget)
        self.setTabBar(tab_bar)

        new_shortcut("Ctrl+Tab", parent, lambda: self.tab_navigate(1))
        new_shortcut("Shift+Ctrl+Tab", parent, lambda: self.tab_navigate(-1))
        new_shortcut("Ctrl+W", parent,
                     lambda: self.sig_close_tab.emit(self.currentIndex()))
        new_shortcut("Ctrl+F4", parent,
                     lambda: self.sig_close_tab.emit(self.currentIndex()))
예제 #14
0
    def __init__(self,
                 parent,
                 actions=None,
                 menu=None,
                 corner_widgets=None,
                 menu_use_tooltips=False):
        BaseTabs.__init__(self, parent, actions, menu, corner_widgets,
                          menu_use_tooltips)
        tab_bar = TabBar(self, parent)
        self.connect(tab_bar, SIGNAL('move_tab(int,int)'), self.move_tab)
        self.connect(tab_bar, SIGNAL('move_tab(QString,int,int)'),
                     self.move_tab_from_another_tabwidget)
        self.setTabBar(tab_bar)

        new_shortcut("Ctrl+Tab", parent, lambda: self.tab_navigate(1))
        new_shortcut("Shift+Ctrl+Tab", parent, lambda: self.tab_navigate(-1))
        new_shortcut(
            "Ctrl+W", parent,
            lambda: self.emit(SIGNAL("close_tab(int)"), self.currentIndex()))
        new_shortcut(
            "Ctrl+F4", parent,
            lambda: self.emit(SIGNAL("close_tab(int)"), self.currentIndex()))
예제 #15
0
    def create_shortcuts(self):
        inspect = create_shortcut(self._control.inspect_current_object,
                                  context='Console', name='Inspect current object',
                                  parent=self)
        clear_console = create_shortcut(self.clear_console, context='Console',
                                        name='Clear shell', parent=self)

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

        return [inspect, clear_console]
예제 #16
0
    def create_shortcuts(self):
        inspect = create_shortcut(self._control.inspect_current_object,
                                  context='Console',
                                  name='Inspect current object',
                                  parent=self)
        clear_console = create_shortcut(self.clear_console,
                                        context='Console',
                                        name='Clear shell',
                                        parent=self)

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

        return [inspect, clear_console]