.. link: .. description: .. tags: .. date: 2013/08/18 00:00:00 .. title: NINJA-IDE .. slug: shortcut_manager .. class:: alert alert-info pull-top .. contents:: *Module:* `shortcut_manager.py `_ API ============================================================================================== No description. *Imports:* ------------ - `PyQt4.QtGui.QDialog `_ - `PyQt4.QtCore.QEvent `_ - `PyQt4.QtGui.QHBoxLayout `_ - `PyQt4.QtGui.QKeySequence `_ - `PyQt4.QtGui.QLabel `_ - `PyQt4.QtGui.QLineEdit `_ - `PyQt4.QtGui.QMessageBox `_ - `PyQt4.QtGui.QPushButton `_ - `PyQt4.QtCore.QSettings `_ - `PyQt4.QtGui.QTreeWidget `_ - `PyQt4.QtGui.QTreeWidgetItem `_ - `PyQt4.QtGui.QVBoxLayout `_ - `PyQt4.QtGui.QWidget `_ - `PyQt4.QtCore.Qt `_ - `PyQt4.QtCore.SIGNAL `_ - `__future__.absolute_import `_ - `ninja_ide.gui.actions `_ - `ninja_ide.resources `_ *Class:* `TreeResult(QTreeWidget) `_ ------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class TreeResult(QTreeWidget): No description. *Function:* `__init__() [at ln:43] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(): No description. ---- *Class:* `ShortcutConfiguration(QWidget) `_ --------------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class ShortcutConfiguration(QWidget): | Dialog to manage ALL shortcuts *Attributes* ~~~~~~~~~~~~~~ - `result_widget [at ln:207] `_ - `shortcut_dialog [at ln:201] `_ - `shortcuts_text [at ln:130] `_ *Function:* `__init__() [at ln:127] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(): No description. ---- *Function:* `__validate_shortcut(keysequence) [at ln:238] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __validate_shortcut(keysequence): | Validate a shortcut ---- *Function:* `_load_defaults_shortcuts() [at ln:302] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _load_defaults_shortcuts(): No description. ---- *Function:* `_load_shortcuts() [at ln:293] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _load_shortcuts(): No description. ---- *Function:* `_open_shortcut_dialog(item, column) [at ln:268] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _open_shortcut_dialog(item, column): | Open the dialog to set a shortcut ---- *Function:* `_shortcut_changed(keysequence) [at ln:231] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def _shortcut_changed(keysequence): | Validate and set a new shortcut ---- *Function:* `save() [at ln:279] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def save(): | Save all shortcuts to settings ---- *Class:* `ShortcutDialog(QDialog) `_ ------------------------------------------------------------------------------------------------------------------------------------------- .. code:: python class ShortcutDialog(QDialog): | Dialog to set a shortcut for an action | this class emit the follow signals: | shortcutChanged(QKeySequence) *Attributes* ~~~~~~~~~~~~~~ - `keys [at ln:62] `_ - `keyword_modifiers [at ln:64] `_ - `line_edit [at ln:68] `_ *Function:* `__init__(parent) [at ln:60] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def __init__(parent): No description. ---- *Function:* `eventFilter(watched, event) [at ln:92] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def eventFilter(watched, event): No description. ---- *Function:* `keyPressEvent(evt) [at ln:99] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def keyPressEvent(evt): No description. ---- *Function:* `save_shortcut() [at ln:84] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def save_shortcut(): No description. ---- *Function:* `set_shortcut(txt) [at ln:89] `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python def set_shortcut(txt): No description.