X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiPrefs.h;h=373f14d12717d0a3e32de24d81f28609d0f2095c;hb=9c17666dd35a289a957aa788ff0d9aad26c6acaf;hp=e4b5f19a96b6578f7cebec5fc1f667c0629852bb;hpb=8bdcbb56a5a1208e777879eefff77bf4af3fc7d7;p=lyx.git diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index e4b5f19a96..373f14d127 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -5,6 +5,8 @@ * Licence details can be found in the file COPYING. * * \author John Levon + * \author Bo Peng + * \author Edwin Leuven * * Full author contact details are available in file CREDITS. */ @@ -347,14 +349,24 @@ public Q_SLOTS: }; -class GuiShortcutDialog : public QDialog, public Ui::ShortcutUi +/** + * A lineedit for inputting shortcuts + */ +class ShortcutEdit : public QLineEdit { + Q_OBJECT +public: + ShortcutEdit(QWidget * parent) : QLineEdit(parent) {} +protected Q_SLOTS: + void keyPressEvent(QKeyEvent * e); + bool event(QEvent* e); +}; + + +class GuiShortcutDialog : public QDialog, public Ui::shortcutUi { public: - GuiShortcutDialog(QWidget * parent) : QDialog(parent) - { - Ui::ShortcutUi::setupUi(this); - QDialog::setModal(true); - } + GuiShortcutDialog(QWidget * parent); + ShortcutEdit * shortcutLE; }; @@ -390,6 +402,7 @@ public Q_SLOTS: /// void on_shortcutsTW_itemSelectionChanged(); void shortcut_okPB_pressed(); + void shortcut_clearPB_pressed(); void on_shortcutsTW_itemDoubleClicked(); private: