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()
Example #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()
Example #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()
Example #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)
Example #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)