'Load shortcuts and assign to table model.'

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)))
    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)
