void BulletsModule::setCurrentBullet(int font, int character)
{
- lyxerr << "set current bullet " << std::endl;
tmpbulletset = true;
tmpbullet.setFont(font);
tmpbullet.setCharacter(character);
+2003-03-29 John Levon <levon@movementarian.org>
+
+ * QDocument.C:
+ * QDocumentDialog.C:
+ * QDocumentDialog.h:
+ * ui/NumberingModuleBase.ui: feedback for numbering
+
+ * ui/TextLayoutModuleBase.ui: relayout
+
2003-03-29 John Levon <levon@movementarian.org>
* BulletsModule.h:
#include <qradiobutton.h>
#include <qcombobox.h>
#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <qslider.h>
#include <qlineedit.h>
#include <qstringlist.h>
#include "lengthcombo.h"
params.language = languages.getLanguage(lang_[pos]);
// numbering
- params.tocdepth =
- dialog_->numberingModule->tocDepthSB->value();
- params.secnumdepth =
- dialog_->numberingModule->sectionnrDepthSB->value();
+ params.tocdepth = dialog_->numberingModule->tocSL->value();
+ params.secnumdepth = dialog_->numberingModule->depthSL->value();
// bullets
params.user_defined_bullets[0] = dialog_->bulletsModule->getBullet(0);
}
// numbering
- dialog_->numberingModule->tocDepthSB->setValue(
- params.tocdepth);
- dialog_->numberingModule->sectionnrDepthSB->setValue(
- params.secnumdepth);
+ dialog_->numberingModule->tocSL->setValue(params.tocdepth);
+ dialog_->numberingModule->depthSL->setValue(params.secnumdepth);
+ dialog_->updateNumbering();
// bullets
dialog_->bulletsModule->setBullet(0,params.user_defined_bullets[0]);
#include <qcombobox.h>
#include <qradiobutton.h>
#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <qslider.h>
#include "lengthcombo.h"
docPS->addPanel(pageLayoutModule, _("Page Layout"));
docPS->addPanel(marginsModule, _("Page Margins"));
docPS->addPanel(langModule, _("Language"));
- docPS->addPanel(numberingModule, _("Table of Contents"));
+ docPS->addPanel(numberingModule, _("Numbering & TOC"));
docPS->addPanel(biblioModule, _("Bibliography"));
docPS->addPanel(mathsModule, _("Math options"));
docPS->addPanel(floatModule, _("Float Placement"));
connect(langModule->encodingCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
connect(langModule->quoteStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
// numbering
- connect(numberingModule->sectionnrDepthSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
- connect(numberingModule->tocDepthSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
+ connect(numberingModule->depthSL, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
+ connect(numberingModule->tocSL, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
+ connect(numberingModule->depthSL, SIGNAL(valueChanged(int)), this, SLOT(updateNumbering()));
+ connect(numberingModule->tocSL, SIGNAL(valueChanged(int)), this, SLOT(updateNumbering()));
+ numberingModule->tocLV->setSorting(-1);
// maths
connect(mathsModule->amsCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
connect(mathsModule->amsautoCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
}
}
}
+
+
+void QDocumentDialog::updateNumbering()
+{
+ int const depth = numberingModule->depthSL->value();
+ int const toc = numberingModule->tocSL->value();
+ QListViewItem * partitem = numberingModule->tocLV->firstChild();
+ QListViewItem * chapteritem = partitem->nextSibling();
+ QListViewItem * sectionitem = chapteritem->nextSibling();
+ QListViewItem * subsectionitem = sectionitem->nextSibling();
+ QListViewItem * subsubsectionitem = subsectionitem->nextSibling();
+ QListViewItem * paragraphitem = subsubsectionitem->nextSibling();
+ QListViewItem * subparagraphitem = paragraphitem->nextSibling();
+
+ QString const no = qt_("No");
+ QString const yes = qt_("Yes");
+
+ //numberingModule->tocLV->setUpdatesEnabled(false);
+
+ partitem->setText(1, yes);
+ chapteritem->setText(1, yes);
+ sectionitem->setText(1, yes);
+ subsectionitem->setText(1, yes);
+ subsubsectionitem->setText(1, yes);
+ paragraphitem->setText(1, yes);
+ subparagraphitem->setText(1, yes);
+ partitem->setText(2, yes);
+ chapteritem->setText(2, yes);
+ sectionitem->setText(2, yes);
+ subsectionitem->setText(2, yes);
+ subsubsectionitem->setText(2, yes);
+ paragraphitem->setText(2, yes);
+ subparagraphitem->setText(2, yes);
+
+ // numbering
+ if (depth < -1) partitem->setText(1, no);
+ if (depth < 0) chapteritem->setText(1, no);
+ if (depth < 1) sectionitem->setText(1, no);
+ if (depth < 2) subsectionitem->setText(1, no);
+ if (depth < 3) subsubsectionitem->setText(1, no);
+ if (depth < 4) paragraphitem->setText(1, no);
+ if (depth < 5) subparagraphitem->setText(1, no);
+
+ // in toc
+ if (toc < 0) chapteritem->setText(2, no);
+ if (toc < 1) sectionitem->setText(2, no);
+ if (toc < 2) subsectionitem->setText(2, no);
+ if (toc < 3) subsubsectionitem->setText(2, no);
+ if (toc < 4) paragraphitem->setText(2, no);
+ if (toc < 5) subparagraphitem->setText(2, no);
+
+ //numberingModule->tocLV->setUpdatesEnabled(true);
+ //numberingModule->tocLV->update();
+}
void showPreamble();
public slots:
+ void updateNumbering();
void change_adaptor();
void saveDefaultClicked();
void useDefaultsClicked();
<rect>
<x>0</x>
<y>0</y>
- <width>450</width>
- <height>313</height>
+ <width>319</width>
+ <height>323</height>
</rect>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Numbering</string>
+ </property>
+ <property>
+ <name>buddy</name>
+ <cstring>depthSL</cstring>
+ </property>
+ </widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout1</cstring>
+ <cstring>Layout5</cstring>
</property>
<hbox>
<property stdset="1">
<number>6</number>
</property>
<widget>
- <class>QGroupBox</class>
+ <class>QSlider</class>
<property stdset="1">
<name>name</name>
- <cstring>GroupBox1</cstring>
+ <cstring>depthSL</cstring>
</property>
<property stdset="1">
- <name>frameShape</name>
- <enum>Box</enum>
+ <name>minValue</name>
+ <number>-2</number>
</property>
<property stdset="1">
- <name>title</name>
- <string>Numbering Depth</string>
+ <name>maxValue</name>
+ <number>5</number>
</property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>sectionnrDepthL</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>&Section:</string>
- </property>
- <property>
- <name>buddy</name>
- <cstring>sectionnrDepthSB</cstring>
- </property>
- </widget>
- <widget row="1" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>tocDepthL</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>&Table of contents:</string>
- </property>
- <property>
- <name>buddy</name>
- <cstring>tocDepthSB</cstring>
- </property>
- </widget>
- <widget row="1" column="1" >
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>tocDepthSB</cstring>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>5</number>
- </property>
- <property stdset="1">
- <name>minValue</name>
- <number>-1</number>
- </property>
- </widget>
- <widget row="0" column="1" >
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>sectionnrDepthSB</cstring>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>5</number>
- </property>
- <property stdset="1">
- <name>minValue</name>
- <number>-2</number>
- </property>
- </widget>
- <spacer row="1" column="2" >
- <property>
- <name>name</name>
- <cstring>Spacer3</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Horizontal</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
- </widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer2</cstring>
+ <property stdset="1">
+ <name>value</name>
+ <number>3</number>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
+ </widget>
</hbox>
</widget>
- <spacer>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&List in Table of Contents</string>
+ </property>
<property>
+ <name>buddy</name>
+ <cstring>tocSL</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QSlider</class>
+ <property stdset="1">
<name>name</name>
- <cstring>Spacer3_2</cstring>
+ <cstring>tocSL</cstring>
+ </property>
+ <property stdset="1">
+ <name>minValue</name>
+ <number>-1</number>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>3</number>
</property>
<property stdset="1">
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget>
+ <class>QListView</class>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Example</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Numbered</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property>
+ <name>text</name>
+ <string>Appears in TOC</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Part</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
</property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Chapter</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Section</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Subsection</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Subsubsection</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Paragraph</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Subparagraph</string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>text</name>
+ <string></string>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ <property>
+ <name>pixmap</name>
+ <pixmap></pixmap>
+ </property>
+ </item>
<property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
+ <name>name</name>
+ <cstring>tocLV</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>resizePolicy</name>
+ <enum>AutoOneFit</enum>
+ </property>
+ <property stdset="1">
+ <name>vScrollBarMode</name>
+ <enum>AlwaysOff</enum>
+ </property>
+ <property stdset="1">
+ <name>hScrollBarMode</name>
+ <enum>AlwaysOff</enum>
+ </property>
+ <property stdset="1">
+ <name>rootIsDecorated</name>
+ <bool>false</bool>
</property>
<property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
+ <name>toolTip</name>
+ <string>Example numbering and table of contents</string>
</property>
- </spacer>
+ </widget>
</vbox>
</widget>
<tabstops>
- <tabstop>sectionnrDepthSB</tabstop>
- <tabstop>tocDepthSB</tabstop>
+ <tabstop>tocSL</tabstop>
+ <tabstop>depthSL</tabstop>
+ <tabstop>tocLV</tabstop>
</tabstops>
</UI>
<rect>
<x>0</x>
<y>0</y>
- <width>441</width>
- <height>440</height>
+ <width>344</width>
+ <height>404</height>
</rect>
</property>
<property stdset="1">
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout2</cstring>
+ <cstring>Layout9</cstring>
</property>
<hbox>
<property stdset="1">
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout1</cstring>
+ <cstring>Layout8</cstring>
</property>
- <hbox>
+ <vbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
<number>6</number>
</property>
<widget>
- <class>QComboBox</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>skipCO</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
+ <cstring>Layout6</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QComboBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>skipCO</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer3_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
</widget>
<widget>
- <class>QLineEdit</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>skipLE</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
+ <cstring>Layout7</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>skipLE</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget>
+ <class>LengthCombo</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>skipLengthCO</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
</widget>
- <widget>
- <class>LengthCombo</class>
- <property stdset="1">
- <name>name</name>
- <cstring>skipLengthCO</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- </widget>
- </hbox>
+ </vbox>
</widget>
</hbox>
</widget>
</image>
</images>
<tabstops>
- <tabstop>lspacingCO</tabstop>
- <tabstop>lspacingLE</tabstop>
<tabstop>fontsCO</tabstop>
<tabstop>fontsizeCO</tabstop>
<tabstop>indentRB</tabstop>
<tabstop>skipRB</tabstop>
<tabstop>skipCO</tabstop>
<tabstop>skipLE</tabstop>
+ <tabstop>lspacingCO</tabstop>
+ <tabstop>lspacingLE</tabstop>
<tabstop>twoColumnCB</tabstop>
</tabstops>
</UI>