def load_shortcuts(self):
     shortcuts = []
     for context, name, keystr in iter_shortcuts():
         shortcut = Shortcut(context, name, keystr)
         shortcuts.append(shortcut)
     shortcuts = sorted(shortcuts, key=lambda x: x.context + x.name)
     self.model.shortcuts = shortcuts
     self.model.reset()
     self.adjust_cells()
Beispiel #2
0
 def load_shortcuts(self):
     shortcuts = []
     for context, name, keystr in iter_shortcuts():
         shortcut = Shortcut(context, name, keystr)
         shortcuts.append(shortcut)
     shortcuts = sorted(shortcuts, key=lambda x: x.context+x.name)
     self.model.shortcuts = shortcuts
     self.model.reset()
     self.adjust_cells()
Beispiel #3
0
 def load_shortcuts(self):
     """Load shortcuts and assign to table model."""
     shortcuts = []
     for context, name, keystr in iter_shortcuts():
         shortcut = Shortcut(context, name, keystr)
         shortcuts.append(shortcut)
     shortcuts = sorted(shortcuts, key=lambda x: x.context+x.name)
     self.source_model.shortcuts = shortcuts
     self.source_model.reset()
     self.adjust_cells()
Beispiel #4
0
 def load_shortcuts(self):
     """Load shortcuts and assign to table model."""
     shortcuts = []
     for context, name, keystr in iter_shortcuts():
         shortcut = Shortcut(context, name, keystr)
         shortcuts.append(shortcut)
     shortcuts = sorted(shortcuts, key=lambda x: x.context + x.name)
     # Store the original order of shortcuts
     for i, shortcut in enumerate(shortcuts):
         shortcut.index = i
     self.source_model.shortcuts = shortcuts
     self.source_model.scores = [0] * len(shortcuts)
     self.source_model.rich_text = [s.name for s in shortcuts]
     self.source_model.reset()
     self.adjust_cells()
     self.sortByColumn(CONTEXT, Qt.AscendingOrder)
Beispiel #5
0
 def load_shortcuts(self):
     """Load shortcuts and assign to table model."""
     shortcuts = []
     for context, name, keystr in iter_shortcuts():
         shortcut = Shortcut(context, name, keystr)
         shortcuts.append(shortcut)
     shortcuts = sorted(shortcuts, key=lambda x: x.context+x.name)
     # Store the original order of shortcuts
     for i, shortcut in enumerate(shortcuts):
         shortcut.index = i
     self.source_model.shortcuts = shortcuts
     self.source_model.scores = [0]*len(shortcuts)
     self.source_model.rich_text = [s.name for s in shortcuts]
     self.source_model.reset()
     self.adjust_cells()
     self.sortByColumn(CONTEXT, Qt.AscendingOrder)