| 42 | } |
| 43 | |
| 44 | void AbstractAction::setShortCutInfo(const QString &id, const QString &description, const QKeySequence defaultShortCut) |
| 45 | { |
| 46 | d->hasShortCut = true; |
| 47 | d->id = id; |
| 48 | d->description = description; |
| 49 | if(!defaultShortCut.isEmpty() && d->action->shortcut().isEmpty()) |
| 50 | d->action->setShortcut(defaultShortCut); |
| 51 | d->keySequence = defaultShortCut.isEmpty() ? d->action->shortcut() : defaultShortCut; |
| 52 | } |
| 53 | |
| 54 | bool AbstractAction::hasShortCut() |
| 55 | { |