KDE 4.5 PyKDE API Reference

- KDE's Python API

# KShortcutWidget Class Reference

`from PyKDE4.kdeui import *`

Inherits: QWidget → QObject

## Detailed Description

"KDE Shortcut Widget"

## Signals
| shortcutChanged (KShortcut cut)
## Methods
| __init__ (self, QWidget parent=0)
| applyStealShortcut (self)
| clearShortcut (self)
bool | isModifierlessAllowed (self)
| setCheckActionCollections (self, [KActionCollection] actionCollections)
| setCheckActionList (self, [QAction] checkList)
| setClearButtonsShown (self, bool show)
| setModifierlessAllowed (self, bool allow)
| setShortcut (self, KShortcut cut)

## Signal Documentation

shortcutChanged | ( | KShortcut | cut
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("shortcutChanged(const KShortcut&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

applyStealShortcut | ( |  | self ) |

Actually remove the shortcut that the user wanted to steal, from the action that was using it.

To be called before you apply your changes. No shortcuts are stolen until this function is called.

clearShortcut | ( |  | self ) |

bool isModifierlessAllowed | ( |  | self ) |

setCheckActionCollections | ( | self, |
|  | [KActionCollection] | actionCollections
| ) |  |  |

Set a list of action collections to check against for conflictuous shortcut.

If there is a conflictuous shortcut with a KAction, and that his shortcut can be configured (KAction.isShortcutConfigurable() returns true) the user will be prompted for eventually steal the shortcut from this action

Global shortcuts are automatically checked for conflicts

Don't forget to call applyStealShortcut to actually steal the shortcut.

Since:
  4.1

setCheckActionList | ( | self, |
|  | [QAction] | checkList
| ) |  |  |

Deprecated:
  since 4.1 Use setCheckActionCollections so that KShortcutWidget knows in which action collection to call the writeSettings method after stealing a shortcut from an action.

setClearButtonsShown | ( | self, |
|  | bool | show
| ) |  |  |

setModifierlessAllowed | ( | self, |
|  | bool | allow
| ) |  |  |

setShortcut | ( | self, |
|  | KShortcut | cut
| ) |  |  |