diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index 19c06f6e36..20a49975c1 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -982,6 +982,7 @@ src_frontends_qt4_ui_files = Split(''' RefUi.ui SearchUi.ui SendtoUi.ui + ShortcutUi.ui ShowFileUi.ui SpellcheckerUi.ui TabularCreateUi.ui diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index eeb370c6bf..60a22363a9 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1698,6 +1698,8 @@ PrefShortcuts::PrefShortcuts(GuiPreferences * form, QWidget * parent) this, SLOT(select_bind())); connect(bindFileED, SIGNAL(textChanged(const QString &)), this, SIGNAL(changed())); + + shortcut_ = new GuiShortcutDialog(this); } @@ -1793,6 +1795,32 @@ void PrefShortcuts::select_bind() } +void PrefShortcuts::on_newPB_pressed() +{ + // FIXME + shortcut_->exec(); +} + + +void PrefShortcuts::on_modifyPB_pressed() +{ + // FIXME + shortcut_->exec(); +} + + +void PrefShortcuts::on_removePB_pressed() +{ + // +} + + +void PrefShortcuts::on_searchPB_pressed() +{ + // +} + + PrefIdentity::PrefIdentity(QWidget * parent) : PrefModule(_("Identity"), 0, parent) { diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index d4ca92472d..b5bf6ff381 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -38,6 +38,7 @@ #include "ui_PrefPrinterUi.h" #include "ui_PrefUi.h" #include "ui_PrefIdentityUi.h" +#include "ui_ShortcutUi.h" #include #include @@ -344,6 +345,17 @@ public Q_SLOTS: }; +class GuiShortcutDialog : public QDialog, public Ui::ShortcutUi +{ +public: + GuiShortcutDialog(QWidget * parent) : QDialog(parent) + { + Ui::ShortcutUi::setupUi(this); + QDialog::setModal(true); + } +}; + + class PrefShortcuts : public PrefModule, public Ui::PrefShortcuts { Q_OBJECT @@ -355,7 +367,12 @@ public: public Q_SLOTS: void select_bind(); - + void on_newPB_pressed(); + void on_modifyPB_pressed(); + void on_removePB_pressed(); + void on_searchPB_pressed(); +private: + GuiShortcutDialog * shortcut_; }; diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index 0cb90ec9d0..e9327e99be 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -284,6 +284,7 @@ UIFILES = \ RefUi.ui \ SearchUi.ui \ SendtoUi.ui \ + ShortcutUi.ui \ ShowFileUi.ui \ SpellcheckerUi.ui \ TabularCreateUi.ui \ diff --git a/src/frontends/qt4/ui/PrefShortcutsUi.ui b/src/frontends/qt4/ui/PrefShortcutsUi.ui index 3e75055c30..f5b9373989 100644 --- a/src/frontends/qt4/ui/PrefShortcutsUi.ui +++ b/src/frontends/qt4/ui/PrefShortcutsUi.ui @@ -27,12 +27,6 @@ 6 - - - - - - @@ -49,28 +43,7 @@ - - - - Modify - - - - - - - Remove - - - - - - New - - - - Qt::Vertical @@ -80,21 +53,14 @@ - 21 + 51 83 - - - - Search - - - - - + + 1 @@ -105,6 +71,26 @@ + + + + + + + + + + Remove + + + + + + + New + + + @@ -129,6 +115,20 @@ + + + + Search + + + + + + + Modify + + + diff --git a/src/frontends/qt4/ui/ShortcutUi.ui b/src/frontends/qt4/ui/ShortcutUi.ui new file mode 100644 index 0000000000..066c96ecb8 --- /dev/null +++ b/src/frontends/qt4/ui/ShortcutUi.ui @@ -0,0 +1,138 @@ + + ShortcutUi + + + + 0 + 0 + 221 + 147 + + + + + 1 + 1 + 0 + 0 + + + + Edit shortcut + + + true + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + &OK + + + false + + + true + + + + + + + Cancel + + + false + + + + + + + + + Function: + + + + + + + Shortcut + + + + + + + + 7 + 0 + 0 + 0 + + + + Enter BibTeX database name + + + + + + + + 7 + 0 + 0 + 0 + + + + Enter BibTeX database name + + + + + + + lfunED + okPB + cancelPB + + + qt_helpers.h + + + +