From: Pavel Sanda Date: Sun, 19 Oct 2008 01:21:59 +0000 (+0000) Subject: Create new Module panel in document settings and decrease vertical X-Git-Tag: 1.6.10~2993 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9d82588e3e116fa87f3f1e487de8610105b83d13;p=features.git Create new Module panel in document settings and decrease vertical size of the dialog. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg145035.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26953 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index a2f2e43378..912f98a31a 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -906,17 +906,6 @@ GuiDocument::GuiDocument(GuiView & lv) connect(latexModule->childDocPB, SIGNAL(clicked()), this, SLOT(browseMaster())); - selectionManager = - new ModuleSelectionManager(latexModule->availableLV, - latexModule->selectedLV, - latexModule->addPB, latexModule->deletePB, - latexModule->upPB, latexModule->downPB, - availableModel(), selectedModel()); - connect(selectionManager, SIGNAL(updateHook()), - this, SLOT(updateModuleInfo())); - connect(selectionManager, SIGNAL(updateHook()), - this, SLOT(change_adaptor())); - // postscript drivers for (int n = 0; tex_graphics[n][0]; ++n) { QString enc = qt_(tex_graphics_gui[n]); @@ -953,6 +942,21 @@ GuiDocument::GuiDocument(GuiView & lv) connect(bulletsModule, SIGNAL(changed()), this, SLOT(change_adaptor())); + // Modules + modulesModule = new UiWidget; + + selectionManager = + new ModuleSelectionManager(modulesModule->availableLV, + modulesModule->selectedLV, + modulesModule->addPB, modulesModule->deletePB, + modulesModule->upPB, modulesModule->downPB, + availableModel(), selectedModel()); + connect(selectionManager, SIGNAL(updateHook()), + this, SLOT(updateModuleInfo())); + connect(selectionManager, SIGNAL(updateHook()), + this, SLOT(change_adaptor())); + + // PDF support pdfSupportModule = new UiWidget; @@ -998,6 +1002,7 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(change_adaptor())); docPS->addPanel(latexModule, qt_("Document Class")); + docPS->addPanel(modulesModule, qt_("Modules")); docPS->addPanel(fontModule, qt_("Fonts")); docPS->addPanel(textLayoutModule, qt_("Text Layout")); docPS->addPanel(pageLayoutModule, qt_("Page Layout")); @@ -1426,9 +1431,9 @@ void GuiDocument::updateModuleInfo() //Module description bool const focusOnSelected = selectionManager->selectedFocused(); QListView const * const lv = - focusOnSelected ? latexModule->selectedLV : latexModule->availableLV; + focusOnSelected ? modulesModule->selectedLV : modulesModule->availableLV; if (lv->selectionModel()->selectedIndexes().isEmpty()) { - latexModule->infoML->document()->clear(); + modulesModule->infoML->document()->clear(); return; } QModelIndex const & idx = lv->selectionModel()->currentIndex(); @@ -1469,7 +1474,7 @@ void GuiDocument::updateModuleInfo() desc += _("WARNING: Some required packages are unavailable!"); } - latexModule->infoML->document()->setPlainText(toqstr(desc)); + modulesModule->infoML->document()->setPlainText(toqstr(desc)); } diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index 71808b7caf..2f3dfc4396 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -32,6 +32,7 @@ #include "ui_MarginsUi.h" #include "ui_PreambleUi.h" #include "ui_PDFSupportUi.h" +#include "ui_ModulesUi.h" #include #include @@ -109,6 +110,7 @@ private: UiWidget *mathsModule; UiWidget *latexModule; UiWidget *pdfSupportModule; + UiWidget *modulesModule; PreambleModule *preambleModule; GuiBranches *branchesModule; diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index b20fc223f2..5b1919c10a 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -260,6 +260,7 @@ UIFILES = \ MarginsUi.ui \ MathMatrixUi.ui \ MathsUi.ui \ + ModulesUi.ui \ NomenclUi.ui \ NoteUi.ui \ NumberingUi.ui \ diff --git a/src/frontends/qt4/ui/LaTeXUi.ui b/src/frontends/qt4/ui/LaTeXUi.ui index 2c65719637..dd73558ad3 100644 --- a/src/frontends/qt4/ui/LaTeXUi.ui +++ b/src/frontends/qt4/ui/LaTeXUi.ui @@ -5,8 +5,8 @@ 0 0 - 381 - 449 + 379 + 255 @@ -19,99 +19,6 @@ 6 - - - - Modules - - - - 9 - - - 6 - - - - - - - - Qt::Vertical - - - - 80 - 16 - - - - - - - - Do&wn - - - - - - - &Up - - - - - - - De&lete - - - - - - - QAbstractItemView::NoEditTriggers - - - - - - - A&dd - - - - - - - QAbstractItemView::NoEditTriggers - - - - - - - S&elected: - - - selectedLV - - - - - - - A&vailable: - - - availableLV - - - - - - @@ -182,7 +89,7 @@ Qt::Horizontal - + 261 22 @@ -200,9 +107,7 @@ - - 1 - 0 + 0 0 @@ -239,12 +144,12 @@ - - 0 - 6 + + 0 + @@ -289,13 +194,6 @@ classCO optionsLE psdriverCO - availableLV - addPB - deletePB - upPB - downPB - selectedLV - infoML qt_i18n.h diff --git a/src/frontends/qt4/ui/compile_uic.sh b/src/frontends/qt4/ui/compile_uic.sh index 2c455129af..b8f2763ce3 100644 --- a/src/frontends/qt4/ui/compile_uic.sh +++ b/src/frontends/qt4/ui/compile_uic.sh @@ -26,6 +26,7 @@ uic LogUi.ui -o LogUi.h uic MarginsUi.ui -o MarginsUi.h uic MathMatrixUi.ui -o MathMatrixUi.h uic MathsUi.ui -o MathsUi.h +uic ModulesUi.ui -o ModulesUi.h uic NoteUi.ui -o NoteUi.h uic NumberingUi.ui -o NumberingUi.h uic PageLayoutUi.ui -o PageLayoutUi.h