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
This commit is contained in:
Pavel Sanda 2008-10-19 01:21:59 +00:00
parent f62116f224
commit 9d82588e3e
5 changed files with 30 additions and 123 deletions

View File

@ -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<Ui::ModulesUi>;
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<Ui::PDFSupportUi>;
@ -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));
}

View File

@ -32,6 +32,7 @@
#include "ui_MarginsUi.h"
#include "ui_PreambleUi.h"
#include "ui_PDFSupportUi.h"
#include "ui_ModulesUi.h"
#include <list>
#include <map>
@ -109,6 +110,7 @@ private:
UiWidget<Ui::MathsUi> *mathsModule;
UiWidget<Ui::LaTeXUi> *latexModule;
UiWidget<Ui::PDFSupportUi> *pdfSupportModule;
UiWidget<Ui::ModulesUi> *modulesModule;
PreambleModule *preambleModule;
GuiBranches *branchesModule;

View File

@ -260,6 +260,7 @@ UIFILES = \
MarginsUi.ui \
MathMatrixUi.ui \
MathsUi.ui \
ModulesUi.ui \
NomenclUi.ui \
NoteUi.ui \
NumberingUi.ui \

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>449</height>
<width>379</width>
<height>255</height>
</rect>
</property>
<property name="windowTitle" >
@ -19,99 +19,6 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="4" column="0" colspan="4" >
<widget class="QGroupBox" name="modulesGB" >
<property name="title" >
<string>Modules</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="6" column="0" colspan="3" >
<widget class="QTextBrowser" name="infoML" />
</item>
<item row="5" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>80</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1" >
<widget class="QPushButton" name="downPB" >
<property name="text" >
<string>Do&amp;wn</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QPushButton" name="upPB" >
<property name="text" >
<string>&amp;Up</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QPushButton" name="deletePB" >
<property name="text" >
<string>De&amp;lete</string>
</property>
</widget>
</item>
<item rowspan="5" row="1" column="2" >
<widget class="QListView" name="selectedLV" >
<property name="editTriggers" >
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="addPB" >
<property name="text" >
<string>A&amp;dd</string>
</property>
</widget>
</item>
<item rowspan="5" row="1" column="0" >
<widget class="QListView" name="availableLV" >
<property name="editTriggers" >
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="selmodL" >
<property name="text" >
<string>S&amp;elected:</string>
</property>
<property name="buddy" >
<cstring>selectedLV</cstring>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="availmodL" >
<property name="text" >
<string>A&amp;vailable:</string>
</property>
<property name="buddy" >
<cstring>availableLV</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="4" >
<widget class="QGroupBox" name="childDocGB" >
<property name="toolTip" >
@ -182,7 +89,7 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>261</width>
<height>22</height>
@ -200,9 +107,7 @@
<item row="0" column="3" >
<widget class="QPushButton" name="layoutPB" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -239,12 +144,12 @@
</property>
<item rowspan="2" row="0" column="1" >
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="defaultOptionsLE" >
<property name="toolTip" >
@ -289,13 +194,6 @@
<tabstop>classCO</tabstop>
<tabstop>optionsLE</tabstop>
<tabstop>psdriverCO</tabstop>
<tabstop>availableLV</tabstop>
<tabstop>addPB</tabstop>
<tabstop>deletePB</tabstop>
<tabstop>upPB</tabstop>
<tabstop>downPB</tabstop>
<tabstop>selectedLV</tabstop>
<tabstop>infoML</tabstop>
</tabstops>
<includes>
<include location="local" >qt_i18n.h</include>

View File

@ -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