mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
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:
parent
f62116f224
commit
9d82588e3e
@ -906,17 +906,6 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
connect(latexModule->childDocPB, SIGNAL(clicked()),
|
connect(latexModule->childDocPB, SIGNAL(clicked()),
|
||||||
this, SLOT(browseMaster()));
|
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
|
// postscript drivers
|
||||||
for (int n = 0; tex_graphics[n][0]; ++n) {
|
for (int n = 0; tex_graphics[n][0]; ++n) {
|
||||||
QString enc = qt_(tex_graphics_gui[n]);
|
QString enc = qt_(tex_graphics_gui[n]);
|
||||||
@ -953,6 +942,21 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
connect(bulletsModule, SIGNAL(changed()),
|
connect(bulletsModule, SIGNAL(changed()),
|
||||||
this, SLOT(change_adaptor()));
|
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
|
// PDF support
|
||||||
pdfSupportModule = new UiWidget<Ui::PDFSupportUi>;
|
pdfSupportModule = new UiWidget<Ui::PDFSupportUi>;
|
||||||
|
|
||||||
@ -998,6 +1002,7 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
this, SLOT(change_adaptor()));
|
this, SLOT(change_adaptor()));
|
||||||
|
|
||||||
docPS->addPanel(latexModule, qt_("Document Class"));
|
docPS->addPanel(latexModule, qt_("Document Class"));
|
||||||
|
docPS->addPanel(modulesModule, qt_("Modules"));
|
||||||
docPS->addPanel(fontModule, qt_("Fonts"));
|
docPS->addPanel(fontModule, qt_("Fonts"));
|
||||||
docPS->addPanel(textLayoutModule, qt_("Text Layout"));
|
docPS->addPanel(textLayoutModule, qt_("Text Layout"));
|
||||||
docPS->addPanel(pageLayoutModule, qt_("Page Layout"));
|
docPS->addPanel(pageLayoutModule, qt_("Page Layout"));
|
||||||
@ -1426,9 +1431,9 @@ void GuiDocument::updateModuleInfo()
|
|||||||
//Module description
|
//Module description
|
||||||
bool const focusOnSelected = selectionManager->selectedFocused();
|
bool const focusOnSelected = selectionManager->selectedFocused();
|
||||||
QListView const * const lv =
|
QListView const * const lv =
|
||||||
focusOnSelected ? latexModule->selectedLV : latexModule->availableLV;
|
focusOnSelected ? modulesModule->selectedLV : modulesModule->availableLV;
|
||||||
if (lv->selectionModel()->selectedIndexes().isEmpty()) {
|
if (lv->selectionModel()->selectedIndexes().isEmpty()) {
|
||||||
latexModule->infoML->document()->clear();
|
modulesModule->infoML->document()->clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QModelIndex const & idx = lv->selectionModel()->currentIndex();
|
QModelIndex const & idx = lv->selectionModel()->currentIndex();
|
||||||
@ -1469,7 +1474,7 @@ void GuiDocument::updateModuleInfo()
|
|||||||
desc += _("WARNING: Some required packages are unavailable!");
|
desc += _("WARNING: Some required packages are unavailable!");
|
||||||
}
|
}
|
||||||
|
|
||||||
latexModule->infoML->document()->setPlainText(toqstr(desc));
|
modulesModule->infoML->document()->setPlainText(toqstr(desc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "ui_MarginsUi.h"
|
#include "ui_MarginsUi.h"
|
||||||
#include "ui_PreambleUi.h"
|
#include "ui_PreambleUi.h"
|
||||||
#include "ui_PDFSupportUi.h"
|
#include "ui_PDFSupportUi.h"
|
||||||
|
#include "ui_ModulesUi.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -109,6 +110,7 @@ private:
|
|||||||
UiWidget<Ui::MathsUi> *mathsModule;
|
UiWidget<Ui::MathsUi> *mathsModule;
|
||||||
UiWidget<Ui::LaTeXUi> *latexModule;
|
UiWidget<Ui::LaTeXUi> *latexModule;
|
||||||
UiWidget<Ui::PDFSupportUi> *pdfSupportModule;
|
UiWidget<Ui::PDFSupportUi> *pdfSupportModule;
|
||||||
|
UiWidget<Ui::ModulesUi> *modulesModule;
|
||||||
PreambleModule *preambleModule;
|
PreambleModule *preambleModule;
|
||||||
|
|
||||||
GuiBranches *branchesModule;
|
GuiBranches *branchesModule;
|
||||||
|
@ -260,6 +260,7 @@ UIFILES = \
|
|||||||
MarginsUi.ui \
|
MarginsUi.ui \
|
||||||
MathMatrixUi.ui \
|
MathMatrixUi.ui \
|
||||||
MathsUi.ui \
|
MathsUi.ui \
|
||||||
|
ModulesUi.ui \
|
||||||
NomenclUi.ui \
|
NomenclUi.ui \
|
||||||
NoteUi.ui \
|
NoteUi.ui \
|
||||||
NumberingUi.ui \
|
NumberingUi.ui \
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>381</width>
|
<width>379</width>
|
||||||
<height>449</height>
|
<height>255</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
@ -19,99 +19,6 @@
|
|||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</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&wn</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" >
|
|
||||||
<widget class="QPushButton" name="upPB" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Up</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" >
|
|
||||||
<widget class="QPushButton" name="deletePB" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>De&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&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&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&vailable:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>availableLV</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="4" >
|
<item row="3" column="0" colspan="4" >
|
||||||
<widget class="QGroupBox" name="childDocGB" >
|
<widget class="QGroupBox" name="childDocGB" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
@ -182,7 +89,7 @@
|
|||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0" >
|
||||||
<size>
|
<size>
|
||||||
<width>261</width>
|
<width>261</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
@ -200,9 +107,7 @@
|
|||||||
<item row="0" column="3" >
|
<item row="0" column="3" >
|
||||||
<widget class="QPushButton" name="layoutPB" >
|
<widget class="QPushButton" name="layoutPB" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy>
|
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -239,12 +144,12 @@
|
|||||||
</property>
|
</property>
|
||||||
<item rowspan="2" row="0" column="1" >
|
<item rowspan="2" row="0" column="1" >
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="defaultOptionsLE" >
|
<widget class="QLineEdit" name="defaultOptionsLE" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
@ -289,13 +194,6 @@
|
|||||||
<tabstop>classCO</tabstop>
|
<tabstop>classCO</tabstop>
|
||||||
<tabstop>optionsLE</tabstop>
|
<tabstop>optionsLE</tabstop>
|
||||||
<tabstop>psdriverCO</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>
|
</tabstops>
|
||||||
<includes>
|
<includes>
|
||||||
<include location="local" >qt_i18n.h</include>
|
<include location="local" >qt_i18n.h</include>
|
||||||
|
@ -26,6 +26,7 @@ uic LogUi.ui -o LogUi.h
|
|||||||
uic MarginsUi.ui -o MarginsUi.h
|
uic MarginsUi.ui -o MarginsUi.h
|
||||||
uic MathMatrixUi.ui -o MathMatrixUi.h
|
uic MathMatrixUi.ui -o MathMatrixUi.h
|
||||||
uic MathsUi.ui -o MathsUi.h
|
uic MathsUi.ui -o MathsUi.h
|
||||||
|
uic ModulesUi.ui -o ModulesUi.h
|
||||||
uic NoteUi.ui -o NoteUi.h
|
uic NoteUi.ui -o NoteUi.h
|
||||||
uic NumberingUi.ui -o NumberingUi.h
|
uic NumberingUi.ui -o NumberingUi.h
|
||||||
uic PageLayoutUi.ui -o PageLayoutUi.h
|
uic PageLayoutUi.ui -o PageLayoutUi.h
|
||||||
|
Loading…
Reference in New Issue
Block a user