Hi,

I finally got all my stuff to compile with the current CVS version. Here is 
my first patch. Sorry, it is pretty big, but I'd rather get everything in now 
so that I can make small incremental patches on this stuff in the future and 
can see compile breaks right away.

Note that this is not

- thoroughly tested (actually, not tested beyond "still starts up and can 
create a new document")
- not fully matched against current XForms version
- complete at all

Comments, flames, suggestions?

Kalle

P.S. Is there any way I can integrate the new files into the patch file?

-- 
Matthias Kalle Dalheimer
President & CEO/VD
Klarälvdalens Datakonsult AB
Fax +46-563-540028
Email [EMAIL PROTECTED]
<!DOCTYPE UI><UI>
<class>FormDocumentDialogBase</class>
<widget>
    <class>QDialog</class>
    <property stdset="1">
        <name>name</name>
        <cstring>FormDocumentDialogBase</cstring>
    </property>
    <property stdset="1">
        <name>geometry</name>
        <rect>
            <x>0</x>
            <y>0</y>
            <width>538</width>
            <height>437</height>
        </rect>
    </property>
    <property stdset="1">
        <name>caption</name>
        <string>Document Layout</string>
    </property>
    <vbox>
        <property stdset="1">
            <name>margin</name>
            <number>11</number>
        </property>
        <property stdset="1">
            <name>spacing</name>
            <number>6</number>
        </property>
        <widget>
            <class>QTabWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>TabWidget2</cstring>
            </property>
            <property>
                <name>layoutMargin</name>
            </property>
            <widget>
                <class>QWidget</class>
                <property stdset="1">
                    <name>name</name>
                    <cstring>Widget2</cstring>
                </property>
                <attribute>
                    <name>title</name>
                    <string>Document</string>
                </attribute>
                <hbox>
                    <property stdset="1">
                        <name>margin</name>
                        <number>11</number>
                    </property>
                    <property stdset="1">
                        <name>spacing</name>
                        <number>6</number>
                    </property>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout33</cstring>
                        </property>
                        <vbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout32</cstring>
                                </property>
                                <grid>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>0</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget row="4"  column="1" >
                                        <class>QLineEdit</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>extraOptionsED</cstring>
                                        </property>
                                    </widget>
                                    <widget row="2"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>fontsLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Fonts:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>fontsCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="1"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>pagestyleLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Pagestyle:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>pagestyleCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="5"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>defaultSkipLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>Defa&amp;ult Skip:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>defaultSkipCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="3"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>fontSizeLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>F&amp;ont Size:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>fontSizeCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="1"  column="1" >
                                        <class>QComboBox</class>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>default</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>empty</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>plain</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>headings</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>fancy</string>
                                            </property>
                                        </item>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>pagestyleCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="6"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>spacingLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>Spacin&amp;g:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>spacingCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="4"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>extraOptionsLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>E&amp;xtra Options:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>extraOptionsED</cstring>
                                        </property>
                                    </widget>
                                    <widget row="0"  column="0" >
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>classesLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Class:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>classesCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="5"  column="1" >
                                        <class>QLayoutWidget</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>Layout13</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>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>smallskip</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>medskip</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>bigskip</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>length</string>
                                                    </property>
                                                </item>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>defaultSkipCO</cstring>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>defaultSkipED</cstring>
                                                </property>
                                            </widget>
                                        </hbox>
                                    </widget>
                                    <widget row="6"  column="1" >
                                        <class>QLayoutWidget</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>Layout31</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>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>Single</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>OneHalf</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>Double</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>Other</string>
                                                    </property>
                                                </item>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>spacingCO</cstring>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>spacingED</cstring>
                                                </property>
                                            </widget>
                                        </hbox>
                                    </widget>
                                    <widget row="2"  column="1" >
                                        <class>QComboBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>fontsCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="0"  column="1" >
                                        <class>QComboBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>classesCO</cstring>
                                        </property>
                                    </widget>
                                    <widget row="3"  column="1" >
                                        <class>QComboBox</class>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>default</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>10</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>11</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>12</string>
                                            </property>
                                        </item>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>fontSizeCO</cstring>
                                        </property>
                                    </widget>
                                </grid>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer2_2</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </vbox>
                    </widget>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout52</cstring>
                        </property>
                        <vbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <widget>
                                <class>QButtonGroup</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>sidesBG</cstring>
                                </property>
                                <property stdset="1">
                                    <name>title</name>
                                    <string>Sides</string>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>11</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget>
                                        <class>QRadioButton</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>oneSideRB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>O&amp;ne</string>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QRadioButton</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>twoSidesRB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Two</string>
                                        </property>
                                    </widget>
                                </vbox>
                            </widget>
                            <widget>
                                <class>QButtonGroup</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>columnsBG</cstring>
                                </property>
                                <property stdset="1">
                                    <name>title</name>
                                    <string>Columns</string>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>11</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget>
                                        <class>QRadioButton</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>oneColumnRB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>On&amp;e</string>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QRadioButton</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>twoColumnsRB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>T&amp;wo</string>
                                        </property>
                                    </widget>
                                </vbox>
                            </widget>
                            <widget>
                                <class>QButtonGroup</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>separationBG</cstring>
                                </property>
                                <property stdset="1">
                                    <name>title</name>
                                    <string>Separation</string>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>11</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget>
                                        <class>QRadioButton</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>indentRB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Indent</string>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QRadioButton</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>skipRB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>S&amp;kip</string>
                                        </property>
                                    </widget>
                                </vbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer33</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </vbox>
                    </widget>
                </hbox>
            </widget>
            <widget>
                <class>QWidget</class>
                <property stdset="1">
                    <name>name</name>
                    <cstring>Widget3</cstring>
                </property>
                <attribute>
                    <name>title</name>
                    <string>Paper</string>
                </attribute>
                <vbox>
                    <property stdset="1">
                        <name>margin</name>
                        <number>11</number>
                    </property>
                    <property stdset="1">
                        <name>spacing</name>
                        <number>6</number>
                    </property>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer34</cstring>
                        </property>
                        <property stdset="1">
                            <name>orientation</name>
                            <enum>Vertical</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout19</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>QLabel</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>papersizeLA</cstring>
                                </property>
                                <property stdset="1">
                                    <name>text</name>
                                    <string>&amp;Papersize:</string>
                                </property>
                                <property>
                                    <name>buddy</name>
                                    <cstring>papersizeCO</cstring>
                                </property>
                            </widget>
                            <widget>
                                <class>QComboBox</class>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>Default</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>Custom</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>USletter</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>USlegal</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>USexecutive</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>A3</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>A5</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>B3</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>B4</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>B5</string>
                                    </property>
                                </item>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>papersizeCO</cstring>
                                </property>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer5</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLabel</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>specialLA</cstring>
                                </property>
                                <property stdset="1">
                                    <name>text</name>
                                    <string>&amp;Special:</string>
                                </property>
                                <property>
                                    <name>buddy</name>
                                    <cstring>specialCO</cstring>
                                </property>
                            </widget>
                            <widget>
                                <class>QComboBox</class>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>None</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>A4 small Margins (only 
portrait)</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>A4 very small Margins (only 
portrait)</string>
                                    </property>
                                </item>
                                <item>
                                    <property>
                                        <name>text</name>
                                        <string>A4 very wide margins (only 
portrait)</string>
                                    </property>
                                </item>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>specialCO</cstring>
                                </property>
                            </widget>
                        </hbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer35</cstring>
                        </property>
                        <property stdset="1">
                            <name>orientation</name>
                            <enum>Vertical</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout23</cstring>
                        </property>
                        <hbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer6</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QCheckBox</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>CheckBox1</cstring>
                                </property>
                                <property stdset="1">
                                    <name>text</name>
                                    <string>&amp;Use Geometry Package</string>
                                </property>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer7</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </hbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer36</cstring>
                        </property>
                        <property stdset="1">
                            <name>orientation</name>
                            <enum>Vertical</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout22</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>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout20</cstring>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>0</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget>
                                        <class>QButtonGroup</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>orientationBG</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>title</name>
                                            <string>Orientation</string>
                                        </property>
                                        <vbox>
                                            <property stdset="1">
                                                <name>margin</name>
                                                <number>11</number>
                                            </property>
                                            <property stdset="1">
                                                <name>spacing</name>
                                                <number>6</number>
                                            </property>
                                            <widget>
                                                <class>QRadioButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>portraitRB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>P&amp;ortrait</string>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QRadioButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>landscapeRB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Landscape</string>
                                                </property>
                                            </widget>
                                        </vbox>
                                    </widget>
                                    <widget>
                                        <class>QGroupBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>marginsGB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>title</name>
                                            <string>Margins</string>
                                        </property>
                                        <grid>
                                            <property stdset="1">
                                                <name>margin</name>
                                                <number>11</number>
                                            </property>
                                            <property stdset="1">
                                                <name>spacing</name>
                                                <number>6</number>
                                            </property>
                                            <widget row="3"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginRightLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Right:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>marginRightED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="2"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginLeftED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="1"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginBottomED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="3"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginRightED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="1"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginBottomLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Bottom:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>marginBottomED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="0"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginTopED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="2"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginLeftL</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>L&amp;eft:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>marginLeftED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="0"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>marginTopLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Top:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>marginTopED</cstring>
                                                </property>
                                            </widget>
                                        </grid>
                                    </widget>
                                </vbox>
                            </widget>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout21</cstring>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>0</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget>
                                        <class>QGroupBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>customPapersizeGB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>title</name>
                                            <string>Custom Papersize</string>
                                        </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>customWidthLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Width:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>customWidthED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="0"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>customWidthED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="1"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>customHeightED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="1"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>customHeightLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Height:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>customHeightED</cstring>
                                                </property>
                                            </widget>
                                        </grid>
                                    </widget>
                                    <widget>
                                        <class>QGroupBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>headsepBG</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>title</name>
                                            <string>Foot/Head Margins</string>
                                        </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="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>headheightED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="1"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>headsepED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="2"  column="1" >
                                                <class>QLineEdit</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>footskipED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="2"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>footskipLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Footskip:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>footskipED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="1"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>headsepLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>Hea&amp;dsep:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>headsepED</cstring>
                                                </property>
                                            </widget>
                                            <widget row="0"  column="0" >
                                                <class>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>headheightLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>Headhe&amp;ight:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>headheightED</cstring>
                                                </property>
                                            </widget>
                                        </grid>
                                    </widget>
                                </vbox>
                            </widget>
                        </hbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer37</cstring>
                        </property>
                        <property stdset="1">
                            <name>orientation</name>
                            <enum>Vertical</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                </vbox>
            </widget>
            <widget>
                <class>QWidget</class>
                <property stdset="1">
                    <name>name</name>
                    <cstring>Widget4</cstring>
                </property>
                <attribute>
                    <name>title</name>
                    <string>Language</string>
                </attribute>
                <hbox>
                    <property stdset="1">
                        <name>margin</name>
                        <number>11</number>
                    </property>
                    <property stdset="1">
                        <name>spacing</name>
                        <number>6</number>
                    </property>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer10</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout53</cstring>
                        </property>
                        <vbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer12</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout26</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>languageLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Language:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>languageCO</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QComboBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>languageCO</cstring>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer38</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout27</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>encodingLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>Enco&amp;ding:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>encodingCO</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QComboBox</class>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>default</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>auto</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>latin1</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>latin2</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>latin5</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>koi8-r</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>koi8-u</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>cp866</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>cp1251</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>iso88595</string>
                                            </property>
                                        </item>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>encodingCO</cstring>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer9</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QButtonGroup</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>quoteStyleBG</cstring>
                                </property>
                                <property stdset="1">
                                    <name>title</name>
                                    <string>Quote Style</string>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>11</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <widget>
                                        <class>QLayoutWidget</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>Layout28</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>QLabel</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>quoteStyleTypeLA</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Type:</string>
                                                </property>
                                                <property>
                                                    <name>buddy</name>
                                                    <cstring>quoteStyleTypeCO</cstring>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QComboBox</class>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>``text''</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>''text''</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>,,text``</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>,,text''</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>«text»</string>
                                                    </property>
                                                </item>
                                                <item>
                                                    <property>
                                                        <name>text</name>
                                                        <string>»text«</string>
                                                    </property>
                                                </item>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>quoteStyleTypeCO</cstring>
                                                </property>
                                            </widget>
                                        </hbox>
                                    </widget>
                                    <widget>
                                        <class>QLayoutWidget</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>Layout29</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>QRadioButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    
<cstring>quoteStyleSingleRB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Single</string>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QRadioButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    
<cstring>quoteStyleDoubleRB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;Double</string>
                                                </property>
                                            </widget>
                                        </hbox>
                                    </widget>
                                </vbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer13</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </vbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer11</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                </hbox>
            </widget>
            <widget>
                <class>QWidget</class>
                <property stdset="1">
                    <name>name</name>
                    <cstring>Widget5</cstring>
                </property>
                <attribute>
                    <name>title</name>
                    <string>Extra</string>
                </attribute>
                <hbox>
                    <property stdset="1">
                        <name>margin</name>
                        <number>11</number>
                    </property>
                    <property stdset="1">
                        <name>spacing</name>
                        <number>6</number>
                    </property>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer24</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout39</cstring>
                        </property>
                        <vbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer18</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout33</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>TextLabel28</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>F&amp;loat Placement:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>floatPlacementED</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QLineEdit</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>floatPlacementED</cstring>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer14</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout34</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>sectionNumberDepthLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>S&amp;ection number depth:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>sectionNumberDepthSB</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QSpinBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>sectionNumberDepthSB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>minValue</name>
                                            <number>-2</number>
                                        </property>
                                        <property stdset="1">
                                            <name>maxValue</name>
                                            <number>5</number>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer15</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout35</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>tocDepthLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;Table of contents 
depth:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>tocDepthSB</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QSpinBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>tocDepthSB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>minValue</name>
                                            <number>-1</number>
                                        </property>
                                        <property stdset="1">
                                            <name>maxValue</name>
                                            <number>5</number>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer16</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout36</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>psDriverLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>P&amp;S Driver:</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>psDriverCO</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QComboBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>psDriverCO</cstring>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer17</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout38</cstring>
                                </property>
                                <hbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>0</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <spacer>
                                        <property>
                                            <name>name</name>
                                            <cstring>Spacer23</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>
                                        <property>
                                            <name>sizeHint</name>
                                            <size>
                                                <width>20</width>
                                                <height>20</height>
                                            </size>
                                        </property>
                                    </spacer>
                                    <widget>
                                        <class>QCheckBox</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>amsMathCB</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>Use A&amp;MS Math</string>
                                        </property>
                                    </widget>
                                    <spacer>
                                        <property>
                                            <name>name</name>
                                            <cstring>Spacer22</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>
                                        <property>
                                            <name>sizeHint</name>
                                            <size>
                                                <width>20</width>
                                                <height>20</height>
                                            </size>
                                        </property>
                                    </spacer>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer19</cstring>
                                </property>
                                <property stdset="1">
                                    <name>orientation</name>
                                    <enum>Vertical</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </vbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer25</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                </hbox>
            </widget>
            <widget>
                <class>QWidget</class>
                <property stdset="1">
                    <name>name</name>
                    <cstring>Widget6</cstring>
                </property>
                <attribute>
                    <name>title</name>
                    <string>Bullets</string>
                </attribute>
                <vbox>
                    <property stdset="1">
                        <name>margin</name>
                        <number>6</number>
                    </property>
                    <property stdset="1">
                        <name>spacing</name>
                        <number>-1</number>
                    </property>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout51</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>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout48</cstring>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>0</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <spacer>
                                        <property>
                                            <name>name</name>
                                            <cstring>Spacer31</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>orientation</name>
                                            <enum>Vertical</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>
                                        <property>
                                            <name>sizeHint</name>
                                            <size>
                                                <width>20</width>
                                                <height>20</height>
                                            </size>
                                        </property>
                                    </spacer>
                                    <widget>
                                        <class>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>bulletSizeLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>Si&amp;ze</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>bulletSizeCO</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QComboBox</class>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>default</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>tiny</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>script</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>footnote</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>small</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>normal</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>large</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>Large</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>LARGE</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>huge</string>
                                            </property>
                                        </item>
                                        <item>
                                            <property>
                                                <name>text</name>
                                                <string>Huge</string>
                                            </property>
                                        </item>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>bulletSizeCO</cstring>
                                        </property>
                                    </widget>
                                </vbox>
                            </widget>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout50</cstring>
                                </property>
                                <vbox>
                                    <property stdset="1">
                                        <name>margin</name>
                                        <number>0</number>
                                    </property>
                                    <property stdset="1">
                                        <name>spacing</name>
                                        <number>6</number>
                                    </property>
                                    <spacer>
                                        <property>
                                            <name>name</name>
                                            <cstring>Spacer32</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>orientation</name>
                                            <enum>Vertical</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>
                                        <property>
                                            <name>sizeHint</name>
                                            <size>
                                                <width>20</width>
                                                <height>20</height>
                                            </size>
                                        </property>
                                    </spacer>
                                    <widget>
                                        <class>QButtonGroup</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>bulletDepthBG</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>title</name>
                                            <string>Bullet Depth</string>
                                        </property>
                                        <property stdset="1">
                                            <name>exclusive</name>
                                            <bool>true</bool>
                                        </property>
                                        <hbox>
                                            <property stdset="1">
                                                <name>margin</name>
                                                <number>11</number>
                                            </property>
                                            <property stdset="1">
                                                <name>spacing</name>
                                                <number>6</number>
                                            </property>
                                            <widget>
                                                <class>QToolButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>bulletDepth1PB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;1</string>
                                                </property>
                                                <property stdset="1">
                                                    <name>toggleButton</name>
                                                    <bool>true</bool>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QToolButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>bulletDepth2PB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;2</string>
                                                </property>
                                                <property stdset="1">
                                                    <name>toggleButton</name>
                                                    <bool>true</bool>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QToolButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>bulletDepth3PB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;3</string>
                                                </property>
                                                <property stdset="1">
                                                    <name>toggleButton</name>
                                                    <bool>true</bool>
                                                </property>
                                            </widget>
                                            <widget>
                                                <class>QToolButton</class>
                                                <property stdset="1">
                                                    <name>name</name>
                                                    <cstring>bulletDepth4PB</cstring>
                                                </property>
                                                <property stdset="1">
                                                    <name>text</name>
                                                    <string>&amp;4</string>
                                                </property>
                                                <property stdset="1">
                                                    <name>toggleButton</name>
                                                    <bool>true</bool>
                                                </property>
                                            </widget>
                                        </hbox>
                                    </widget>
                                </vbox>
                            </widget>
                        </hbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer1</cstring>
                        </property>
                        <property stdset="1">
                            <name>orientation</name>
                            <enum>Vertical</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout47</cstring>
                        </property>
                        <hbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer27</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QButtonGroup</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>bulletTypeBG</cstring>
                                </property>
                                <property stdset="1">
                                    <name>title</name>
                                    <string></string>
                                </property>
                                <property stdset="1">
                                    <name>frameShape</name>
                                    <enum>NoFrame</enum>
                                </property>
                                <property stdset="1">
                                    <name>radioButtonExclusive</name>
                                    <bool>false</bool>
                                </property>
                                <property>
                                    <name>layoutSpacing</name>
                                </property>
                                <spacer>
                                    <property>
                                        <name>name</name>
                                        <cstring>Spacer26</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>77</x>
                                            <y>12</y>
                                            <width>20</width>
                                            <height>20</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>orientation</name>
                                        <enum>Horizontal</enum>
                                    </property>
                                    <property stdset="1">
                                        <name>sizeType</name>
                                        <enum>Fixed</enum>
                                    </property>
                                    <property>
                                        <name>sizeHint</name>
                                        <size>
                                            <width>20</width>
                                            <height>20</height>
                                        </size>
                                    </property>
                                    <property>
                                        <name>sizeHint</name>
                                        <size>
                                            <width>20</width>
                                            <height>20</height>
                                        </size>
                                    </property>
                                </spacer>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet01PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>121</x>
                                            <y>11</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet02PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>144</x>
                                            <y>11</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet03PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>167</x>
                                            <y>11</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet04PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>190</x>
                                            <y>11</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet10PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>98</x>
                                            <y>33</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet11PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>121</x>
                                            <y>33</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet12PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>144</x>
                                            <y>33</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet13PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>167</x>
                                            <y>33</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet14PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>190</x>
                                            <y>33</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet15PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>213</x>
                                            <y>33</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet21PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>121</x>
                                            <y>55</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet20PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>98</x>
                                            <y>55</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet22PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>144</x>
                                            <y>55</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet23PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>167</x>
                                            <y>55</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet24PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>190</x>
                                            <y>55</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet25PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>213</x>
                                            <y>55</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet30PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>98</x>
                                            <y>77</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet31PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>121</x>
                                            <y>77</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet32PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>144</x>
                                            <y>77</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet33PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>167</x>
                                            <y>77</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet34PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>190</x>
                                            <y>77</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet35PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>213</x>
                                            <y>77</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet42PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>144</x>
                                            <y>99</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet43PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>167</x>
                                            <y>99</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet44PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>190</x>
                                            <y>99</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet45PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>213</x>
                                            <y>99</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet50PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>98</x>
                                            <y>121</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet51PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>121</x>
                                            <y>121</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet52PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>144</x>
                                            <y>121</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet53PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>167</x>
                                            <y>121</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet54PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>190</x>
                                            <y>121</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet55PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>213</x>
                                            <y>121</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet05PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>213</x>
                                            <y>11</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet00PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>98</x>
                                            <y>11</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bulletDing3PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>11</x>
                                            <y>99</y>
                                            <width>66</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string>Di&amp;ng 3</string>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bulletDing4PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>11</x>
                                            <y>121</y>
                                            <width>66</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string>Din&amp;g 4</string>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet40PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>98</x>
                                            <y>99</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bullet41PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>121</x>
                                            <y>99</y>
                                            <width>23</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string></string>
                                    </property>
                                    <property stdset="1">
                                        <name>sizePolicy</name>
                                        <sizepolicy>
                                            <hsizetype>0</hsizetype>
                                            <vsizetype>0</vsizetype>
                                        </sizepolicy>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bulletStandardPB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>11</x>
                                            <y>11</y>
                                            <width>66</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string>&amp;Standard</string>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bulletMathsPB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>11</x>
                                            <y>33</y>
                                            <width>66</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string>&amp;Maths</string>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bulletDing1PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>11</x>
                                            <y>55</y>
                                            <width>66</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string>&amp;Ding 1</string>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                                <widget>
                                    <class>QToolButton</class>
                                    <property stdset="1">
                                        <name>name</name>
                                        <cstring>bulletDing2PB</cstring>
                                    </property>
                                    <property stdset="1">
                                        <name>geometry</name>
                                        <rect>
                                            <x>11</x>
                                            <y>77</y>
                                            <width>66</width>
                                            <height>22</height>
                                        </rect>
                                    </property>
                                    <property stdset="1">
                                        <name>text</name>
                                        <string>D&amp;ing 2</string>
                                    </property>
                                    <property stdset="1">
                                        <name>toggleButton</name>
                                        <bool>true</bool>
                                    </property>
                                </widget>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer28</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </hbox>
                    </widget>
                    <spacer>
                        <property>
                            <name>name</name>
                            <cstring>Spacer2</cstring>
                        </property>
                        <property stdset="1">
                            <name>orientation</name>
                            <enum>Vertical</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>
                        <property>
                            <name>sizeHint</name>
                            <size>
                                <width>20</width>
                                <height>20</height>
                            </size>
                        </property>
                    </spacer>
                    <widget>
                        <class>QLayoutWidget</class>
                        <property stdset="1">
                            <name>name</name>
                            <cstring>Layout45</cstring>
                        </property>
                        <hbox>
                            <property stdset="1">
                                <name>margin</name>
                                <number>0</number>
                            </property>
                            <property stdset="1">
                                <name>spacing</name>
                                <number>6</number>
                            </property>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer29</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                            <widget>
                                <class>QLayoutWidget</class>
                                <property stdset="1">
                                    <name>name</name>
                                    <cstring>Layout42</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>QLabel</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>latexLA</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>text</name>
                                            <string>&amp;LaTeX</string>
                                        </property>
                                        <property>
                                            <name>buddy</name>
                                            <cstring>latexED</cstring>
                                        </property>
                                    </widget>
                                    <widget>
                                        <class>QLineEdit</class>
                                        <property stdset="1">
                                            <name>name</name>
                                            <cstring>latexED</cstring>
                                        </property>
                                        <property stdset="1">
                                            <name>maxLength</name>
                                            <number>80</number>
                                        </property>
                                    </widget>
                                </hbox>
                            </widget>
                            <spacer>
                                <property>
                                    <name>name</name>
                                    <cstring>Spacer30</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>
                                <property>
                                    <name>sizeHint</name>
                                    <size>
                                        <width>20</width>
                                        <height>20</height>
                                    </size>
                                </property>
                            </spacer>
                        </hbox>
                    </widget>
                </vbox>
            </widget>
        </widget>
        <widget>
            <class>QLabel</class>
            <property stdset="1">
                <name>name</name>
                <cstring>warningLA</cstring>
            </property>
            <property stdset="1">
                <name>text</name>
                <string></string>
            </property>
            <property stdset="1">
                <name>font</name>
                <font>
                    <bold>1</bold>
                </font>
            </property>
            <property stdset="1">
                <name>palette</name>
                <palette>
                    <active>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>220</red>
                            <green>220</green>
                            <blue>220</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>237</red>
                            <green>237</green>
                            <blue>237</blue>
                        </color>
                        <color>
                            <red>110</red>
                            <green>110</green>
                            <blue>110</blue>
                        </color>
                        <color>
                            <red>146</red>
                            <green>146</green>
                            <blue>146</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>220</red>
                            <green>220</green>
                            <blue>220</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>128</green>
                            <blue>128</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                    </active>
                    <disabled>
                        <color>
                            <red>128</red>
                            <green>128</green>
                            <blue>128</blue>
                        </color>
                        <color>
                            <red>220</red>
                            <green>220</green>
                            <blue>220</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>253</red>
                            <green>253</green>
                            <blue>253</blue>
                        </color>
                        <color>
                            <red>110</red>
                            <green>110</green>
                            <blue>110</blue>
                        </color>
                        <color>
                            <red>146</red>
                            <green>146</green>
                            <blue>146</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>128</red>
                            <green>128</green>
                            <blue>128</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>220</red>
                            <green>220</green>
                            <blue>220</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>128</green>
                            <blue>128</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                    </disabled>
                    <inactive>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>220</red>
                            <green>220</green>
                            <blue>220</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>253</red>
                            <green>253</green>
                            <blue>253</blue>
                        </color>
                        <color>
                            <red>110</red>
                            <green>110</green>
                            <blue>110</blue>
                        </color>
                        <color>
                            <red>146</red>
                            <green>146</green>
                            <blue>146</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                        <color>
                            <red>220</red>
                            <green>220</green>
                            <blue>220</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>0</green>
                            <blue>0</blue>
                        </color>
                        <color>
                            <red>0</red>
                            <green>128</green>
                            <blue>128</blue>
                        </color>
                        <color>
                            <red>255</red>
                            <green>255</green>
                            <blue>255</blue>
                        </color>
                    </inactive>
                </palette>
            </property>
            <property stdset="1">
                <name>alignment</name>
                <set>AlignCenter</set>
            </property>
            <property>
                <name>hAlign</name>
            </property>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout54</cstring>
            </property>
            <hbox>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer39</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>
                    <property>
                        <name>sizeHint</name>
                        <size>
                            <width>20</width>
                            <height>20</height>
                        </size>
                    </property>
                </spacer>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>restorePB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Restore</string>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>okPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>OK</string>
                    </property>
                    <property stdset="1">
                        <name>default</name>
                        <bool>true</bool>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>applyPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Apply</string>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>cancelPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Close</string>
                    </property>
                </widget>
            </hbox>
        </widget>
    </vbox>
</widget>
<connections>
    <connection>
        <sender>okPB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotOK()</slot>
    </connection>
    <connection>
        <sender>restorePB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotRestore()</slot>
    </connection>
    <connection>
        <sender>specialCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotSpecialPaperPackage(int)</slot>
    </connection>
    <connection>
        <sender>orientationBG</sender>
        <signal>clicked(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotOrientation(int)</slot>
    </connection>
    <connection>
        <sender>papersizeCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotPapersize(int)</slot>
    </connection>
    <connection>
        <sender>CheckBox1</sender>
        <signal>toggled(bool)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotUseGeometryPackage(bool)</slot>
    </connection>
    <connection>
        <sender>customWidthED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotWidth(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>customHeightED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotHeight(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>marginTopED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotMarginTop(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>marginBottomED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotMarginBottom(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>marginLeftED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotMarginLeft(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>marginRightED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotMarginRight(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>headheightED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotHeadheight(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>headsepED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotHeadsep(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>footskipED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotFootskip(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>classesCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotClass(int)</slot>
    </connection>
    <connection>
        <sender>pagestyleCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotPageStyle(int)</slot>
    </connection>
    <connection>
        <sender>fontsCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotFont(int)</slot>
    </connection>
    <connection>
        <sender>fontSizeCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotFontSize(int)</slot>
    </connection>
    <connection>
        <sender>extraOptionsED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotExtraOptions(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>defaultSkipCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotDefaultSkip(int)</slot>
    </connection>
    <connection>
        <sender>defaultSkipED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotDefaultSkip(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>spacingCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotSpacing(int)</slot>
    </connection>
    <connection>
        <sender>spacingED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotSpacing(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>sidesBG</sender>
        <signal>clicked(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotSides(int)</slot>
    </connection>
    <connection>
        <sender>columnsBG</sender>
        <signal>clicked(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotColumns(int)</slot>
    </connection>
    <connection>
        <sender>separationBG</sender>
        <signal>clicked(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotSeparation(int)</slot>
    </connection>
    <connection>
        <sender>languageCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotLanguage(int)</slot>
    </connection>
    <connection>
        <sender>encodingCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotEncoding(int)</slot>
    </connection>
    <connection>
        <sender>quoteStyleTypeCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotQuoteStyle(int)</slot>
    </connection>
    <connection>
        <sender>quoteStyleBG</sender>
        <signal>clicked(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotQuoteStyle(int)</slot>
    </connection>
    <connection>
        <sender>floatPlacementED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotFloatPlacement(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>sectionNumberDepthSB</sender>
        <signal>valueChanged(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotSectionNumberDepth(int)</slot>
    </connection>
    <connection>
        <sender>tocDepthSB</sender>
        <signal>valueChanged(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotTOCDepth(int)</slot>
    </connection>
    <connection>
        <sender>psDriverCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotPSDriver(int)</slot>
    </connection>
    <connection>
        <sender>amsMathCB</sender>
        <signal>toggled(bool)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotAMSMath(bool)</slot>
    </connection>
    <connection>
        <sender>applyPB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotApply()</slot>
    </connection>
    <connection>
        <sender>cancelPB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotClose()</slot>
    </connection>
    <connection>
        <sender>latexED</sender>
        <signal>textChanged(const QString&amp;)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletLaTeX(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>bulletStandardPB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletStandard()</slot>
    </connection>
    <connection>
        <sender>bulletMathsPB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletMaths()</slot>
    </connection>
    <connection>
        <sender>bulletDing1PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDing1()</slot>
    </connection>
    <connection>
        <sender>bulletDing2PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDing2()</slot>
    </connection>
    <connection>
        <sender>bulletDing3PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDing3()</slot>
    </connection>
    <connection>
        <sender>bulletDing4PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDing4()</slot>
    </connection>
    <connection>
        <sender>bulletTypeBG</sender>
        <signal>clicked(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletSymbol(int)</slot>
    </connection>
    <connection>
        <sender>bulletSizeCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletSize(int)</slot>
    </connection>
    <connection>
        <sender>bulletDepth1PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDepth1()</slot>
    </connection>
    <connection>
        <sender>bulletDepth2PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDepth2()</slot>
    </connection>
    <connection>
        <sender>bulletDepth3PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDing3()</slot>
    </connection>
    <connection>
        <sender>bulletDepth4PB</sender>
        <signal>clicked()</signal>
        <receiver>FormDocumentDialogBase</receiver>
        <slot>slotBulletDepth4()</slot>
    </connection>
    <slot access="public">slotAMSMath(bool)</slot>
    <slot access="public">slotApply()</slot>
    <slot access="public">slotBulletDepth1()</slot>
    <slot access="public">slotBulletDepth2()</slot>
    <slot access="public">slotBulletDepth3()</slot>
    <slot access="public">slotBulletDepth4()</slot>
    <slot access="public">slotBulletDing1()</slot>
    <slot access="public">slotBulletDing2()</slot>
    <slot access="public">slotBulletDing3()</slot>
    <slot access="public">slotBulletDing4()</slot>
    <slot access="public">slotBulletLaTeX(const QString&amp;)</slot>
    <slot access="public">slotBulletMaths()</slot>
    <slot access="public">slotBulletSize(int)</slot>
    <slot access="public">slotBulletStandard()</slot>
    <slot access="public">slotBulletSymbol(int)</slot>
    <slot access="public">slotClass(int)</slot>
    <slot access="public">slotClose()</slot>
    <slot access="public">slotColumns(int)</slot>
    <slot access="public">slotDefaultSkip(const QString&amp;)</slot>
    <slot access="public">slotDefaultSkip(int)</slot>
    <slot access="public">slotEncoding(int)</slot>
    <slot access="public">slotExtraOptions(const QString&amp;)</slot>
    <slot access="public">slotFloatPlacement(const QString&amp;)</slot>
    <slot access="public">slotFont(int)</slot>
    <slot access="public">slotFontSize(int)</slot>
    <slot access="public">slotFootskip(const QString&amp;)</slot>
    <slot access="public">slotHeadheight(const QString&amp;)</slot>
    <slot access="public">slotHeadsep(const QString&amp;)</slot>
    <slot access="public">slotHeight(const QString&amp;)</slot>
    <slot access="public">slotLanguage(int)</slot>
    <slot access="public">slotMarginBottom(const QString&amp;)</slot>
    <slot access="public">slotMarginLeft(const QString&amp;)</slot>
    <slot access="public">slotMarginRight(const QString&amp;)</slot>
    <slot access="public">slotMarginTop(const QString&amp;)</slot>
    <slot access="public">slotOK()</slot>
    <slot access="public">slotOrientation(int)</slot>
    <slot access="public">slotPSDriver(int)</slot>
    <slot access="public">slotPageStyle(int)</slot>
    <slot access="public">slotPapersize(int)</slot>
    <slot access="public">slotQuoteStyle(int)</slot>
    <slot access="public">slotQuoteType(int)</slot>
    <slot access="public">slotRestore()</slot>
    <slot access="public">slotSectionNumberDepth(int)</slot>
    <slot access="public">slotSeparation(int)</slot>
    <slot access="public">slotSides(int)</slot>
    <slot access="public">slotSpacing(const QString&amp;)</slot>
    <slot access="public">slotSpacing(int)</slot>
    <slot access="public">slotSpecialPaperPackage(int)</slot>
    <slot access="public">slotTOCDepth(int)</slot>
    <slot access="public">slotUseGeometryPackage(bool)</slot>
    <slot access="public">slotWidth(const QString&amp;)</slot>
</connections>
<tabstops>
    <tabstop>classesCO</tabstop>
    <tabstop>pagestyleCO</tabstop>
    <tabstop>fontsCO</tabstop>
    <tabstop>fontSizeCO</tabstop>
    <tabstop>extraOptionsED</tabstop>
    <tabstop>defaultSkipCO</tabstop>
    <tabstop>defaultSkipED</tabstop>
    <tabstop>spacingCO</tabstop>
    <tabstop>spacingED</tabstop>
    <tabstop>oneSideRB</tabstop>
    <tabstop>twoSidesRB</tabstop>
    <tabstop>oneColumnRB</tabstop>
    <tabstop>twoColumnsRB</tabstop>
    <tabstop>indentRB</tabstop>
    <tabstop>skipRB</tabstop>
    <tabstop>papersizeCO</tabstop>
    <tabstop>specialCO</tabstop>
    <tabstop>CheckBox1</tabstop>
    <tabstop>portraitRB</tabstop>
    <tabstop>landscapeRB</tabstop>
    <tabstop>marginTopED</tabstop>
    <tabstop>marginBottomED</tabstop>
    <tabstop>marginLeftED</tabstop>
    <tabstop>marginRightED</tabstop>
    <tabstop>customWidthED</tabstop>
    <tabstop>customHeightED</tabstop>
    <tabstop>headheightED</tabstop>
    <tabstop>headsepED</tabstop>
    <tabstop>footskipED</tabstop>
    <tabstop>languageCO</tabstop>
    <tabstop>encodingCO</tabstop>
    <tabstop>quoteStyleTypeCO</tabstop>
    <tabstop>quoteStyleSingleRB</tabstop>
    <tabstop>quoteStyleDoubleRB</tabstop>
    <tabstop>floatPlacementED</tabstop>
    <tabstop>sectionNumberDepthSB</tabstop>
    <tabstop>tocDepthSB</tabstop>
    <tabstop>psDriverCO</tabstop>
    <tabstop>amsMathCB</tabstop>
    <tabstop>bulletSizeCO</tabstop>
    <tabstop>latexED</tabstop>
    <tabstop>restorePB</tabstop>
    <tabstop>okPB</tabstop>
    <tabstop>applyPB</tabstop>
    <tabstop>cancelPB</tabstop>
    <tabstop>TabWidget2</tabstop>
</tabstops>
</UI>
<!DOCTYPE UI><UI>
<class>FormCitationDialogBase</class>
<widget>
    <class>QDialog</class>
    <property stdset="1">
        <name>name</name>
        <cstring>FormCitationDialogBase</cstring>
    </property>
    <property stdset="1">
        <name>geometry</name>
        <rect>
            <x>0</x>
            <y>0</y>
            <width>425</width>
            <height>491</height>
        </rect>
    </property>
    <property stdset="1">
        <name>caption</name>
        <string>Citation</string>
    </property>
    <vbox>
        <property stdset="1">
            <name>margin</name>
            <number>11</number>
        </property>
        <property stdset="1">
            <name>spacing</name>
            <number>6</number>
        </property>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout24</cstring>
            </property>
            <grid>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <widget row="1"  column="1" >
                    <class>QLayoutWidget</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>Layout1</cstring>
                    </property>
                    <vbox>
                        <property stdset="1">
                            <name>margin</name>
                            <number>0</number>
                        </property>
                        <property stdset="1">
                            <name>spacing</name>
                            <number>6</number>
                        </property>
                        <widget>
                            <class>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>leftPB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string></string>
                            </property>
                            <property stdset="1">
                                <name>pixmap</name>
                                <pixmap>image0</pixmap>
                            </property>
                            <property stdset="1">
                                <name>sizePolicy</name>
                                <sizepolicy>
                                    <hsizetype>0</hsizetype>
                                    <vsizetype>0</vsizetype>
                                </sizepolicy>
                            </property>
                        </widget>
                        <widget>
                            <class>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>stopPB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string></string>
                            </property>
                            <property stdset="1">
                                <name>pixmap</name>
                                <pixmap>image1</pixmap>
                            </property>
                            <property stdset="1">
                                <name>sizePolicy</name>
                                <sizepolicy>
                                    <hsizetype>0</hsizetype>
                                    <vsizetype>0</vsizetype>
                                </sizepolicy>
                            </property>
                        </widget>
                        <widget>
                            <class>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>upPB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string></string>
                            </property>
                            <property stdset="1">
                                <name>pixmap</name>
                                <pixmap>image2</pixmap>
                            </property>
                            <property stdset="1">
                                <name>sizePolicy</name>
                                <sizepolicy>
                                    <hsizetype>0</hsizetype>
                                    <vsizetype>0</vsizetype>
                                </sizepolicy>
                            </property>
                        </widget>
                        <widget>
                            <class>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>downPB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string></string>
                            </property>
                            <property stdset="1">
                                <name>pixmap</name>
                                <pixmap>image3</pixmap>
                            </property>
                            <property stdset="1">
                                <name>sizePolicy</name>
                                <sizepolicy>
                                    <hsizetype>0</hsizetype>
                                    <vsizetype>0</vsizetype>
                                </sizepolicy>
                            </property>
                        </widget>
                    </vbox>
                </widget>
                <widget row="0"  column="2" >
                    <class>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>bibliographyKeysLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Bibliography keys</string>
                    </property>
                </widget>
                <widget row="0"  column="0" >
                    <class>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>insetKeysLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Inset keys</string>
                    </property>
                </widget>
                <widget row="1"  column="2" >
                    <class>QListBox</class>
                    <item>
                        <property>
                            <name>text</name>
                            <string>New Item</string>
                        </property>
                    </item>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>bibliographyKeysLB</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Reference keys available</string>
                    </property>
                </widget>
                <widget row="1"  column="0" >
                    <class>QListBox</class>
                    <item>
                        <property>
                            <name>text</name>
                            <string>New Item</string>
                        </property>
                    </item>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>insetKeysLB</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Keys currently selected</string>
                    </property>
                </widget>
            </grid>
        </widget>
        <spacer>
            <property>
                <name>name</name>
                <cstring>Spacer2</cstring>
            </property>
            <property stdset="1">
                <name>orientation</name>
                <enum>Vertical</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>
            <class>QLabel</class>
            <property stdset="1">
                <name>name</name>
                <cstring>infoLA</cstring>
            </property>
            <property stdset="1">
                <name>text</name>
                <string>Info</string>
            </property>
        </widget>
        <widget>
            <class>QMultiLineEdit</class>
            <property stdset="1">
                <name>name</name>
                <cstring>infoML</cstring>
            </property>
            <property>
                <name>toolTip</name>
                <string>Reference entry text</string>
            </property>
        </widget>
        <spacer>
            <property>
                <name>name</name>
                <cstring>Spacer3</cstring>
            </property>
            <property stdset="1">
                <name>orientation</name>
                <enum>Vertical</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>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout25</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>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>citationStyleLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Citation style</string>
                    </property>
                </widget>
                <widget>
                    <class>QComboBox</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>citationStyleCO</cstring>
                    </property>
                </widget>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer8</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>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout9</cstring>
            </property>
            <grid>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</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>textBeforeLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Text before</string>
                    </property>
                </widget>
                <widget row="1"  column="0" >
                    <class>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>textAfterLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Text after</string>
                    </property>
                </widget>
                <widget row="0"  column="1" >
                    <class>QLineEdit</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>textBeforeED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Text to place before citation</string>
                    </property>
                </widget>
                <widget row="1"  column="1" >
                    <class>QLineEdit</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>textAfterED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Text to place after citation</string>
                    </property>
                </widget>
            </grid>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout11</cstring>
            </property>
            <hbox>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer4</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>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>okPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>OK</string>
                    </property>
                    <property stdset="1">
                        <name>default</name>
                        <bool>true</bool>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>cancelPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Cancel</string>
                    </property>
                </widget>
            </hbox>
        </widget>
    </vbox>
</widget>
<images>
    <image>
        <name>image0</name>
        <data format="XPM.GZ" 
length="2766">789cad95c76e24371086ef7a8a81ea2618b54d363bc1d88372d64a1bb56bf8d04c8aa3388a86dfddd45f9c3eac6478163038d2e013ff228b95f46e6174b8bf3b5a7837773be927276ee48efb9bd182bf1b8f9ffef8f3fd5f73f35a8fd2471566a4e77f9b9b3f988cdc68eff222bc00df26a0a22c8aa27c61da19d880b706aea13fc9ac8b16fb4f99cba2c3fe24b3297a700f36c9be827e25b3291cf62f325785c7fe7666abe00f3b70359cff2db353f08736320725fe5c648e4af48be05a2925e7bbcc5ae1fd7499b95411fc98b9d20af6bb996b8de0f157709358e2739fb9d772ff4366ab713fdd815be535ee6702bbd255b0672d6c0b077bfe9159b9067c30b0bc673573e5103f12f629808837f9ccba92fdabcc5525ef7bce5cd7057833b3ab25bf9db02de53e1a8383f1b5dcdf0857ba96f8ad678e8d052f0bd75d8b7cf397ccbe95f3a43e42d37772df4de6d089ff92afd0aa4ef21532b7bdc4fb3ab3ed111f5acaec84b91d58f27124dca58861bf14b6dac97de7e058bb56e25f674e27607f4db8295ae917233cd89fbdb02a9ab2937aa984fbca4abc8fc1aa319dd48f1276d64b3cd04f4a4fede934b3c9e77d07979db1922f16b6c14b7fa09f94712af33eb872da4bbc223885cb497e106fd55993ebad0007df798937ea536baf3cf48c7ad6a5f55efcc77cd0668887057795aaa5be512fda4ef3cda837edaaae91f8239ea51afcfd084e022ff93b049baa6fa43e96857d29fef1077095e227fea1ffca66ca847956b64107f117fd5cfade3bb9ffb3f0b4df08f3c914a10c122fbcc7986082e8913fd34eeb81517f26d8d6c9fb31af2a9ff221fd8c7aad55133bf1ef13d824ffc47ff4671d7b6de53ce42765bbcbf5b997d959793fe647d375e94630eaa3717dca0818f3abf1c379e8c7267a1764fea23fda7278ffb9b08d5e784b38bd1ff5ca98076d1b4c44bd31e66bdb0d8c79d27a9f2cc098ffcec5228a7fe8371f6219e5fde88f18a38b51fef9ccbefe3f3d13f7b3eb93dab29b559fd49ec3acfaa48e7cc4c77c328b3ea94ff98ccf79cc17ffad4feacba4bee26bbee1db44d3f5a63efdfd0eea7b7ee0c7f4fd94e82cfd7ee6c5d7faa45e827a99577895d7789d377893b7789b7778f7677d52efa5575ef107dee783b456f9237fc2facc5ff8eb2bfd373ee4effc830b56acd32ad9e45571fdfafc64b1c80db7dcbd5810a71fa29e2cecdfd41f4cc891a74031a9141dd1319dd0299dd1398de9e2ed78d2255dd135ddd02d4de88eeeb11ee8919efe2d5fe98e675aa4255aa695d9ea2159acd21aadcf560fb0d8485e6dceae477489b666d7a73bb669e757f46faf5fd6fffdfbdc3f05fcbfcc</data>
    </image>
    <image>
        <name>image1</name>
        <data format="XPM.GZ" 
length="2157">789c959459531a411485dff91594f366a5ae3d5bf74ca5f2e0be44c10db7541e8659141557543495ff9edbe736132068923950c5479f7b397da78785f9e6c9ee4e737ea1f138c806bdbc995f640fcdf9e2a9df7ffdf6fdcb8fc65c1034f9a5753398fbd498db1b34f366ebf6a6b440e70c9ec205f62cfba5ca5406d6e0aae623cb81aa3973dc555df005b85495aac05dcb61e4f305beb31c9741160857969354ab58fc4370ae4a25f93a96d35c452edf8be5ac5281c266e8d67257456514810fc189d24afaa7605b2febcfc23a8c257f1b5c04dad7e0185cfa912ffe75cbb91f56a1ac3f09ebd4e51d80439d69f9bd081c457924ecd72c791fc1b12e740c6e81751c44e8ef61feb9318529b0fe004e8dd209780d9cc57c81cf1c5771080e84799e293871ecbbfd1a701e17b1ec6fd571e9faed804b1db8fa125c7559e015cb85d23a96fb1d0a1b63e4fedc80fd3aff3238d0a99bcf1238e2fdcb3cb71d97da8095b0c98cece7181c334bbe03b031a196f3f1159c30cbeff585139348bf45706a022d79f7c119e7953c5be06ecd6fe09ce72dfe0d70c1f539f8c4716e247f2e9c7413f1bf0aa72a91f95d3b0e13a9dfb55caabafe4a38d509e6eb9170c1c2fa1e38309591fbb7090e99a5ff25d8a4452af3b907a76995cafe0bcb5552b2c0a7e0a26203b807c6257f0effae693f79944dea233f7529a7624c255574fe9e9f2ed8dda34bd6155db3fa7443b774375ef1dbefdcf7f4c07aa4013db19ee98586e315233f92f4e895de588bb444cbb442abb446eb9315e2e75d4aef0d568f36698bbed236edf0e716b5c72b9c3fe3bd5dd22ef7ee417bb44f07ee738b0ea933e53f82ff98936c3ad709bf4ff97dc689fef4dbfe57a438f716f7eed53a237fa6dff6bf66ff32e7de476fab80b3b43ef0873c93ed3ab755c4ee78865fb3ff86e76e30139b3b71156d4a67e5f788fdcfdc6d94bbc5bd471533f2781edff9175eb3153e76d966f5d86bdd53f3e78a73fe66880a518c24ed49f7c4f919551c4ea833fbfc8c557426347cef7cd615d37af7fcbb8a297dfc3cfeeff3fb57ffcfcf8d5fe8202a15</data>
    </image>
    <image>
        <name>image2</name>
        <data format="XPM.GZ" 
length="2750">789cc595494f24471085effc8a167143564c65d69ab27c60df06066665c6f2a17283665f9aad2dff7767bfc86e812c0f7db14cc1e1a35f6444bc88ac7eb734383ad81b2cbd5bb81bf5a3a11bb893fe76b0e4ef2f2e9e7fffe3b73f1716b51ea45f559403bdf8cbc2e2e168e006fb57976102c409a8288ba228c16733aec0a7336ec07d665d74e0ddcc6561c09b99aba2070fc1557a1cd866ae0b3f613699ad92fc04aea7e7719fd929e4e7bdcc4149fe9dcc5189de831ba5949c3fccac15fae5ebcca58a88dfc85c6b05decadc689845dbe036b1f87193b9d7927f9cd96ae9ff04dc29af25bff4e34a57239ee57c670b8778bec8ac5c0bde9cb1f4f33173ede01fbf07fb6420fce5abccba96cf1f32d735fae3d5cc4d5380bbccae113f47c2b6947cb40e0e956f24bff4136add887f6de6d85a7023dc98ae46fc6a66df497c2ddcf646f215998391fa657f42a78cf8759fb9ebc5af95ccb6177fbe6476992f672c7e56c22639062e85ad76b28fcfe0d8b84ee6b796399d00fd57e1b6e8e47e04e1593cea53455b1ad99727e1beb6b24fc760d55606fbc3636167bdf88bfd537a167f97b91266892f4d65655e9f846df0b81f8c7d55955399d18faa9df6e2d73238d9e5643eb81fcad82aef9be40bde78f84d71c25a7be5457f082eadf7b2fff05f57533ff81bd8d4aa9179fd00dbe9bc09f9b5ab4d2bfeeb09976a5a2fe17e9649e0657e0e5cd57d2bfbf124ec4ba98f6fc175f24feac37e96ed8c3f83bba083f8adc0bef74ef6f151787adf08f7a52a4219c42fdcefaa0a55907abf83bbd93e1c8083ed9cec03ee57edd33c24fe68c28d6aa3413d847d6caa549fd4bf0f8ebdb6721ef62d4ddbe4fdb4999d95fef1be6d8d4919c1a8bf757d9a0818ef9fd64fcf23f8d746ef82dc27ec6b574efbe70fc2367af163249cfa977d85bf5d17aa887d23bc8f3a33653e077b9f22f039d8b95844a90ffbe3432ca3cc03df1f314617a37cd9ccfffc5f7a26eee7d727b565c77e3e7d52078e7ccc273c7c5b9fd4a77cc6e77cc1977cc5d73fd727f50dd4b77cc723bee787d7395eeb93fa11ea277ee6718a58e6155e7d19f1529fd46b50aff3066ff2568ad8e61ddee5f7bcf74f7d52efa72e3ff0011ff247e83fa588cffc85bfa6aafad7faa4fec647fc9d7f70c18a758a2893bae29a1b6eb94b9f9b977a629afcf46489f99c1c790a14e9984e6898fedbd3299dfd9b9f744e177499f457744d3773f87f46b7133d6fd3dd9cfa11f477743f8f3ed5f3408ff4c4637aa6f11cfa655aa1555a4bcf3a6dbca5a74df6b445dbe96f8b7668f72dfdcf9fff5cffd7af0b7f0351a5bebb</data>
    </image>
    <image>
        <name>image3</name>
        <data format="XPM.GZ" 
length="1472">789ca5d3496f22311005e03bbfa295dcd068d2edde359a0359c8beef19cdc12e97034908244dc8a6f9efd3f50c8144dcd2e2d09f9e8d9f29b1d40c2e0e7683e652a31aea619702eae8c7a0699f7abdd73f7f7fbf3716940aea4f9a07d1c28fc6c2cf8082bdfe3dcb3bd7ef8b611c86612c1c819a9455c23e684c415678fc41ec3d19d3782e8214539a082b4f135221bc1a5391168663a644c233d02659160ab73c4b674ae1a6a77116fdf7414e6c86b4e599e725aeb03d6651a2c6f398bacc84a79e656190be09a330e7125fb503aa8c0b94bcf5cc9312e70ec0829ccd85bb609925053aef813a0b73dc2802a9ee8c5616b445a2b1f81174145bd4d8102a658cbfe03d18536253e11148f550b0f8521847f55ea443d05a63318535611ae98230410d26ba24d458053f86b20e5aca2cee7b21ccd82ac6de5761aec8315a2d83b1d1165778f024667005cc26e993e7646fcfd3469e4a581436655ce106e409dbc232b19a51b203e69356d7a0b6b95fdc15ead43a36c27390d839cce84568981387568742526c1cf61e8075e6709011d6150b87839c904397380c9484f5d2d4e1bf70073a47cee13f35f7f966b2387ee624da10d5139f93b8eb4ef7e6765e72d7bbef0fe6270f8fd5707ef234aa86cf9f135feae575540dde18cf24e1d6f2caea5a7b7da3dadcdaded9dddbff48eae8c01db68f8eabea6430383de39973b8757e71d9bfaaaad1d007d3067534eacf0433dd240aa7c16ceb3a8aa6c1a7df9a5b6a1a7c9e02b7a6c197f9f034f8ee4cbf26ff7e35fe03191b46e7</data>
    </image>
</images>
<connections>
    <connection>
        <sender>insetKeysLB</sender>
        <signal>highlighted(const QString&amp;)</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>highlight_chosen_adaptor(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>bibliographyKeysLB</sender>
        <signal>highlighted(const QString&amp;)</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>highlight_key_adaptor(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>bibliographyKeysLB</sender>
        <signal>selected(const QString&amp;)</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>select_key_adaptor(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>leftPB</sender>
        <signal>clicked()</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>add_adaptor()</slot>
    </connection>
    <connection>
        <sender>stopPB</sender>
        <signal>clicked()</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>remove_adaptor()</slot>
    </connection>
    <connection>
        <sender>upPB</sender>
        <signal>clicked()</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>up_adaptor()</slot>
    </connection>
    <connection>
        <sender>downPB</sender>
        <signal>clicked()</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>down_adaptor()</slot>
    </connection>
    <connection>
        <sender>okPB</sender>
        <signal>clicked()</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>apply_adaptor()</slot>
    </connection>
    <connection>
        <sender>cancelPB</sender>
        <signal>clicked()</signal>
        <receiver>FormCitationDialogBase</receiver>
        <slot>close_adaptor()</slot>
    </connection>
    <slot access="protected">add_adaptor()</slot>
    <slot access="protected">close_adaptor()</slot>
    <slot access="protected">down_adaptor()</slot>
    <slot access="protected">highlight_chosen_adaptor(const QString&amp;)</slot>
    <slot access="protected">highlight_key_adaptor(const QString&amp;)</slot>
    <slot access="protected">apply_adaptor()</slot>
    <slot access="protected">remove_adaptor()</slot>
    <slot access="protected">select_key_adaptor(const QString&amp;)</slot>
    <slot access="protected">up_adaptor()</slot>
</connections>
</UI>
/* This file is part of
 * ======================================================
 * 
 *           LyX, The Document Processor
 * 	 
 *           Copyright 2000 The LyX Team.
 *
 *           @author Jürgen Vigna, Kalle Dalheimer
 *
 *======================================================*/

#include <config.h>

#ifdef __GNUG_
#pragma implementation
#endif

#include "FormDocumentDialog.h"
#undef emit

#include "lyx_gui_misc.h"
#include "gettext.h"
//#include FORMS_H_LOCATION
#include XPM_H_LOCATION

#include "FormDocument.h"
//#include "xform_macros.h"
#include "Dialogs.h"
#include "layout.h"
#include "combox.h"
#include "tex-strings.h"
#include "bufferparams.h"
#include "insets/insetquotes.h"
#include "vspace.h"
#include "bmtable.h"
#include "support/filetools.h"
#include "language.h"
#include "LyXView.h"
#include "BufferView.h"
#include "buffer.h"
#include "Liason.h"
#include "CutAndPaste.h"
#include "bufferview_funcs.h"
#include "ButtonController.h"

#ifdef SIGC_CXX_NAMESPACES
using SigC::slot;
#endif

#ifdef CXX_WORKING_NAMESPACES
using Liason::setMinibuffer;
#endif

#define USE_CLASS_COMBO 1

#include <qcombobox.h>
#include <qlineedit.h>
#include <qradiobutton.h>
#include <qtoolbutton.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qbuttongroup.h>
#include <qlabel.h>

// Bullet images
#include "../../../lib/images/standard.xpm"
#include "../../../lib/images/psnfss1.xpm"
#include "../../../lib/images/psnfss2.xpm"
#include "../../../lib/images/psnfss3.xpm"
#include "../../../lib/images/psnfss4.xpm"
#include "../../../lib/images/amssymb.xpm"


FormDocument::FormDocument(LyXView * lv, Dialogs * d)
  : FormBaseBD( lv, d, _( "Document Layout" ), 
				new NoRepeatedApplyReadOnlyPolicy ),
  dialog_(0), lv_(lv), d_(d), u_(0), h_(0),
  status(POPUP_UNMODIFIED) ,
  currentBulletPanel(0),
  currentBulletDepth(0)
{
    // let the popup be shown
    // This is a permanent connection so we won't bother
    // storing a copy because we won't be disconnecting.
    d->showLayoutDocument.connect(slot(this, &FormDocument::show));

    // load the images
    standardpix = new QPixmap( standard );
    amssymbpix = new QPixmap( amssymb );
    psnfss1pix = new QPixmap( psnfss1 );
    psnfss2pix = new QPixmap( psnfss2 );
    psnfss3pix = new QPixmap( psnfss3 );
    psnfss4pix = new QPixmap( psnfss4 );
}


FormDocument::~FormDocument()
{
  delete standardpix;
  delete amssymbpix;
  delete psnfss1pix;
  delete psnfss2pix;
  delete psnfss3pix;
  delete psnfss4pix;
}


void FormDocument::build()
{
    int n;

    dialog_ = new FormDocumentDialog( this, 0, _( "Document Layout" ) );

    for (LyXTextClassList::const_iterator cit = textclasslist.begin();
	 cit != textclasslist.end(); ++cit)
    {
	dialog_->classesCO->insertItem((*cit).description().c_str());
    }

    for (n=0; tex_fonts[n][0]; ++n) {
      dialog_->fontsCO->insertItem( tex_fonts[n] );
    }

    for(Languages::const_iterator cit = languages.begin();
	cit != languages.end(); ++cit) {
	dialog_->languageCO->insertItem((*cit).second.lang().c_str());
    }

    for (n=0; tex_graphics[n][0]; ++n) {
      dialog_->psDriverCO->insertItem( tex_graphics[n] );
    }

    dialog_->bulletDepth1PB->setOn( true );
}


void FormDocument::apply()
{
    if (!lv_->view()->available() || !dialog_)
	return;

    bool redo = class_apply();
    paper_apply();
    redo = language_apply() || redo;
    redo = options_apply() || redo;
    bullets_apply();

    if (redo) {
	    lv_->view()->redoCurrentBuffer();
    }
    lv_->buffer()->markDirty();
    setMinibuffer(lv_, _("Document layout set"));
}


bool FormDocument::class_apply()
{
	bool redo = false;
	BufferParams &params = lv_->buffer()->params;

	// If default skip is a "Length" but there's no text in the
	// input field, reset the kind to "Medskip", which is the default.
	if( ( dialog_->defaultSkipCO->currentItem() == 4 ) &&
	    ( dialog_->defaultSkipED->text().isEmpty() ) )
	  dialog_->defaultSkipCO->setCurrentItem( 1 );
	params.fonts = dialog_->fontsCO->currentText();
	params.fontsize = dialog_->fontSizeCO->currentText();
	params.pagestyle = dialog_->pagestyleCO->currentText();

	unsigned int new_class = dialog_->classesCO->currentItem();
	if (params.textclass != new_class) {
		// try to load new_class
		if (textclasslist.Load(new_class)) {
			// successfully loaded
			redo = true;
			setMinibuffer(lv_, _("Converting document to new document class..."));
			CutAndPaste cap;
			int ret = cap.SwitchLayoutsBetweenClasses(
			    params.textclass, new_class,
			    lv_->buffer()->paragraph);
			if (ret) {
				string s;
				if (ret==1) {
					s = _("One paragraph couldn't be converted");
				} else {
					s += tostr(ret);
					s += _(" paragraphs couldn't be converted");
				}
				WriteAlert(_("Conversion Errors!"),s,
					   _("into chosen document class"));
			}
			
			params.textclass = new_class;
		} else {
			// problem changing class -- warn user and retain old style
			WriteAlert(_("Conversion Errors!"),
				   _("Errors loading new document class."),
				   _("Reverting to original document class."));
			dialog_->classesCO->setCurrentItem( params.textclass );
		}
	}
	char tmpsep = params.paragraph_separation;
	if( dialog_->indentRB->isChecked() )
		params.paragraph_separation = BufferParams::PARSEP_INDENT;
	else
		params.paragraph_separation = BufferParams::PARSEP_SKIP;
	if (tmpsep != params.paragraph_separation)
		redo = true;
	
	VSpace tmpdefskip = params.getDefSkip();
	switch( dialog_->defaultSkipCO->currentItem() ) {
	case 0:
		params.setDefSkip(VSpace(VSpace::SMALLSKIP));
		break;
	case 1:
		params.setDefSkip(VSpace(VSpace::MEDSKIP));
		break;
	case 2:
	    params.setDefSkip(VSpace(VSpace::BIGSKIP));
	    break;
	case 3:
		params.setDefSkip
			(VSpace(LyXGlueLength(dialog_->defaultSkipED->text().latin1())));
		break;
		// DocumentDefskipCB assures that this never happens
	default:
		params.setDefSkip(VSpace(VSpace::MEDSKIP));
		break;
	}
	if (!(tmpdefskip == params.getDefSkip()))
		redo = true;
	
	if( dialog_->twoColumnsRB->isChecked() )
		params.columns = 2;
	else
		params.columns = 1;
	if( dialog_->twoSidesRB->isChecked() )
		params.sides = LyXTextClass::TwoSides;
	else
		params.sides = LyXTextClass::OneSide;
	
	Spacing tmpSpacing = params.spacing;
	switch( dialog_->spacingCO->currentItem() ) {
	case 0:
		lyxerr[Debug::INFO] << "Spacing: SINGLE\n";
		params.spacing.set(Spacing::Single);
		break;
	case 1:
		lyxerr[Debug::INFO] << "Spacing: ONEHALF\n";
		params.spacing.set(Spacing::Onehalf);
		break;
	case 2:
		lyxerr[Debug::INFO] << "Spacing: DOUBLE\n";
		params.spacing.set(Spacing::Double);
		break;
	case 3:
		lyxerr[Debug::INFO] << "Spacing: OTHER\n";
		params.spacing.set(Spacing::Other, 
				   dialog_->defaultSkipED->text().latin1() );
		break;
	}
	if (tmpSpacing != params.spacing)
		redo = true;
	
	params.options = dialog_->extraOptionsED->text();
	
	return redo;
}


void FormDocument::paper_apply()
{
    BufferParams & params = lv_->buffer()->params;
    
    params.papersize2 = dialog_->papersizeCO->currentItem();
    params.paperpackage = dialog_->specialCO->currentItem();
    params.use_geometry = dialog_->CheckBox1->isChecked();
    if( dialog_->landscapeRB->isChecked() )
	params.orientation = BufferParams::ORIENTATION_LANDSCAPE;
    else
	params.orientation = BufferParams::ORIENTATION_PORTRAIT;
    params.paperwidth = dialog_->customWidthED->text();
    params.paperheight = dialog_->customHeightED->text();
    params.leftmargin = dialog_->marginLeftED->text();
    params.topmargin = dialog_->marginTopED->text();
    params.rightmargin = dialog_->marginRightED->text();
    params.bottommargin = dialog_->marginBottomED->text();
    params.headheight = dialog_->headheightED->text();
    params.headsep = dialog_->headsepED->text();
    params.footskip = dialog_->footskipED->text();
    lv_->buffer()->setPaperStuff();
}


bool FormDocument::language_apply()
{
    BufferParams & params = lv_->buffer()->params;
    InsetQuotes::quote_language lga = InsetQuotes::EnglishQ;
    bool redo = false;

    switch( dialog_->quoteStyleTypeCO->currentItem() ) {
    case 0:
	lga = InsetQuotes::EnglishQ;
	break;
    case 1:
	lga = InsetQuotes::SwedishQ;
	break;
    case 2:
	lga = InsetQuotes::GermanQ;
	break;
    case 3:
	lga = InsetQuotes::PolishQ;
	break;
    case 4:
	lga = InsetQuotes::FrenchQ;
	break;
    case 5:
	lga = InsetQuotes::DanishQ;
	break;
    }
    params.quotes_language = lga;
    if( dialog_->quoteStyleSingleRB->isChecked() )
	params.quotes_times = InsetQuotes::SingleQ;
    else
	params.quotes_times = InsetQuotes::DoubleQ;

    Language const * old_language = params.language;
    Language const * new_language =
	  languages.getLanguage( dialog_->languageCO->currentText().latin1() );
	if( !new_language )
	  new_language = default_language;

    if (old_language != new_language
	&& old_language->RightToLeft() == new_language->RightToLeft()
	&& !lv_->buffer()->isMultiLingual())
	lv_->buffer()->ChangeLanguage(old_language, new_language);
    if (old_language != new_language) {
	redo = true;
    }
    params.language = new_language;
    params.inputenc = dialog_->encodingCO->currentText();

    return redo;
}


bool FormDocument::options_apply()
{
    BufferParams & params = lv_->buffer()->params;
    bool redo = false;

    params.graphicsDriver =
      dialog_->psDriverCO->currentText();
    params.use_amsmath = dialog_->amsMathCB->isChecked();

    int tmpchar = dialog_->sectionNumberDepthSB->value();
    if (params.secnumdepth != tmpchar)
	redo = true;
    params.secnumdepth = tmpchar;
   
    params.tocdepth = dialog_->tocDepthSB->value();

    params.float_placement =
      dialog_->floatPlacementED->text();

    return redo;
}


void FormDocument::bullets_apply()
{
    /* update the bullet settings */
    BufferParams & param = lv_->buffer()->params;
    
    // a little bit of loop unrolling
    param.user_defined_bullets[0] = param.temp_bullets[0];
    param.user_defined_bullets[1] = param.temp_bullets[1];
    param.user_defined_bullets[2] = param.temp_bullets[2];
    param.user_defined_bullets[3] = param.temp_bullets[3];
}


void FormDocument::cancel()
{
    // this avoids confusion when reopening
    BufferParams & param = lv_->buffer()->params;
    param.temp_bullets[0] = param.user_defined_bullets[0];
    param.temp_bullets[1] = param.user_defined_bullets[1];
    param.temp_bullets[2] = param.user_defined_bullets[2];
    param.temp_bullets[3] = param.user_defined_bullets[3];
}


void FormDocument::update()
{
    if (!dialog_)
        return;

    checkReadOnly();

    BufferParams const & params = lv_->buffer()->params;

    class_update(params);
    paper_update(params);
    language_update(params);
    options_update(params);
    bullets_update(params);
}


void FormDocument::class_update(BufferParams const & params)
{
    LyXTextClass const & tclass = textclasslist.TextClass(params.textclass);

    for( int i = 0; i < dialog_->classesCO->count(); i++ )
      if( dialog_->classesCO->text( i ) == textclasslist.DescOfClass( params.textclass ).c_str() )
	dialog_->classesCO->setCurrentItem( i );

    for( int i = 0; i < dialog_->fontsCO->count(); i++ )
      if( dialog_->fontsCO->text( i ) == params.fonts.c_str() )
	dialog_->fontsCO->setCurrentItem( i );

    dialog_->fontSizeCO->clear();
    dialog_->fontSizeCO->insertItem( _("default") );
    dialog_->fontSizeCO->insertStringList( QStringList::split( "|", tclass.opt_fontsize().c_str() ) );
    for( int i = 0; i < dialog_->fontSizeCO->count(); i++ )
      if( dialog_->fontSizeCO->text( i ) ==
	  tokenPos(tclass.opt_fontsize(), '|', params.fontsize)+2)
	dialog_->fontSizeCO->setCurrentItem( i );

    dialog_->pagestyleCO->clear();
    dialog_->pagestyleCO->insertItem( _("default") );
    dialog_->pagestyleCO->insertStringList( QStringList::split( "|", tclass.opt_pagestyle().c_str() ) );
    for( int i = 0; i < dialog_->pagestyleCO->count(); i++ )
      if( dialog_->pagestyleCO->text( i ) ==
	  tokenPos(tclass.opt_pagestyle(), '|', params.pagestyle)+2)
	dialog_->pagestyleCO->setCurrentItem( i );

    if (params.paragraph_separation == BufferParams::PARSEP_INDENT) {
      dialog_->indentRB->setChecked( true );
      dialog_->skipRB->setChecked( false );
    } else {
      dialog_->skipRB->setChecked( true );
      dialog_->indentRB->setChecked( false );
    }
    switch (params.getDefSkip().kind()) {
    case VSpace::SMALLSKIP: 
      dialog_->defaultSkipCO->setCurrentItem( 0 );
	break;
    case VSpace::MEDSKIP: 
      dialog_->defaultSkipCO->setCurrentItem( 1 );
	break;
    case VSpace::BIGSKIP: 
      dialog_->defaultSkipCO->setCurrentItem( 2 );
	break;
    case VSpace::LENGTH: 
      dialog_->defaultSkipCO->setCurrentItem( 3 );
      dialog_->defaultSkipED->setText( params.getDefSkip().asLyXCommand().c_str() );
	break;
    default:
      dialog_->defaultSkipCO->setCurrentItem( 1 );
	break;
    }

    if( params.sides == 2 ) {
      dialog_->twoSidesRB->setChecked( true );
      dialog_->oneSideRB->setChecked( false );
    } else {
      dialog_->twoSidesRB->setChecked( false );
      dialog_->oneSideRB->setChecked( true );
    }

    if( params.columns == 2 ) {
      dialog_->twoColumnsRB->setChecked( true );
      dialog_->oneColumnRB->setChecked( false );
    } else {
      dialog_->twoColumnsRB->setChecked( false );
      dialog_->oneColumnRB->setChecked( true );
    }

    dialog_->spacingED->setText( "" );
    switch (params.spacing.getSpace()) {
    case Spacing::Default: // nothing bad should happen with this
    case Spacing::Single:
      // \singlespacing
      dialog_->spacingCO->setCurrentItem( 0 );
      break;
    case Spacing::Onehalf:
      // \onehalfspacing
      dialog_->spacingCO->setCurrentItem( 1 );
      break;
    case Spacing::Double:
      // \doublespacing
      dialog_->spacingCO->setCurrentItem( 2 );
      break;
    case Spacing::Other:
      {
	dialog_->spacingCO->setCurrentItem( 3 );
	QString sval;
	sval.sprintf("%g",params.spacing.getValue()); 
	dialog_->spacingED->setText( sval );
	break;
      }
    }
    if (!params.options.empty())
      dialog_->extraOptionsED->setText( params.options.c_str());
    else
      dialog_->extraOptionsED->setText( "" );
}


void FormDocument::language_update(BufferParams const & params)
{
    for( int i = 0; i < dialog_->languageCO->count(); i++ )
      if( dialog_->languageCO->text( i ) == params.language->lang().c_str() )
	dialog_->languageCO->setCurrentItem( i );
    

    for( int i = 0; i < dialog_->encodingCO->count(); i++ )
      if( dialog_->encodingCO->text( i ) == params.inputenc.c_str() )
	dialog_->encodingCO->setCurrentItem( i );

    dialog_->quoteStyleTypeCO->setCurrentItem( params.quotes_language );

    if( params.quotes_times == InsetQuotes::SingleQ ) {
      dialog_->quoteStyleSingleRB->setChecked( true );
      dialog_->quoteStyleDoubleRB->setChecked( false );
    } else {
      dialog_->quoteStyleSingleRB->setChecked( false );
      dialog_->quoteStyleDoubleRB->setChecked( true );
    }
}


void FormDocument::options_update(BufferParams const & params)
{
    for( int i = 0; i < dialog_->psDriverCO->count(); i++ )
      if( dialog_->psDriverCO->text( i ) == params.graphicsDriver.c_str() )
	dialog_->psDriverCO->setCurrentItem( i );

    dialog_->amsMathCB->setChecked( params.use_amsmath );
    dialog_->sectionNumberDepthSB->setValue( params.secnumdepth );
    dialog_->tocDepthSB->setValue( params.tocdepth );

    if (!params.float_placement.empty())
      dialog_->floatPlacementED->setText( params.float_placement.c_str());
    else
      dialog_->floatPlacementED->setText( "" );
}


void FormDocument::paper_update(BufferParams const & params)
{
    dialog_->papersizeCO->setCurrentItem( params.papersize2 );
    dialog_->specialCO->setCurrentItem( params.paperpackage );
    dialog_->CheckBox1->setChecked( params.use_geometry );
    
    if (params.orientation == BufferParams::ORIENTATION_LANDSCAPE) {
      dialog_->landscapeRB->setChecked( true );
      dialog_->portraitRB->setChecked( false );
    } else {
      dialog_->landscapeRB->setChecked( false );
      dialog_->portraitRB->setChecked( true );
    }

    dialog_->customWidthED->setText( params.paperwidth.c_str());
    dialog_->customHeightED->setText( params.paperheight.c_str());
    dialog_->marginLeftED->setText( params.leftmargin.c_str());
    dialog_->marginTopED->setText( params.topmargin.c_str());
    dialog_->marginRightED->setText( params.rightmargin.c_str());
    dialog_->marginBottomED->setText( params.bottommargin.c_str());
    dialog_->headheightED->setText( params.headheight.c_str());
    dialog_->headsepED->setText( params.headsep.c_str());
    dialog_->footskipED->setText( params.footskip.c_str());
    dialog_->papersizeCO->setFocus();
}


void FormDocument::bullets_update(BufferParams const & params)
{
    if (lv_->buffer()->isLinuxDoc()) {
      dialog_->bulletTypeBG->setEnabled( false );
      dialog_->bulletDepth1PB->setEnabled( false );
      dialog_->bulletDepth2PB->setEnabled( false );
      dialog_->bulletDepth3PB->setEnabled( false );
      dialog_->bulletDepth4PB->setEnabled( false );
      dialog_->bulletSizeCO->setEnabled( false );
      dialog_->latexED->setEnabled( false );
      return;
    } else {
      dialog_->bulletTypeBG->setEnabled( true );
      dialog_->bulletDepth1PB->setEnabled( true );
      dialog_->bulletDepth2PB->setEnabled( true );
      dialog_->bulletDepth3PB->setEnabled( true );
      dialog_->bulletDepth4PB->setEnabled( true );
      dialog_->bulletSizeCO->setEnabled( true );
      dialog_->latexED->setEnabled( true );
    }
    if (lv_->buffer()->isReadonly()) {
      dialog_->bulletTypeBG->setEnabled( false );
      dialog_->bulletSizeCO->setEnabled( false );
      dialog_->latexED->setEnabled( false );
    } else {
      dialog_->bulletTypeBG->setEnabled( true );
      dialog_->bulletSizeCO->setEnabled( true );
      dialog_->latexED->setEnabled( true );
    }

    dialog_->bulletDepth1PB->setOn( true );
    dialog_->latexED->setText( params.user_defined_bullets[0].getText().c_str());
    dialog_->bulletSizeCO->setCurrentItem( params.user_defined_bullets[0].getSize() + 1);
    dialog_->bulletStandardPB->setOn( false );
    dialog_->bulletMathsPB->setOn( false );
    dialog_->bulletDing1PB->setOn( false );
    dialog_->bulletDing2PB->setOn( false );
    dialog_->bulletDing3PB->setOn( false );
    dialog_->bulletDing4PB->setOn( false );
    switch( params.user_defined_bullets[0].getFont() ) {
    case 0:
      dialog_->bulletStandardPB->setOn( true );
      break;
    case 1:
      dialog_->bulletMathsPB->setOn( true );
      break;
    case 2:
      dialog_->bulletDing1PB->setOn( true );
      break;
    case 3:
      dialog_->bulletDing2PB->setOn( true );
      break;
    case 4:
      dialog_->bulletDing3PB->setOn( true );
      break;
    case 5:
      dialog_->bulletDing4PB->setOn( true );
      break;
    default:
      // should not happen
      dialog_->bulletStandardPB->setOn( true );
    }
}


void FormDocument::free()
{
    if (dialog_) {
        hide();
        delete dialog_;
        dialog_ = 0;
    }
}


void FormDocument::checkReadOnly()
{
    if (bc_.readOnly(lv_->buffer()->isReadonly())) {
      dialog_->classesCO->setEnabled( false );
      dialog_->languageCO->setEnabled( false );
      dialog_->warningLA->setText( _("Document is read-only."
				     " No changes to layout permitted."));
      dialog_->warningLA->show();
    } else {
      dialog_->classesCO->setEnabled( true );
      dialog_->languageCO->setEnabled( true );
      dialog_->warningLA->hide();
    }	
}


void FormDocument::checkMarginValues()
{
  const int allEmpty = 
    dialog_->marginTopED->text().isEmpty() &&
    dialog_->marginBottomED->text().isEmpty() &&
    dialog_->marginLeftED->text().isEmpty() &&
    dialog_->marginRightED->text().isEmpty() &&
    dialog_->headheightED->text().isEmpty() &&
    dialog_->headsepED->text().isEmpty() &&
    dialog_->footskipED->text().isEmpty() &&
    dialog_->customWidthED->text().isEmpty() &&
    dialog_->customHeightED->text().isEmpty();
    if (!allEmpty)
      dialog_->CheckBox1->setChecked( true );
}

bool FormDocument::checkDocumentInput(QWidget* w)
{
    string str;
    char val;
    bool ok = true;
    QString input;
    
    checkMarginValues();
    if (w == dialog_->papersizeCO) {
	val = dialog_->papersizeCO->currentItem();

	if (val == BufferParams::VM_PAPER_DEFAULT) {
	  dialog_->CheckBox1->setChecked( false );
	    checkMarginValues();
	} else {
	    if ((val != BufferParams::VM_PAPER_USLETTER) &&
		(val != BufferParams::VM_PAPER_USLEGAL) &&
		(val != BufferParams::VM_PAPER_USEXECUTIVE) &&
		(val != BufferParams::VM_PAPER_A4) &&
		(val != BufferParams::VM_PAPER_A5) &&
		(val != BufferParams::VM_PAPER_B5)) {
	      dialog_->CheckBox1->setChecked( true );
	    }
	    dialog_->specialCO->setCurrentItem( BufferParams::PACKAGE_NONE );
	}
    } else if (w == dialog_->specialCO ) {
      val = dialog_->specialCO->currentItem();
      if (val != BufferParams::PACKAGE_NONE) {
	dialog_->papersizeCO->setCurrentItem( BufferParams::VM_PAPER_DEFAULT );
	dialog_->CheckBox1->setChecked( false );
      }
    } else if (w == dialog_->spacingED) {
	input = dialog_->spacingED->text();
	if (input.isEmpty()) {
	  dialog_->spacingCO->setCurrentItem( 0 );
	} else {
	  dialog_->spacingCO->setCurrentItem( 3 );
	}
    }
    // this has to be all out of if/elseif because it has to deactivate
    // the document buttons and so the whole stuff has to be tested again.
    str = dialog_->customWidthED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->customHeightED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->marginLeftED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->marginRightED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->marginTopED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->marginBottomED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->headheightED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->headsepED->text();
    ok = ok && (str.empty() || isValidLength(str));
    str = dialog_->footskipED->text();
    ok = ok && (str.empty() || isValidLength(str));
    // "Synchronize" the choice and the input field, so that it
    // is impossible to commit senseless data.
    input = dialog_->defaultSkipED->text();
    if (w == dialog_->defaultSkipED) {
	if (input.isEmpty()) {
	  dialog_->defaultSkipCO->setCurrentItem( 1 );
	} else if (isValidGlueLength (input.latin1())) {
	  dialog_->defaultSkipCO->setCurrentItem( 3 );
	} else {
	  dialog_->defaultSkipCO->setCurrentItem( 3 );
	    ok = false;
	}
    } else {
	if (!input.isEmpty() && !isValidGlueLength(input.latin1()))
	    ok = false;
    }
    if(( dialog_->defaultSkipCO->currentItem() == 3 ) && input.isEmpty() )
	ok = false;
    else if( dialog_->defaultSkipCO->currentItem() != 3 )
      dialog_->defaultSkipED->setText( "" );

    input = dialog_->spacingED->text();
    if( ( dialog_->spacingCO->currentItem() == 3 ) && input.isEmpty() )
	ok = false;
    else if( dialog_->spacingCO->currentItem() != 3 )
      dialog_->spacingED->setText( "" );
    return ok;
}


void FormDocument::choiceBulletSize()
{
    BufferParams & param = lv_->buffer()->params;

    // convert from 0-5 range to -1-4 
    param.temp_bullets[currentBulletDepth].setSize(dialog_->bulletSizeCO->currentItem() - 1);
    dialog_->latexED->setText( param.temp_bullets[currentBulletDepth].getText().c_str());
}


void FormDocument::inputBulletLaTeX()
{
    BufferParams & param = lv_->buffer()->params;

    param.temp_bullets[currentBulletDepth].
	setText(dialog_->latexED->text().latin1() );
}


void FormDocument::bulletDepth(int depth)
{
    /* Should I do the following:                                 */
    /*  1. change to the panel that the current bullet belongs in */
    /*  2. show that bullet as selected                           */
    /*  3. change the size setting to the size of the bullet in Q.*/
    /*  4. display the latex equivalent in the latex box          */
    /*                                                            */
    /* I'm inclined to just go with 3 and 4 at the moment and     */
    /* maybe try to support the others later                      */
    BufferParams & param = lv_->buffer()->params;

    // reset on right mouse button not supported in KLyX
    // right mouse button resets to default
    param.temp_bullets[depth] = ITEMIZE_DEFAULTS[depth];
    dialog_->latexED->setText( param.temp_bullets[depth].getText().c_str());
    dialog_->bulletSizeCO->setCurrentItem( param.temp_bullets[depth].getSize() + 1 );

    currentBulletDepth = depth;
}


// PENDING(kalle) Call this.
void FormDocument::setBulletPics()
{
  QPixmap* currentpix = 0;
  if( dialog_->bulletStandardPB->isOn() ) {
    currentpix = standardpix;
    currentBulletPanel = 0;
  } else if( dialog_->bulletMathsPB->isOn() ) {
    currentpix = amssymbpix;
    currentBulletPanel = 1;
  } else if( dialog_->bulletDing1PB->isOn() ) {
    currentpix = psnfss1pix;
    currentBulletPanel = 2;
  } else if( dialog_->bulletDing2PB->isOn() ) {
    currentpix = psnfss2pix;
    currentBulletPanel = 3;
  } else if( dialog_->bulletDing3PB->isOn() ) {
    currentpix = psnfss3pix;
    currentBulletPanel = 4;
  } else if( dialog_->bulletDing4PB->isOn() ) {
    currentpix = psnfss4pix;
    currentBulletPanel = 5;
  }

  for( int x = 0; x < 6; x++ )
    for( int y = 0; y < 6; y++ ) {
      bulletpics[x*6+y].resize( 44, 29 );
      bitBlt( &bulletpics[x*6+y], 0, 0, currentpix, x*44, y*29, 44, 29 );
    }

  // This is disgusting, but the only way since the designer does not
  // support widget arrays.
  dialog_->bullet00PB->setPixmap( bulletpics[0] );
  dialog_->bullet01PB->setPixmap( bulletpics[1] );
  dialog_->bullet02PB->setPixmap( bulletpics[2] );
  dialog_->bullet03PB->setPixmap( bulletpics[3] );
  dialog_->bullet04PB->setPixmap( bulletpics[4] );
  dialog_->bullet05PB->setPixmap( bulletpics[5] );
  dialog_->bullet10PB->setPixmap( bulletpics[6] );
  dialog_->bullet11PB->setPixmap( bulletpics[7] );
  dialog_->bullet12PB->setPixmap( bulletpics[8] );
  dialog_->bullet13PB->setPixmap( bulletpics[9] );
  dialog_->bullet14PB->setPixmap( bulletpics[10] );
  dialog_->bullet15PB->setPixmap( bulletpics[11] );
  dialog_->bullet20PB->setPixmap( bulletpics[12] );
  dialog_->bullet21PB->setPixmap( bulletpics[13] );
  dialog_->bullet22PB->setPixmap( bulletpics[14] );
  dialog_->bullet23PB->setPixmap( bulletpics[15] );
  dialog_->bullet24PB->setPixmap( bulletpics[16] );
  dialog_->bullet25PB->setPixmap( bulletpics[17] );
  dialog_->bullet30PB->setPixmap( bulletpics[18] );
  dialog_->bullet31PB->setPixmap( bulletpics[19] );
  dialog_->bullet32PB->setPixmap( bulletpics[20] );
  dialog_->bullet33PB->setPixmap( bulletpics[21] );
  dialog_->bullet34PB->setPixmap( bulletpics[22] );
  dialog_->bullet35PB->setPixmap( bulletpics[23] );
  dialog_->bullet40PB->setPixmap( bulletpics[24] );
  dialog_->bullet41PB->setPixmap( bulletpics[25] );
  dialog_->bullet42PB->setPixmap( bulletpics[26] );
  dialog_->bullet43PB->setPixmap( bulletpics[27] );
  dialog_->bullet44PB->setPixmap( bulletpics[28] );
  dialog_->bullet45PB->setPixmap( bulletpics[29] );
  dialog_->bullet50PB->setPixmap( bulletpics[30] );
  dialog_->bullet51PB->setPixmap( bulletpics[31] );
  dialog_->bullet52PB->setPixmap( bulletpics[32] );
  dialog_->bullet53PB->setPixmap( bulletpics[33] );
  dialog_->bullet54PB->setPixmap( bulletpics[34] );
  dialog_->bullet55PB->setPixmap( bulletpics[35] );
}


void FormDocument::bulletBMTable(int button)
{
    /* handle the user input by setting the current bullet depth's pixmap */
    /* to that extracted from the current chosen position of the BMTable  */
    /* Don't forget to free the button's old pixmap first.                */

    BufferParams & param = lv_->buffer()->params;

    /* try to keep the button held down till another is pushed */
    /*  fl_set_bmtable(ob, 1, bmtable_button); */
    param.temp_bullets[currentBulletDepth].setFont(currentBulletPanel);
    param.temp_bullets[currentBulletDepth].setCharacter(button);
    dialog_->latexED->setText( param.temp_bullets[currentBulletDepth].getText().c_str());
}


void FormDocument::checkChoiceClass(QComboBox* cb)
{
    if (!cb)
	cb = dialog_->classesCO;

    ProhibitInput(lv_->view());
    int tc;
    string tct;

    tc = cb->currentItem();
    tct = cb->currentText();

    if (textclasslist.Load(tc)) {
	if (AskQuestion(_("Should I set some parameters to"), tct,
			_("the defaults of this document class?"))) {
	    BufferParams & params = lv_->buffer()->params;

	    params.textclass = tc;
	    params.useClassDefaults();
	    UpdateLayoutDocument(params);
	}
    } else {
	// unable to load new style
	WriteAlert(_("Conversion Errors!"),
		   _("Unable to switch to new document class."),
		   _("Reverting to original document class."));

	dialog_->classesCO->setCurrentItem(
					   lv_->buffer()->params.textclass );
    }
    AllowInput(lv_->view());
}


void FormDocument::UpdateLayoutDocument(BufferParams const & params)
{
    if (!dialog_)
        return;

    checkReadOnly();
    class_update(params);
    paper_update(params);
    language_update(params);
    options_update(params);
    bullets_update(params);
}
<!DOCTYPE UI><UI>
<class>FormReferenceDialogBase</class>
<widget>
    <class>QDialog</class>
    <property stdset="1">
        <name>name</name>
        <cstring>FormReferenceDialogBase</cstring>
    </property>
    <property stdset="1">
        <name>geometry</name>
        <rect>
            <x>0</x>
            <y>0</y>
            <width>421</width>
            <height>277</height>
        </rect>
    </property>
    <property stdset="1">
        <name>caption</name>
        <string>Reference</string>
    </property>
    <hbox>
        <property stdset="1">
            <name>margin</name>
            <number>11</number>
        </property>
        <property stdset="1">
            <name>spacing</name>
            <number>6</number>
        </property>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout30</cstring>
            </property>
            <vbox>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <widget>
                    <class>QListBox</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>refsLB</cstring>
                    </property>
                </widget>
                <widget>
                    <class>QLayoutWidget</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>Layout29</cstring>
                    </property>
                    <hbox>
                        <property stdset="1">
                            <name>margin</name>
                            <number>0</number>
                        </property>
                        <property stdset="1">
                            <name>spacing</name>
                            <number>6</number>
                        </property>
                        <spacer>
                            <property>
                                <name>name</name>
                                <cstring>Spacer4</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>
                        <widget>
                            <class>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>updatePB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>&amp;Update</string>
                            </property>
                        </widget>
                        <spacer>
                            <property>
                                <name>name</name>
                                <cstring>Spacer5</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>
                        <widget>
                            <class>QCheckBox</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>sortCB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>Sort</string>
                            </property>
                            <property>
                                <name>toolTip</name>
                                <string>Sort references in alphabetical order 
?</string>
                            </property>
                        </widget>
                        <spacer>
                            <property>
                                <name>name</name>
                                <cstring>Spacer6</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>
            </vbox>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout35</cstring>
            </property>
            <vbox>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <widget>
                    <class>QLayoutWidget</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>Layout31</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>QLabel</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>nameL</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>&amp;Name:</string>
                            </property>
                            <property>
                                <name>buddy</name>
                                <cstring>nameED</cstring>
                            </property>
                        </widget>
                        <widget>
                            <class>QLineEdit</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>nameED</cstring>
                            </property>
                        </widget>
                    </hbox>
                </widget>
                <widget>
                    <class>QLayoutWidget</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>Layout32</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>QLabel</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>referenceL</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>&amp;Reference:</string>
                            </property>
                            <property>
                                <name>buddy</name>
                                <cstring>referenceED</cstring>
                            </property>
                        </widget>
                        <widget>
                            <class>QLineEdit</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>referenceED</cstring>
                            </property>
                        </widget>
                    </hbox>
                </widget>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer7</cstring>
                    </property>
                    <property stdset="1">
                        <name>orientation</name>
                        <enum>Vertical</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>
                    <class>QLayoutWidget</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>Layout33</cstring>
                    </property>
                    <vbox>
                        <property stdset="1">
                            <name>margin</name>
                            <number>0</number>
                        </property>
                        <property stdset="1">
                            <name>spacing</name>
                            <number>6</number>
                        </property>
                        <widget>
                            <class>QLabel</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>typeLA</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>Reference &amp;type</string>
                            </property>
                            <property>
                                <name>buddy</name>
                                <cstring>typeLA</cstring>
                            </property>
                            <property stdset="1">
                                <name>alignment</name>
                                <set>AlignCenter</set>
                            </property>
                            <property>
                                <name>hAlign</name>
                            </property>
                        </widget>
                        <widget>
                            <class>QComboBox</class>
                            <item>
                                <property>
                                    <name>text</name>
                                    <string>Reference</string>
                                </property>
                            </item>
                            <item>
                                <property>
                                    <name>text</name>
                                    <string>Page number</string>
                                </property>
                            </item>
                            <item>
                                <property>
                                    <name>text</name>
                                    <string>Ref on page xxx</string>
                                </property>
                            </item>
                            <item>
                                <property>
                                    <name>text</name>
                                    <string>On page xxx</string>
                                </property>
                            </item>
                            <item>
                                <property>
                                    <name>text</name>
                                    <string>Pretty reference</string>
                                </property>
                            </item>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>typeCO</cstring>
                            </property>
                            <property>
                                <name>toolTip</name>
                                <string>Reference as it appears in output</string>
                            </property>
                        </widget>
                    </vbox>
                </widget>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer8</cstring>
                    </property>
                    <property stdset="1">
                        <name>orientation</name>
                        <enum>Vertical</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>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>gotoPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Goto reference</string>
                    </property>
                </widget>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer9</cstring>
                    </property>
                    <property stdset="1">
                        <name>orientation</name>
                        <enum>Vertical</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>
                    <class>QLayoutWidget</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>Layout34</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>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>okPB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>&amp;OK</string>
                            </property>
                            <property stdset="1">
                                <name>default</name>
                                <bool>true</bool>
                            </property>
                        </widget>
                        <widget>
                            <class>QPushButton</class>
                            <property stdset="1">
                                <name>name</name>
                                <cstring>cancelPB</cstring>
                            </property>
                            <property stdset="1">
                                <name>text</name>
                                <string>&amp;Cancel</string>
                            </property>
                        </widget>
                    </hbox>
                </widget>
            </vbox>
        </widget>
    </hbox>
</widget>
<connections>
    <connection>
        <sender>refsLB</sender>
        <signal>highlighted(const QString&amp;)</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>highlight_adaptor(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>refsLB</sender>
        <signal>selected(const QString&amp;)</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>select_adaptor(const QString&amp;)</slot>
    </connection>
    <connection>
        <sender>sortCB</sender>
        <signal>toggled(bool)</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>sort_adaptor(bool)</slot>
    </connection>
    <connection>
        <sender>updatePB</sender>
        <signal>clicked()</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>update_adaptor()</slot>
    </connection>
    <connection>
        <sender>okPB</sender>
        <signal>clicked()</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>apply_adaptor()</slot>
    </connection>
    <connection>
        <sender>cancelPB</sender>
        <signal>clicked()</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>close_adaptor()</slot>
    </connection>
    <connection>
        <sender>gotoPB</sender>
        <signal>clicked()</signal>
        <receiver>FormReferenceDialogBase</receiver>
        <slot>goto_adaptor()</slot>
    </connection>
    <slot access="public">apply_adaptor()</slot>
    <slot access="public">goto_adaptor()</slot>
    <slot access="public">highlight_adaptor(const QString&amp;)</slot>
    <slot access="public">close_adaptor()</slot>
    <slot access="public">select_adaptor(const QString&amp;)</slot>
    <slot access="public">sort_adaptor(bool)</slot>
    <slot access="public">update_adaptor()</slot>
</connections>
</UI>
/*
 * FormToc.C
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <config.h>

#include <stack>

#include <qslider.h>
#include "FormTocDialog.h"
#undef emit

#include "Dialogs.h"
#include "FormToc.h"
#include "gettext.h"
#include "buffer.h"
#include "support/lstrings.h"
#include "QtLyXView.h"
#include "lyxfunc.h"
#include "debug.h"

using std::vector;
using std::pair;
using std::stack;
using std::endl;

#include <qlistview.h>
#include <qcombobox.h>
 
FormToc::FormToc(LyXView *v, Dialogs *d)
	: dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0),
	toclist(0), type(Buffer::TOC_TOC), depth(1)
{
	// let the dialog be shown
	// This is a permanent connection so we won't bother
	// storing a copy because we won't be disconnecting.
	d->showTOC.connect(slot(this, &FormToc::showTOC));
	d->createTOC.connect(slot(this, &FormToc::createTOC));
}

FormToc::~FormToc()
{
	delete dialog_;
}

void FormToc::showTOC(InsetCommand * const inset)
{
	// FIXME: when could inset be 0 here ?
	if (inset==0)
		return;

	inset_ = inset;
	ih_ = inset_->hide.connect(slot(this,&FormToc::hide));
	params = inset->params();
	
	show();
}

void FormToc::createTOC(string const & arg)
{
	if (inset_)
		close();

	params.setFromString(arg);
	show();
}

void FormToc::updateToc(int newdepth)
{
	if (!lv_->view()->available()) {
		toclist.clear();
		dialog_->tocLV->clear();
		return;
	}

	vector< vector<Buffer::TocItem> > tmp =
		lv_->view()->buffer()->getTocList();

	// Check if all elements are the same.
	if (newdepth==depth && toclist.size() == tmp[type].size()) {
		unsigned int i = 0;
		for (; i < toclist.size(); ++i) {
			if (toclist[i] !=  tmp[type][i])
				break;
		}
		if (i >= toclist.size())
			return;
	}

	depth=newdepth;

	toclist = tmp[type];

	dialog_->tocLV->clear();
	if (toclist.empty()) 
		return;

	dialog_->tocLV->setUpdatesEnabled(false);

	int curdepth = 0;
	stack< pair< QListViewItem *, QListViewItem *> > istack;
	QListViewItem *last = 0;
	QListViewItem *parent = 0;
	QListViewItem *item;

	// Yes, it is this ugly. Two reasons - root items must have a QListView parent,
	// rather than QListViewItem; and the TOC can move in and out an arbitrary number
	// of levels

	for (vector< Buffer::TocItem >::const_iterator iter = toclist.begin();
		iter != toclist.end(); ++iter) {
		if (iter->depth == curdepth) {
			// insert it after the last one we processed
			if (!parent)
				item = (last) ? (new QListViewItem(dialog_->tocLV,last)) : (new QListViewItem(dialog_->tocLV));
			else
				item = (last) ? (new QListViewItem(parent,last)) : (new QListViewItem(parent));
		} else if (iter->depth > curdepth) {
			int diff = iter->depth - curdepth;
			// first save old parent and last
			while (diff--)
				istack.push(pair< QListViewItem *, QListViewItem * >(parent,last));
			item = (last) ? (new QListViewItem(last)) : (new QListViewItem(dialog_->tocLV));
			parent = last;
		} else {
			int diff = curdepth - iter->depth;
			pair< QListViewItem *, QListViewItem * > top;
			// restore context
			while (diff--) {
				top = istack.top();
				istack.pop();
			}
			parent = top.first;
			last = top.second;
			// insert it after the last one we processed
			if (!parent)
				item = (last) ? (new QListViewItem(dialog_->tocLV,last)) : (new QListViewItem(dialog_->tocLV));
			else
				item = (last) ? (new QListViewItem(parent,last)) : (new QListViewItem(parent));
		}
		lyxerr[Debug::GUI] << "Table of contents" << endl << "Added item " << iter->str.c_str()
			<< " at depth " << iter->depth << ", previous sibling \"" << (last ? last->text(0).latin1() : "0")
			<< "\", parent \"" << (parent ? parent->text(0).latin1() : "0") << "\"" << endl;
		item->setText(0,iter->str.c_str());
		item->setOpen(iter->depth < depth);
		curdepth = iter->depth;
		last = item;
	}

	dialog_->tocLV->setUpdatesEnabled(true);
	dialog_->tocLV->update();
}

void FormToc::setType(Buffer::TocType toctype)
{
	type = toctype;
	switch (type) {
		case Buffer::TOC_TOC:
			dialog_->setCaption(_("Table of Contents"));
			dialog_->tocLV->setColumnText(0,_("Table of Contents"));
			dialog_->depthSL->setEnabled(true);
			break;
		case Buffer::TOC_LOF:
			dialog_->setCaption(_("List of Figures"));
			dialog_->tocLV->setColumnText(0,_("List of Figures"));
			dialog_->depthSL->setEnabled(false);
			break;
		case Buffer::TOC_LOT:
			dialog_->setCaption(_("List of Tables"));
			dialog_->tocLV->setColumnText(0,_("List of Tables"));
			dialog_->depthSL->setEnabled(false);
			break;
		case Buffer::TOC_LOA:
			dialog_->setCaption(_("List of Algorithms"));
			dialog_->tocLV->setColumnText(0,_("List of Algorithms"));
			dialog_->depthSL->setEnabled(false);
			break;
	}
}

void FormToc::set_depth(int newdepth)
{
	if (newdepth!=depth)
		updateToc(newdepth);
}

void FormToc::update()
{
	if (params.getCmdName()=="tableofcontents") {
		setType(Buffer::TOC_TOC);
		dialog_->typeCO->setCurrentItem(0);
	} else if (params.getCmdName()=="listoffigures") {
		setType(Buffer::TOC_LOF);
		dialog_->typeCO->setCurrentItem(1);
	} else if (params.getCmdName()=="listoftables") {
		setType(Buffer::TOC_LOT);
		dialog_->typeCO->setCurrentItem(2);
	} else {
		setType(Buffer::TOC_LOA);
		dialog_->typeCO->setCurrentItem(3);
	}

	updateToc(depth);
}

void FormToc::select(const char *text)
{
	if (!lv_->view()->available())
		return;

	vector <Buffer::TocItem>::const_iterator iter = toclist.begin();
	for (; iter != toclist.end(); ++iter) {
		if (iter->str==text)
			break;
	}
	
	if (iter==toclist.end()) {
		lyxerr[Debug::GUI] << "Couldn't find highlighted TOC entry : " << text << endl;
		return;
	}

	lv_->getLyXFunc()->Dispatch(LFUN_GOTO_PARAGRAPH, tostr(iter->par->id()).c_str());
}

void FormToc::set_type(Buffer::TocType toctype)
{
	if (toctype==type)
		return;

	setType(toctype);
	updateToc(depth);
}

void FormToc::show()
{
	if (!dialog_)
		dialog_ = new FormTocDialog(this, 0, _("LyX: Table of Contents"), false);

	if (!dialog_->isVisible()) {
		h_ = d_->hideBufferDependent.connect(slot(this, &FormToc::hide));
		u_ = d_->updateBufferDependent.connect(slot(this, &FormToc::update));
	}

	dialog_->raise();
	dialog_->setActiveWindow();

	update();
	dialog_->show();
}

void FormToc::close()
{
	h_.disconnect();
	u_.disconnect();
	ih_.disconnect();
	inset_ = 0;
}

void FormToc::hide()
{
	dialog_->hide();
	close();
}
/*
 * FormRef.C
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <config.h>

#include "FormRefDialog.h"
#undef emit

#include "Dialogs.h"
#include "FormRef.h"
#include "gettext.h"
#include "buffer.h"
#include "LyXView.h"
#include "lyxfunc.h"
#include "debug.h"

#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qcombobox.h>
#include <qcheckbox.h>

using std::endl;

FormRef::FormRef(LyXView *v, Dialogs *d)
	: dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0),
	sort(0), gotowhere(GOTOREF), type(REF), refs(0)
{
	// let the dialog be shown
	// This is a permanent connection so we won't bother
	// storing a copy because we won't be disconnecting.
	d->showRef.connect(slot(this, &FormRef::showRef));
	d->createRef.connect(slot(this, &FormRef::createRef));
}

FormRef::~FormRef()
{
	delete dialog_;
}

void FormRef::showRef(InsetCommand * const inset)
{
	// FIXME: when could inset be 0 here ?
	if (inset==0)
		return;

	inset_ = inset;
	readonly = lv_->buffer()->isReadonly();
	ih_ = inset_->hide.connect(slot(this,&FormRef::hide));
	params = inset->params();
	
	show();
}

void FormRef::createRef(string const & arg)
{
	if (inset_)
		close();

	readonly = lv_->buffer()->isReadonly();
	params.setFromString(arg);
	show();
}

void FormRef::select(const char *text)
{
	highlight(text);
	goto_ref();
}

void FormRef::highlight(const char *text)
{
	if (gotowhere==GOTOBACK)
		goto_ref();

	dialog_->gotoPB->setEnabled(true);
	if (!readonly) {
		dialog_->typeCO->setEnabled(true);
		dialog_->referenceED->setText(text);
		dialog_->okPB->setEnabled(true);
	}
}

void FormRef::set_sort(bool on)
{
	if (on!=sort) {
		sort=on;
		dialog_->refsLB->clear();
		updateRefs();
	}
}

void FormRef::goto_ref()
{
	switch (gotowhere) {
		case GOTOREF:
			lv_->getLyXFunc()->Dispatch(LFUN_REF_GOTO, dialog_->referenceED->text().latin1());
			gotowhere=GOTOBACK;
			dialog_->gotoPB->setText(_("&Go back"));
			break;
		case GOTOBACK:
			lv_->getLyXFunc()->Dispatch(LFUN_REF_BACK);
			gotowhere=GOTOREF;
			dialog_->gotoPB->setText(_("&Goto reference"));
			break;
		}
}

void FormRef::updateRefs()
{
	// list will be re-done, should go back if necessary
	if (gotowhere==GOTOBACK) {
		lv_->getLyXFunc()->Dispatch(LFUN_REF_BACK);
		gotowhere = GOTOREF;
		dialog_->gotoPB->setText(_("&Goto reference"));
	}

	dialog_->refsLB->setAutoUpdate(false);

	// need this because Qt will send a highlight() here for
	// the first item inserted
	string tmp(dialog_->referenceED->text());

	for (vector< string >::const_iterator iter = refs.begin();
		iter != refs.end(); ++iter) {
		if (sort)
			dialog_->refsLB->inSort(iter->c_str());
		else
			dialog_->refsLB->insertItem(iter->c_str());
	}

	dialog_->referenceED->setText(tmp.c_str());

	for (unsigned int i = 0; i < dialog_->refsLB->count(); ++i) {
		if (!strcmp(dialog_->referenceED->text(),dialog_->refsLB->text(i)))
			dialog_->refsLB->setCurrentItem(i);
	}

	dialog_->refsLB->setAutoUpdate(true);
	dialog_->refsLB->update();
}

void FormRef::do_ref_update()
{
	refs.clear();
	dialog_->refsLB->clear();
	refs = lv_->buffer()->getLabelList();
	if (!refs.empty())
		dialog_->sortCB->setEnabled(true);
	updateRefs();
}

void FormRef::update()
{
	dialog_->referenceED->setText(params.getContents().c_str());
	dialog_->nameED->setText(params.getOptions().c_str());

	if (params.getCmdName()=="pageref") {
		type = PAGEREF;
		dialog_->typeCO->setCurrentItem(1);
	} else if (params.getCmdName()=="vref") {
		type = VREF;
		dialog_->typeCO->setCurrentItem(2);
	} else if (params.getCmdName()=="vpageref") {
		type = VPAGEREF;
		dialog_->typeCO->setCurrentItem(3);
	} else if (params.getCmdName()=="prettyref") {
		type = PRETTYREF;
		dialog_->typeCO->setCurrentItem(4);
	} else {
		type = REF;
		dialog_->typeCO->setCurrentItem(0);
	}

	dialog_->gotoPB->setText(_("&Goto reference"));

	gotowhere = GOTOREF;

	dialog_->sortCB->setChecked(sort);

	do_ref_update();

	dialog_->gotoPB->setEnabled(params.getContents()!="");
	dialog_->okPB->setEnabled(params.getContents()!="");

	dialog_->typeCO->setEnabled(!readonly);
	dialog_->sortCB->setEnabled(!readonly);
	dialog_->refsLB->setEnabled(!readonly);
	dialog_->okPB->setEnabled(!readonly);
	dialog_->updatePB->setEnabled(!readonly);
	if (readonly)
		dialog_->cancelPB->setText(_("&Close"));
	else
		dialog_->cancelPB->setText(_("&Cancel"));
}

void FormRef::apply()
{
	if (readonly)
		return;

	if (!lv_->view()->available())
		return;

	switch (dialog_->typeCO->currentItem()) {
		case 0:
			params.setCmdName("ref");
			break;
		case 1:
			params.setCmdName("pageref");
			break;
		case 2:
			params.setCmdName("vref");
			break;
		case 3:
			params.setCmdName("vpageref");
			break;
		case 4:
			params.setCmdName("prettyref");
			break;
		default:
			lyxerr[Debug::GUI] << "Unknown Ref Type" << endl;
	}

	params.setContents(dialog_->referenceED->text().latin1());
	params.setOptions(dialog_->nameED->text().latin1());

	if (inset_ != 0) {
		if (params != inset_->params()) {
			inset_->setParams(params);
			lv_->view()->updateInset(inset_, true);
		}
	} else
		lv_->getLyXFunc()->Dispatch(LFUN_REF_INSERT, params.getAsString().c_str());
}

void FormRef::show()
{
	if (!dialog_)
		dialog_ = new FormRefDialog(this, 0, _("LyX: Cross Reference"), false);

	if (!dialog_->isVisible()) {
		h_ = d_->hideBufferDependent.connect(slot(this, &FormRef::hide));
		u_ = d_->updateBufferDependent.connect(slot(this, &FormRef::update));
	}

	dialog_->raise();
	dialog_->setActiveWindow();

	update();
	dialog_->show();
}

void FormRef::close()
{
	h_.disconnect();
	u_.disconnect();
	ih_.disconnect();
	inset_ = 0;
}

void FormRef::hide()
{
	dialog_->hide();
	close();
}
<!DOCTYPE UI><UI>
<class>FormTocDialogBase</class>
<widget>
    <class>QDialog</class>
    <property stdset="1">
        <name>name</name>
        <cstring>FormTocDialogBase</cstring>
    </property>
    <property stdset="1">
        <name>geometry</name>
        <rect>
            <x>0</x>
            <y>0</y>
            <width>358</width>
            <height>313</height>
        </rect>
    </property>
    <property stdset="1">
        <name>caption</name>
        <string>Table Of Contents</string>
    </property>
    <vbox>
        <property stdset="1">
            <name>margin</name>
            <number>11</number>
        </property>
        <property stdset="1">
            <name>spacing</name>
            <number>6</number>
        </property>
        <widget>
            <class>QListView</class>
            <column>
                <property>
                    <name>text</name>
                    <string>Table Of Contents</string>
                </property>
                <property>
                    <name>clickable</name>
                    <bool>true</bool>
                </property>
                <property>
                    <name>resizeable</name>
                    <bool>true</bool>
                </property>
            </column>
            <property stdset="1">
                <name>name</name>
                <cstring>tocLV</cstring>
            </property>
        </widget>
        <widget>
            <class>QSlider</class>
            <property stdset="1">
                <name>name</name>
                <cstring>depthSL</cstring>
            </property>
            <property stdset="1">
                <name>orientation</name>
                <enum>Horizontal</enum>
            </property>
            <property stdset="1">
                <name>maxValue</name>
                <number>5</number>
            </property>
            <property stdset="1">
                <name>pageStep</name>
                <number>1</number>
            </property>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout39</cstring>
            </property>
            <hbox>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <spacer>
                    <property>
                        <name>name</name>
                        <cstring>Spacer11</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>
                    <property>
                        <name>sizeHint</name>
                        <size>
                            <width>20</width>
                            <height>20</height>
                        </size>
                    </property>
                </spacer>
                <widget>
                    <class>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>typeLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Type</string>
                    </property>
                    <property>
                        <name>buddy</name>
                        <cstring>typeCO</cstring>
                    </property>
                </widget>
                <widget>
                    <class>QComboBox</class>
                    <item>
                        <property>
                            <name>text</name>
                            <string>Table of Contents</string>
                        </property>
                    </item>
                    <item>
                        <property>
                            <name>text</name>
                            <string>List of Figures</string>
                        </property>
                    </item>
                    <item>
                        <property>
                            <name>text</name>
                            <string>List of Tables</string>
                        </property>
                    </item>
                    <item>
                        <property>
                            <name>text</name>
                            <string>List of Algorithms</string>
                        </property>
                    </item>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>typeCO</cstring>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>updatePB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Update</string>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>closePB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Close</string>
                    </property>
                    <property stdset="1">
                        <name>default</name>
                        <bool>true</bool>
                    </property>
                </widget>
            </hbox>
        </widget>
    </vbox>
</widget>
<connections>
    <connection>
        <sender>tocLV</sender>
        <signal>selectionChanged(QListViewItem*)</signal>
        <receiver>FormTocDialogBase</receiver>
        <slot>select_adaptor(QListViewItem*)</slot>
    </connection>
    <connection>
        <sender>typeCO</sender>
        <signal>activated(int)</signal>
        <receiver>FormTocDialogBase</receiver>
        <slot>activate_adaptor(int)</slot>
    </connection>
    <connection>
        <sender>updatePB</sender>
        <signal>clicked()</signal>
        <receiver>FormTocDialogBase</receiver>
        <slot>update_adaptor()</slot>
    </connection>
    <connection>
        <sender>closePB</sender>
        <signal>clicked()</signal>
        <receiver>FormTocDialogBase</receiver>
        <slot>close_adaptor()</slot>
    </connection>
    <connection>
        <sender>depthSL</sender>
        <signal>valueChanged(int)</signal>
        <receiver>FormTocDialogBase</receiver>
        <slot>depth_adaptor(int)</slot>
    </connection>
    <slot access="public">activate_adaptor(int)</slot>
    <slot access="public">close_adaptor()</slot>
    <slot access="public">depth_adaptor(int)</slot>
    <slot access="public">select_adaptor(QListViewItem*)</slot>
    <slot access="public">update_adaptor()</slot>
</connections>
</UI>
<!DOCTYPE UI><UI>
<class>FormIndexDialogBase</class>
<widget>
    <class>QDialog</class>
    <property stdset="1">
        <name>name</name>
        <cstring>FormIndexDialogBase</cstring>
    </property>
    <property stdset="1">
        <name>geometry</name>
        <rect>
            <x>0</x>
            <y>0</y>
            <width>216</width>
            <height>82</height>
        </rect>
    </property>
    <property stdset="1">
        <name>caption</name>
        <string>Index</string>
    </property>
    <vbox>
        <property stdset="1">
            <name>margin</name>
            <number>11</number>
        </property>
        <property stdset="1">
            <name>spacing</name>
            <number>6</number>
        </property>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout28</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>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>keywordLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Keyword</string>
                    </property>
                    <property>
                        <name>buddy</name>
                        <cstring>keywordED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Index entry</string>
                    </property>
                </widget>
                <widget>
                    <class>QLineEdit</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>keywordED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Index entry</string>
                    </property>
                </widget>
            </hbox>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout27</cstring>
            </property>
            <hbox>
                <property stdset="1">
                    <name>margin</name>
                    <number>0</number>
                </property>
                <property stdset="1">
                    <name>spacing</name>
                    <number>6</number>
                </property>
                <spacer>
                    <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>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>okPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>OK</string>
                    </property>
                    <property stdset="1">
                        <name>default</name>
                        <bool>true</bool>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>cancelPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>Cancel</string>
                    </property>
                </widget>
            </hbox>
        </widget>
    </vbox>
</widget>
<connections>
    <connection>
        <sender>okPB</sender>
        <signal>clicked()</signal>
        <receiver>FormIndexDialogBase</receiver>
        <slot>apply_adaptor()</slot>
    </connection>
    <connection>
        <sender>cancelPB</sender>
        <signal>clicked()</signal>
        <receiver>FormIndexDialogBase</receiver>
        <slot>close_adaptor()</slot>
    </connection>
    <slot access="public">apply_adaptor()</slot>
    <slot access="public">close_adaptor()</slot>
</connections>
</UI>
#include "FormDocumentDialog.h"
#include "Dialogs.h"
#include "FormDocument.h"

#include <qlineedit.h>
#include <qcheckbox.h>
#include <qtoolbutton.h>
#include <qbuttongroup.h>
#include <qcombobox.h>
#include <qspinbox.h>

/* 
 *  Constructs a FormDocumentDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
FormDocumentDialog::FormDocumentDialog( FormDocument* _form, QWidget* parent,  const char* name, bool modal, WFlags fl )
  : FormDocumentDialogBase( parent, name, modal, fl ),
    form( _form )
{
  // Copy the pointers to the bullet buttons into an array so that
  // they can all be manipulated together.
  bulletbuttons[0] = bullet00PB;
  bulletbuttons[1] = bullet01PB;
  bulletbuttons[2] = bullet02PB;
  bulletbuttons[3] = bullet03PB;
  bulletbuttons[4] = bullet04PB;
  bulletbuttons[5] = bullet05PB;
  bulletbuttons[6] = bullet10PB;
  bulletbuttons[7] = bullet11PB;
  bulletbuttons[8] = bullet12PB;
  bulletbuttons[9] = bullet13PB;
  bulletbuttons[10] = bullet14PB;
  bulletbuttons[11] = bullet15PB;
  bulletbuttons[12] = bullet20PB;
  bulletbuttons[13] = bullet21PB;
  bulletbuttons[14] = bullet22PB;
  bulletbuttons[15] = bullet23PB;
  bulletbuttons[16] = bullet24PB;
  bulletbuttons[17] = bullet25PB;
  bulletbuttons[18] = bullet30PB;
  bulletbuttons[19] = bullet31PB;
  bulletbuttons[20] = bullet32PB;
  bulletbuttons[21] = bullet33PB;
  bulletbuttons[22] = bullet34PB;
  bulletbuttons[23] = bullet35PB;
  bulletbuttons[24] = bullet40PB;
  bulletbuttons[25] = bullet41PB;
  bulletbuttons[26] = bullet42PB;
  bulletbuttons[27] = bullet43PB;
  bulletbuttons[28] = bullet44PB;
  bulletbuttons[29] = bullet45PB;
  bulletbuttons[30] = bullet50PB;
  bulletbuttons[31] = bullet51PB;
  bulletbuttons[32] = bullet52PB;
  bulletbuttons[33] = bullet53PB;
  bulletbuttons[34] = bullet54PB;
  bulletbuttons[35] = bullet55PB;
}

/*  
 *  Destroys the object and frees any allocated resources
 */
FormDocumentDialog::~FormDocumentDialog()
{
  // no need to delete child widgets, Qt does it all for us
}

/* 
 * public slot
 */
void FormDocumentDialog::slotApply()
{
  form->apply();
  // PENDING(kalle) Check whether we need this
  //  form->bc_->apply();
}
/* 
 * public slot
 */
void FormDocumentDialog::slotAMSMath(bool)
{
  form->checkDocumentInput( amsMathCB );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDepth1()
{
  form->bulletDepth( 0 );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDepth2()
{
  form->bulletDepth( 1 );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDepth3()
{
  form->bulletDepth( 2 );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDepth4()
{
  form->bulletDepth( 3 );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDing1()
{
  qDebug( "FormDocumentDialog::slotBulletDing1()" );
  form->checkDocumentInput( bulletDing1PB );
  form->setBulletPics();
  bulletStandardPB->setOn( false );
  bulletMathsPB->setOn( false );
  bulletDing2PB->setOn( false );
  bulletDing3PB->setOn( false );
  bulletDing4PB->setOn( false );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDing2()
{
  form->checkDocumentInput( bulletDing2PB );
  form->setBulletPics();
  bulletStandardPB->setOn( false );
  bulletMathsPB->setOn( false );
  bulletDing1PB->setOn( false );
  bulletDing3PB->setOn( false );
  bulletDing4PB->setOn( false );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDing3()
{
  form->checkDocumentInput( bulletDing3PB );
  form->setBulletPics();
  bulletStandardPB->setOn( false );
  bulletMathsPB->setOn( false );
  bulletDing2PB->setOn( false );
  bulletDing1PB->setOn( false );
  bulletDing4PB->setOn( false );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletDing4()
{
  form->checkDocumentInput( bulletDing4PB );
  form->setBulletPics();
  bulletStandardPB->setOn( false );
  bulletMathsPB->setOn( false );
  bulletDing2PB->setOn( false );
  bulletDing3PB->setOn( false );
  bulletDing1PB->setOn( false );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletMaths()
{
  form->checkDocumentInput( bulletMathsPB );
  form->setBulletPics();
  bulletStandardPB->setOn( false );
  bulletDing1PB->setOn( false );
  bulletDing2PB->setOn( false );
  bulletDing3PB->setOn( false );
  bulletDing4PB->setOn( false );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletSize(int)
{
  form->choiceBulletSize();
  form->checkDocumentInput( bulletSizeCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletStandard()
{
  form->checkDocumentInput( bulletStandardPB );
  form->setBulletPics();
  bulletDing1PB->setOn( false );
  bulletMathsPB->setOn( false );
  bulletDing2PB->setOn( false );
  bulletDing3PB->setOn( false );
  bulletDing4PB->setOn( false );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletSymbol(int n)
{
  qDebug( "FormDocumentDialog::slotBulletSymbol( %d )", n );
  for( int i = 0; i < 36; i++ )
    bulletbuttons[i]->setOn( false );
  bulletbuttons[n]->setOn( true );
  form->bulletBMTable( n );
  form->checkDocumentInput( bulletTypeBG );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotClass(int)
{
  form->checkChoiceClass( 0 );
  form->checkDocumentInput( classesCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotClose()
{
  form->cancel();
  form->hide();
  // PENDING(kalle) do something with this
  //  form->bc_->cancel();
}
/* 
 * public slot
 */
void FormDocumentDialog::slotColumns(int)
{
  form->checkDocumentInput( columnsBG );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotDefaultSkip(const QString&)
{
  form->checkDocumentInput( defaultSkipED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotDefaultSkip(int)
{
  form->checkChoiceClass( defaultSkipCO );
  form->checkDocumentInput( defaultSkipCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotEncoding(int)
{
  form->checkChoiceClass( encodingCO );
  form->checkDocumentInput( encodingCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotExtraOptions(const QString&)
{
  form->checkDocumentInput( extraOptionsED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotFloatPlacement(const QString&)
{
  form->checkDocumentInput( floatPlacementED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotFont(int)
{
  form->checkChoiceClass( fontsCO );
  form->checkDocumentInput( fontsCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotFontSize(int)
{
  form->checkChoiceClass( fontSizeCO );
  form->checkDocumentInput( fontSizeCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotFootskip(const QString&)
{
  form->checkDocumentInput( footskipED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotHeadheight(const QString&)
{
  form->checkDocumentInput( headheightED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotHeadsep(const QString&)
{
  form->checkDocumentInput( headsepED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotHeight(const QString&)
{
  form->checkDocumentInput( customHeightED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotLanguage(int)
{
  form->checkChoiceClass( languageCO );
  form->checkDocumentInput( languageCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotBulletLaTeX(const QString&)
{
  form->inputBulletLaTeX();
  form->checkDocumentInput( latexED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotMarginBottom(const QString&)
{
  form->checkDocumentInput( marginBottomED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotMarginLeft(const QString&)
{
  form->checkDocumentInput( marginLeftED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotMarginRight(const QString&)
{
  form->checkDocumentInput( marginRightED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotMarginTop(const QString&)
{
  form->checkDocumentInput( marginTopED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotOK()
{
  form->apply();
  form->hide();
  // PENDING(kalle) Do something about this.
  //  form->bc_->ok();
}
/* 
 * public slot
 */
void FormDocumentDialog::slotOrientation(int)
{
  form->checkDocumentInput( orientationBG );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotPSDriver(int)
{
  form->checkChoiceClass( psDriverCO );
  form->checkDocumentInput( psDriverCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotPageStyle(int)
{
  form->checkChoiceClass( pagestyleCO );
  form->checkDocumentInput( pagestyleCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotPapersize(int)
{
  form->checkChoiceClass( pagestyleCO );
  form->checkDocumentInput( papersizeCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotQuoteStyle(int)
{
  form->checkChoiceClass( quoteStyleTypeCO );
  form->checkDocumentInput( quoteStyleTypeCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotQuoteType(int)
{
  // Intentionally left blank
}
/* 
 * public slot
 */
void FormDocumentDialog::slotRestore()
{
  form->update();
  // PENDING(kalle) Do something about this.
  //  form->bc_->updateAll();
}
/* 
 * public slot
 */
void FormDocumentDialog::slotSectionNumberDepth(int)
{
  form->checkDocumentInput( sectionNumberDepthSB );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotSeparation(int)
{
  form->checkDocumentInput( separationBG );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotSides(int)
{
  form->checkDocumentInput( sidesBG );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotSpacing(const QString&)
{
  form->checkDocumentInput( spacingED );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotSpacing(int)
{
  form->checkDocumentInput( spacingCO );
  form->checkDocumentInput( spacingCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotSpecialPaperPackage(int)
{
  form->checkChoiceClass( specialCO );
  form->checkDocumentInput( specialCO );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotTOCDepth(int)
{
  form->checkDocumentInput( tocDepthSB );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotUseGeometryPackage(bool)
{
  form->checkDocumentInput( CheckBox1 );
}
/* 
 * public slot
 */
void FormDocumentDialog::slotWidth(const QString&)
{
  form->checkDocumentInput( customWidthED );
}


void FormDocumentDialog::closeEvent( QCloseEvent* e )
{
  form->hide();
  //PENDING(kalle) Do something about this.
  //  form->bc_->hide();
  e->accept();
}
<!DOCTYPE UI><UI>
<class>FormUrlDialogBase</class>
<widget>
    <class>QDialog</class>
    <property stdset="1">
        <name>name</name>
        <cstring>FormUrlDialogBase</cstring>
    </property>
    <property stdset="1">
        <name>geometry</name>
        <rect>
            <x>0</x>
            <y>0</y>
            <width>325</width>
            <height>112</height>
        </rect>
    </property>
    <property stdset="1">
        <name>caption</name>
        <string>Url</string>
    </property>
    <vbox>
        <property stdset="1">
            <name>margin</name>
            <number>11</number>
        </property>
        <property stdset="1">
            <name>spacing</name>
            <number>6</number>
        </property>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout2</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>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>urlLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Url</string>
                    </property>
                    <property>
                        <name>buddy</name>
                        <cstring>urlED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>URL</string>
                    </property>
                </widget>
                <widget>
                    <class>QLineEdit</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>urlED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>URL</string>
                    </property>
                </widget>
            </hbox>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout3</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>QLabel</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>nameLA</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Name</string>
                    </property>
                    <property>
                        <name>buddy</name>
                        <cstring>nameED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Name associated with the URL</string>
                    </property>
                </widget>
                <widget>
                    <class>QLineEdit</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>nameED</cstring>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Name associated with the URL</string>
                    </property>
                </widget>
            </hbox>
        </widget>
        <widget>
            <class>QLayoutWidget</class>
            <property stdset="1">
                <name>name</name>
                <cstring>Layout4</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>QCheckBox</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>hyperlinkCB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Generate hyperlink</string>
                    </property>
                    <property>
                        <name>toolTip</name>
                        <string>Output as a hyperlink ?</string>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>okPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;OK</string>
                    </property>
                    <property stdset="1">
                        <name>default</name>
                        <bool>true</bool>
                    </property>
                </widget>
                <widget>
                    <class>QPushButton</class>
                    <property stdset="1">
                        <name>name</name>
                        <cstring>cancelPB</cstring>
                    </property>
                    <property stdset="1">
                        <name>text</name>
                        <string>&amp;Cancel</string>
                    </property>
                </widget>
            </hbox>
        </widget>
    </vbox>
</widget>
<connections>
    <connection>
        <sender>okPB</sender>
        <signal>clicked()</signal>
        <receiver>FormUrlDialogBase</receiver>
        <slot>apply_adaptor()</slot>
    </connection>
    <connection>
        <sender>cancelPB</sender>
        <signal>clicked()</signal>
        <receiver>FormUrlDialogBase</receiver>
        <slot>close_adaptor()</slot>
    </connection>
    <slot access="public">apply_adaptor()</slot>
    <slot access="public">close_adaptor()</slot>
</connections>
</UI>
/* FormIndex.h
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 * Adapted for Qt2 frontend by Kalle Dalheimer, 
 *   [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef FORMINDEX_H
#define FORMINDEX_H

#include "DialogBase.h"
#include "LString.h"
#include "boost/utility.hpp"
#include "insets/insetindex.h"

class Dialogs;
class LyXView;
class FormIndexDialog;

class FormIndex : public DialogBase {
public: 
	/**@name Constructors and Destructors */
	//@{
	///
	FormIndex(LyXView *, Dialogs *);
	/// 
	~FormIndex();
	//@}

	/// Apply changes
	void apply();
	/// close the connections
	void close();
 
private: 
	/// Create the dialog if necessary, update it and display it.
	void show();
	/// Hide the dialog.
	void hide();
	/// Update the dialog.
	void update();

	/// create an Index inset
	void createIndex(string const &);
	/// edit an Index  inset
	void showIndex(InsetCommand * const);
 
	/// Real GUI implementation.
	FormIndexDialog * dialog_;

	/// the LyXView we belong to
	LyXView * lv_;
 
	/** Which Dialogs do we belong to?
	    Used so we can get at the signals we have to connect to.
	*/
	Dialogs * d_;
	/// pointer to the inset if any
	InsetCommand * inset_;
	/// insets params
	InsetCommandParams params;
	/// is the inset we are reading from a readonly buffer ?
	bool readonly;
	
	/// Hide connection.
	Connection h_;
	/// Update connection.
	Connection u_;
	/// Inset hide connection.
	Connection ih_;
};

#endif
#include "FormRefDialog.h"
#include "Dialogs.h"
#include "FormRef.h"

/* 
 *  Constructs a FormRefDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
FormRefDialog::FormRefDialog( FormRef* _form, QWidget* parent,  const char* name, bool modal, WFlags fl )
  : FormReferenceDialogBase( parent, name, modal, fl ),
    form( _form )
{
}

/*  
 *  Destroys the object and frees any allocated resources
 */
FormRefDialog::~FormRefDialog()
{
    // no need to delete child widgets, Qt does it all for us
}

/* 
 * public slot
 */
void FormRefDialog::apply_adaptor()
{
  form->apply();
  form->close();
  hide();
}
/* 
 * public slot
 */
void FormRefDialog::goto_adaptor()
{
  form->goto_ref();
}
/* 
 * public slot
 */
void FormRefDialog::highlight_adaptor(const QString& sel)
{
  form->highlight(sel); 
}
/* 
 * public slot
 */
void FormRefDialog::close_adaptor()
{
  form->close();
  hide();
}
/* 
 * public slot
 */
void FormRefDialog::select_adaptor(const QString& sel)
{
  form->select(sel);
}
/* 
 * public slot
 */
void FormRefDialog::sort_adaptor(bool sort)
{
  form->set_sort(sort);
}
/* 
 * public slot
 */
void FormRefDialog::update_adaptor()
{
  form->do_ref_update();
}

void FormRefDialog::closeEvent(QCloseEvent *e)
{
  form->close();
  e->accept();
}
/* FormToc.h
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 * Adapted for Qt2 frontend by Kalle Dalheimer, 
 *   [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef FORMTOC_H
#define FORMTOC_H

#include "DialogBase.h"
#include "LString.h"
#include "boost/utility.hpp"
#include "insets/insetcommand.h"
#include "buffer.h"

class Dialogs;
class FormTocDialog;

class FormToc : public DialogBase {
public:
	/**@name Constructors and Destructors */
	//@{
	///
	FormToc(LyXView *, Dialogs *);
	///
	~FormToc();
	//@}

	// Build the dialog
	virtual void build();
	/// Update the dialog before showing it.
	virtual void update();
	/// close the connections
	virtual void close();

private:
	/// Create the dialog if necessary, update it and display it.
	void show();
	/// Hide the dialog.
	void hide();

	/// create a Toc inset
	void createTOC(string const &);
	/// view a Toc inset
	void showTOC(InsetCommand * const);
	
	/// update the Toc
	void updateToc(int);

	/// Real GUI implementation.
	FormTocDialog * dialog_;

	/// the LyXView we belong to
	LyXView * lv_;

	/** Which Dialogs do we belong to?
	    Used so we can get at the signals we have to connect to.
	*/
	Dialogs * d_;
	/// pointer to the inset if any
	InsetCommand * inset_;
	/// insets params
	InsetCommandParams params;
	
	/// Hide connection.
	Connection h_;
	/// Update connection.
	Connection u_;
	/// Inset hide connection.
	Connection ih_;

	/// the toc list
	std::vector <Buffer::TocItem> toclist;

	/// depth of list shown
	int depth;
};

#endif
#ifndef FORMREFDIALOG_H
#define FORMREFDIALOG_H
#include "FormRefDialogBase.h"

class FormRef;

class FormRefDialog : public FormReferenceDialogBase
{ 
    Q_OBJECT

public:
    FormRefDialog( FormRef* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~FormRefDialog();

public slots:
    void apply_adaptor();
    void goto_adaptor();
    void highlight_adaptor(const QString&);
    void close_adaptor();
    void select_adaptor(const QString&);
    void sort_adaptor(bool);
    void update_adaptor();

protected:
    void closeEvent(QCloseEvent *e);

private:
    FormRef* form;
};

#endif // FORMREFDIALOG_H
#ifndef FORMDOCUMENTDIALOG_H
#define FORMDOCUMENTDIALOG_H
#include "FormDocumentDialogBase.h"

class FormDocument;

class FormDocumentDialog : public FormDocumentDialogBase
{ 
    Q_OBJECT

public:
    FormDocumentDialog( FormDocument* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~FormDocumentDialog();

public slots:
      void slotApply();
    void slotBulletLaTeX(const QString&);
    void slotAMSMath(bool);
    void slotBulletDepth1();
    void slotBulletDepth2();
    void slotBulletDepth3();
    void slotBulletDepth4();
    void slotBulletDing1();
    void slotBulletDing2();
    void slotBulletDing3();
    void slotBulletDing4();
    void slotBulletMaths();
    void slotBulletSize(int);
    void slotBulletStandard();
    void slotBulletSymbol(int);
    void slotClass(int);
    void slotClose();
    void slotColumns(int);
    void slotDefaultSkip(const QString&);
    void slotDefaultSkip(int);
    void slotEncoding(int);
    void slotExtraOptions(const QString&);
    void slotFloatPlacement(const QString&);
    void slotFont(int);
    void slotFontSize(int);
    void slotFootskip(const QString&);
    void slotHeadheight(const QString&);
    void slotHeadsep(const QString&);
    void slotHeight(const QString&);
    void slotLanguage(int);
    void slotMarginBottom(const QString&);
    void slotMarginLeft(const QString&);
    void slotMarginRight(const QString&);
    void slotMarginTop(const QString&);
    void slotOK();
    void slotOrientation(int);
    void slotPSDriver(int);
    void slotPageStyle(int);
    void slotPapersize(int);
    void slotQuoteStyle(int);
    void slotQuoteType(int);
    void slotRestore();
    void slotSectionNumberDepth(int);
    void slotSeparation(int);
    void slotSides(int);
    void slotSpacing(const QString&);
    void slotSpacing(int);
    void slotSpecialPaperPackage(int);
    void slotTOCDepth(int);
    void slotUseGeometryPackage(bool);
    void slotWidth(const QString&);

protected:
    void closeEvent( QCloseEvent* );

private:
    FormDocument* form;
    QToolButton* bulletbuttons[36];
};

#endif // FORMDOCUMENTDIALOG_H
#include "FormUrlDialog.h"
#include "Dialogs.h"
#include "FormUrl.h"

/* 
 *  Constructs a FormUrlDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
FormUrlDialog::FormUrlDialog( FormUrl* _form, QWidget* parent,  const char* name, bool modal, WFlags fl )
  : FormUrlDialogBase( parent, name, modal, fl ),
    form( _form )
{
}

/*  
 *  Destroys the object and frees any allocated resources
 */
FormUrlDialog::~FormUrlDialog()
{
    // no need to delete child widgets, Qt does it all for us
}

/* 
 * public slot
 */
void FormUrlDialog::apply_adaptor()
{
  form->apply();
  form->close();
  hide();
}
/* 
 * public slot
 */
void FormUrlDialog::close_adaptor()
{
  form->close();
  hide();
}

void FormUrlDialog::closeEvent(QCloseEvent *e)
{
  form->close();
  e->accept();
}
#include "FormIndexDialog.h"
#include "Dialogs.h"
#include "FormIndex.h"

/* 
 *  Constructs a FormIndexDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
FormIndexDialog::FormIndexDialog( FormIndex* form_, QWidget* parent,  const char* name, bool modal, WFlags fl )
  : FormIndexDialogBase( parent, name, modal, fl ),
    form( form_ )
{
}

/*  
 *  Destroys the object and frees any allocated resources
 */
FormIndexDialog::~FormIndexDialog()
{
    // no need to delete child widgets, Qt does it all for us
}


void FormIndexDialog::apply_adaptor()
{
  form->apply();
  form->close();
  hide();
}


void FormIndexDialog::close_adaptor()
{
  form->close();
  hide();
}


void FormIndexDialog::closeEvent(QCloseEvent *e)
{
  form->close();
  e->accept();
}
/* FormCitation.h
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 * Changed for Qt2 port by Kalle Dalheimer, [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef FORMCITATION_H
#define FORMCITATION_H

#include "DialogBase.h"
#include "support/lstrings.h"
#include "insets/insetcommand.h"

#include <vector> 
 
class Dialogs;
class LyXView;
class FormCitationDialog;

class FormCitation : public DialogBase {
public: 
	/**@name Constructors and Destructors */
	//@{
	///
	FormCitation(LyXView *, Dialogs *);
	/// 
	~FormCitation();
	//@}

	/// Apply changes
	void apply();
	/// close the connections
	void close();
	/// add a key
	void add();
	/// remove a key
	void remove();
	/// move a key up
	void up();
	/// move a key down
	void down(); 
	/// a key has been highlighted
	void highlight_key(const char *key);
	/// a chosen key has been highlighted
	void highlight_chosen(const char *key); 
	/// a key has been double-clicked
	void select_key(const char *key);
 
private: 
	/// Create the dialog if necessary, update it and display it.
	void show();
	/// Hide the dialog.
	void hide();
	/// Update the dialog.
	void update();

	/// create a Citation inset
	void createCitation(string const &);
	/// edit a Citation inset
	void showCitation(InsetCommand * const);
 
	/// update add,remove,up,down
	void updateButtons();
	/// update the available keys list
	void updateAvailableList();
	/// update the chosen keys list
	void updateChosenList();
	/// select the currently chosen key 
	void selectChosen();
 
	/// Real GUI implementation.
	FormCitationDialog * dialog_;

	/// the LyXView we belong to
	LyXView * lv_;
 
	/** Which Dialogs do we belong to?
	    Used so we can get at the signals we have to connect to.
	*/
	Dialogs * d_;
	/// pointer to the inset if any
	InsetCommand * inset_;
	/// insets params
	InsetCommandParams params;
	/// is the inset we are reading from a readonly buffer ?
	bool readonly;
	
	/// Hide connection.
	Connection h_;
	/// Update connection.
	Connection u_;
	/// Inset hide connection.
	Connection ih_;

	/// available citation keys
	std::vector<std::pair<string, string> > keys;
	/// chosen citation keys
	std::vector<string> chosenkeys;
 
	/// currently selected key
	string selectedKey;

	/// currently selected chosen key
	string selectedChosenKey;
};

#endif
// -*- C++ -*-
/* This file is part of
 * ======================================================
 * 
 *           LyX, The Document Processor
 * 	 
 *           Copyright (C) 2000 The LyX Team.
 *
 *           @author Jürgen Vigna, Kalle Dalheimer
 *
 *======================================================*/

#ifndef FORM_DOCUMENT_H
#define FORM_DOCUMENT_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "FormBase.h"
#include <vector>

#ifdef __GNUG_
#pragma interface
#endif

class LyXView;
class Dialogs;
class Combox;
class BufferParams;

class QWidget;
class FormDocumentDialog;

#ifdef SIGC_CXX_NAMESPACES
using SigC::Connection;
#endif

class QComboBox;

#include <qpixmap.h>

/** This class provides an Qt2 implementation of the FormDocument Popup.
    The table-layout-form here changes values for latex-tabulars
 */
class FormDocument : public DialogBase {
public:
    /// #FormDocument x(Communicator ..., Popups ...);#
    FormDocument(LyXView *, Dialogs *);
    ///
    ~FormDocument();
    ///
    enum EnumPopupStatus {
	///
        POPUP_UNMODIFIED,
	///
        POPUP_MODIFIED,
	///
        POPUP_READONLY
    };

private:
  /// Show the dialog.
   void show();
   /// Hide the dialog.
   void hide();

    void checkMarginValues();
    ///
    void checkReadOnly();
    ///
    void UpdateLayoutDocument(BufferParams const & params);

public:
    ///
     void checkChoiceClass(QComboBox* cb);
//     ///
     bool checkDocumentInput(QWidget* w);
//     ///
  void bulletDepth( int );
    /// 
 void choiceBulletSize();
//     ///
  void inputBulletLaTeX();
//     ///
  void setBulletPics();
//     ///
  void bulletBMTable( int );

    /// Update the popup.
    void update();
    ///
    void paper_update(BufferParams const &);
    ///
    void class_update(BufferParams const &);
    ///
    void language_update(BufferParams const &);
    ///
    void options_update(BufferParams const &);
    ///
    void bullets_update(BufferParams const &);
    /// Apply from popup
    void apply();
    ///
    void paper_apply();
    ///
    bool class_apply();
    ///
    bool language_apply();
    ///
    bool options_apply();
    ///
    void bullets_apply();
    /// Cancel from popup
    void cancel();
    /// Build the popup
    void build();
    /// Explicitly free the popup.
    void free();

//     /// Typedefinitions from the fdesign produced Header file
//     FD_form_tabbed_document * build_tabbed_document();
//     ///
//     FD_form_doc_paper * build_doc_paper();
//     ///
//     FD_form_doc_class * build_doc_class();
//     ///
//     FD_form_doc_language * build_doc_language();
//     ///
//     FD_form_doc_options * build_doc_options();
//     ///
//     FD_form_doc_bullet * build_doc_bullet();

//     /// Real GUI implementation.
  FormDocumentDialog* dialog_;

    /// Which LyXView do we belong to?
    LyXView * lv_;
    ///
    Dialogs * d_;
    /// Update connection.
    Connection u_;
    /// Hide connection.
    Connection h_;
    /// has form contents changed? Used to control OK/Apply
    EnumPopupStatus status;
    ///
    int ActCell;
    ///
    int Confirmed;
    ///
    int currentBulletPanel;
    ///
    int currentBulletDepth;
    ///

  QPixmap* standardpix;
  QPixmap* amssymbpix;
  QPixmap* psnfss1pix;
  QPixmap* psnfss2pix;
  QPixmap* psnfss3pix;
  QPixmap* psnfss4pix;
  QPixmap bulletpics[36];
};

#endif
#include <config.h>
#include <debug.h>
#include "FormTocDialog.h"
#include "Dialogs.h"
#include "FormToc.h"

#include <qlistview.h>

/* 
 *  Constructs a FormTocDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
FormTocDialog::FormTocDialog( FormToc* form_, QWidget* parent,  const char* name, bool modal, WFlags fl )
  : FormTocDialogBase( parent, name, modal, fl ),
    form( form_ )
{
}

/*  
 *  Destroys the object and frees any allocated resources
 */
FormTocDialog::~FormTocDialog()
{
    // no need to delete child widgets, Qt does it all for us
}

/* 
 * public slot
 */
void FormTocDialog::activate_adaptor(int index)
{
  switch (index) {
  case 0:
    form->set_type(Buffer::TOC_TOC);
    break;
  case 1:
    form->set_type(Buffer::TOC_LOF);
    break;
  case 2:
    form->set_type(Buffer::TOC_LOT);
    break;
  case 3:
    form->set_type(Buffer::TOC_LOA);
    break;
  default:
    lyxerr[Debug::GUI] << "Unknown TOC combo selection." << std::endl;
    break;
  }
}
/* 
 * public slot
 */
void FormTocDialog::close_adaptor()
{
  form->close();
  hide();
}
/* 
 * public slot
 */
void FormTocDialog::depth_adaptor(int depth)
{
  form->set_depth(depth);
}
/* 
 * public slot
 */
void FormTocDialog::select_adaptor(QListViewItem* item)
{
  form->select(item->text(0));
}
/* 
 * public slot
 */
void FormTocDialog::update_adaptor()
{
  form->update();
}

void FormTocDialog::closeEvent(QCloseEvent *e)
{
  form->close();
  e->accept();
}
#ifndef FORMINDEXDIALOG_H
#define FORMINDEXDIALOG_H
#include "FormIndexDialogBase.h"

class FormIndex;

class FormIndexDialog : public FormIndexDialogBase
{ 
    Q_OBJECT

public:
    FormIndexDialog( FormIndex* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~FormIndexDialog();

public slots:
	void apply_adaptor();
  void close_adaptor();

protected:
  void closeEvent(QCloseEvent *e);

private:
    FormIndex* form;
};

#endif // FORMINDEXDIALOG_H
#ifndef FORMURLDIALOG_H
#define FORMURLDIALOG_H
#include "FormUrlDialogBase.h"

class FormUrl;

class FormUrlDialog : public FormUrlDialogBase
{ 
    Q_OBJECT

public:
    FormUrlDialog( FormUrl* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~FormUrlDialog();

public slots:
    void apply_adaptor();
    void close_adaptor();

protected:
    void closeEvent( QCloseEvent* );

private:
    FormUrl* form;
};

#endif // FORMURLDIALOG_H
#ifndef FORMTOCDIALOG_H
#define FORMTOCDIALOG_H
#include "FormTocDialogBase.h"

class FormToc;

class FormTocDialog : public FormTocDialogBase
{ 
    Q_OBJECT

public:
    FormTocDialog( FormToc* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~FormTocDialog();

public slots:
    void activate_adaptor(int);
    void close_adaptor();
    void depth_adaptor(int);
    void select_adaptor(QListViewItem*);
    void update_adaptor();

protected:
    void closeEvent(QCloseEvent *e);

private:
    FormToc* form;
};

#endif // FORMTOCDIALOG_H
/**
 * $Id: FormCitationDialog.h,v 1.1 2000/09/23 14:30:52 kalle Exp $
 */

#ifndef FORMCITATIONDIALOG_H
#define FORMCITATIONDIALOG_H
#include "FormCitationDialogBase.h"

class FormCitation;

class FormCitationDialog : public FormCitationDialogBase
{ 
    Q_OBJECT

public:
    FormCitationDialog( FormCitation* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
    ~FormCitationDialog();

protected:
  void closeEvent(QCloseEvent *e);

protected slots:
    void add_adaptor();
    void close_adaptor();
    void down_adaptor();
    void highlight_chosen_adaptor(const QString&);
    void highlight_key_adaptor(const QString&);
    void apply_adaptor();
    void remove_adaptor();
    void select_key_adaptor(const QString&);
    void up_adaptor();

private:
  FormCitation* form_;
};

#endif // FORMCITATIONDIALOG_H
/*
 * FormUrl.C
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 */
 
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <config.h>

#include "FormUrlDialog.h"
#undef emit

#include "Dialogs.h"
#include "FormUrl.h"
#include "gettext.h"
#include "buffer.h"
#include "LyXView.h"
#include "lyxfunc.h" 

#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>

FormUrl::FormUrl(LyXView *v, Dialogs *d)
	: dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0)
{
	// let the dialog be shown
	// This is a permanent connection so we won't bother
	// storing a copy because we won't be disconnecting.
	d->showUrl.connect(slot(this, &FormUrl::showUrl));
	d->createUrl.connect(slot(this, &FormUrl::createUrl));
}

FormUrl::~FormUrl()
{
	delete dialog_;
}

void FormUrl::showUrl(InsetCommand * const inset)
{
	// FIXME: when could inset be 0 here ?
	if (inset==0)
		return;

	inset_ = inset;
	readonly = lv_->buffer()->isReadonly();
	ih_ = inset_->hide.connect(slot(this,&FormUrl::hide));
	params = inset->params();
	
	show();
}
 
void FormUrl::createUrl(string const & arg)
{
	// we could already be showing a URL, clear it out
	if (inset_)
		close();
 
	readonly = lv_->buffer()->isReadonly();
	params.setFromString(arg);
	show();
}
 
void FormUrl::update()
{
	dialog_->urlED->setText(params.getContents().c_str());
	dialog_->nameED->setText(params.getOptions().c_str());

	if (params.getCmdName()=="url") 
		dialog_->hyperlinkCB->setChecked(false);
	else
		dialog_->hyperlinkCB->setChecked(true);

	if (readonly) {
		dialog_->nameED->setFocusPolicy(QWidget::NoFocus);
		dialog_->urlED->setFocusPolicy(QWidget::NoFocus);
		dialog_->okPB->setEnabled(false);
		dialog_->cancelPB->setText(_("Close"));
		dialog_->hyperlinkCB->setEnabled(false);
	} else {
		dialog_->nameED->setFocusPolicy(QWidget::StrongFocus);
		dialog_->urlED->setFocusPolicy(QWidget::StrongFocus);
		dialog_->urlED->setFocus();
		dialog_->okPB->setEnabled(true);
		dialog_->cancelPB->setText(_("Cancel"));
		dialog_->hyperlinkCB->setEnabled(true);
	}
}
 
void FormUrl::apply()
{
	if (readonly)
		return;

	params.setContents(dialog_->urlED->text().latin1());
	params.setOptions(dialog_->nameED->text().latin1());

	if (dialog_->hyperlinkCB->isChecked())
		params.setCmdName("htmlurl");
	else
		params.setCmdName("url");

	if (inset_ != 0) {
		if (params != inset_->params()) {
			inset_->setParams(params);
			lv_->view()->updateInset(inset_, true);
		}
	} else
		lv_->getLyXFunc()->Dispatch(LFUN_INSERT_URL, params.getAsString().c_str());
}
 
void FormUrl::show()
{
	if (!dialog_)
		dialog_ = new FormUrlDialog(this, 0, _("LyX: Url"), false);
 
	if (!dialog_->isVisible()) {
		h_ = d_->hideBufferDependent.connect(slot(this, &FormUrl::hide));
		u_ = d_->updateBufferDependent.connect(slot(this, &FormUrl::update));
	}

	dialog_->raise();
	dialog_->setActiveWindow();
 
	update();
	dialog_->show();
}

void FormUrl::close()
{
	h_.disconnect();
	u_.disconnect();
	ih_.disconnect();
	inset_ = 0;
}
 
void FormUrl::hide()
{
	dialog_->hide();
	close();
}
/* FormRef.h
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 * Adapted for Qt2 frontend by Kalle Dalheimer, 
 *   [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef FORMREF_H
#define FORMREF_H

#include "DialogBase.h"
#include "LString.h"
#include "boost/utility.hpp"
#include "insets/insetcommand.h"

class Dialogs;
class LyXView;
class FormRefDialog;

class FormRef : public DialogBase {
public: 
	/**@name Constructors and Destructors */
	//@{
	///
	FormRef(LyXView *, Dialogs *);
	/// 
	~FormRef();
	//@}

	/// double-click a ref
	void select(const char *);
	/// highlight a ref
	void highlight(const char *);
	/// set sort
	void set_sort(bool);
	/// goto a ref (or back)
	void goto_ref(); 
	/// update dialog
	void update(); 
	/// update just the refs
	void do_ref_update();
	/// Apply changes
	void apply();
	/// close the connections
	void close();
 
private: 
	enum Type {
		REF, PAGEREF, VREF, VPAGEREF, PRETTYREF
	}; 

	enum GotoType {
		GOTOREF, GOTOBACK
	};
 
	/// Create the dialog if necessary, update it and display it.
	void show();
	/// Hide the dialog.
	void hide();
 
	/// create a Reference inset
	void createRef(string const &);
	/// edit a Reference inset
	void showRef(InsetCommand * const);
 
	/// update the keys list
	void updateRefs(void);
 
	/// Real GUI implementation.
	FormRefDialog * dialog_;

	/// the LyXView we belong to
	LyXView * lv_;
 
	/** Which Dialogs do we belong to?
	    Used so we can get at the signals we have to connect to.
	*/
	Dialogs * d_;
	/// pointer to the inset if any
	InsetCommand * inset_;
	/// insets params
	InsetCommandParams params;
	/// is the inset we are reading from a readonly buffer ?
	bool readonly;
	
	/// Hide connection.
	Connection h_;
	/// Update connection.
	Connection u_;
	/// Inset hide connection.
	Connection ih_;

	/// to sort or not to sort
	bool sort;
 
	/// where to go
	GotoType gotowhere;
 
	/// current type
	Type type;
 
	/// available references
	std::vector< string > refs;
};

#endif
/**
 * $Id: FormCitationDialog.C,v 1.1 2000/09/23 14:30:52 kalle Exp $
 */

#include "FormCitationDialog.h"
#include "Dialogs.h"
#include "FormCitation.h"

// PENDING(kalle) Wire text before and citaiton style

/* 
 *  Constructs a FormCitationDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
FormCitationDialog::FormCitationDialog( FormCitation* form, QWidget* parent,  const char* name, bool modal, WFlags fl )
  : FormCitationDialogBase( parent, name, modal, fl ),
    form_( form )
{
}

/*  
 *  Destroys the object and frees any allocated resources
 */
FormCitationDialog::~FormCitationDialog()
{
    // no need to delete child widgets, Qt does it all for us
}



void FormCitationDialog::closeEvent(QCloseEvent *e)
{
  form_->close();
  e->accept();
}

/* 
 * protected slot
 */
void FormCitationDialog::add_adaptor()
{
  form_->add();
}
/* 
 * protected slot
 */
void FormCitationDialog::close_adaptor()
{
  form_->close();
  hide();
}
/* 
 * protected slot
 */
void FormCitationDialog::down_adaptor()
{
  form_->down();
}
/* 
 * protected slot
 */
void FormCitationDialog::highlight_chosen_adaptor(const QString& key)
{
  form_->highlight_chosen(key);
}
/* 
 * protected slot
 */
void FormCitationDialog::highlight_key_adaptor(const QString& key)
{
  form_->highlight_key(key);
}

void FormCitationDialog::apply_adaptor()
{
  form_->apply();
  form_->close();
  hide();
}
/* 
 * protected slot
 */
void FormCitationDialog::remove_adaptor()
{
  form_->remove();
}
/* 
 * protected slot
 */
void FormCitationDialog::select_key_adaptor(const QString& key)
{
  form_->select_key(key);
}
/* 
 * protected slot
 */
void FormCitationDialog::up_adaptor()
{
  form_->up();
}

/* FormUrl.h
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 * Adapted for Qt2 frontend by Kalle Dalheimer, 
 *   [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef FORMURL_H
#define FORMURL_H

#include "DialogBase.h"
#include "LString.h"
#include "boost/utility.hpp"
#include "insets/inseturl.h"

class Dialogs;
class LyXView;
class FormUrlDialog;

class FormUrl : public DialogBase {
public: 
	/**@name Constructors and Destructors */
	//@{
	///
	FormUrl(LyXView *, Dialogs *);
	/// 
	~FormUrl();
	//@}

	/// Apply changes
	void apply();
	/// close the connections
	void close();
 
private: 
	/// Create the dialog if necessary, update it and display it.
	void show();
	/// Hide the dialog.
	void hide();
	/// Update the dialog.
	void update();

	/// create a URL inset
	void createUrl(string const &);
	/// edit a URL inset
	void showUrl(InsetCommand * const);
 
	/// Real GUI implementation.
	FormUrlDialog * dialog_;

	/// the LyXView we belong to
	LyXView * lv_;
 
	/** Which Dialogs do we belong to?
	    Used so we can get at the signals we have to connect to.
	*/
	Dialogs * d_;
	/// pointer to the inset if any
	InsetCommand * inset_;
	/// insets params
	InsetCommandParams params;
	/// is the inset we are reading from a readonly buffer
	bool readonly;
	
	/// Hide connection.
	Connection h_;
	/// Update connection.
	Connection u_;
	/// Inset hide connection.
	Connection ih_;
};

#endif
/*
 * FormIndex.C
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 */
 
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <config.h>

#include "FormIndexDialog.h"
#undef emit

#include "Dialogs.h"
#include "FormIndex.h"
#include "gettext.h"
#include "buffer.h"
#include "LyXView.h"
#include "lyxfunc.h" 

#include <qlineedit.h>
#include <qpushbutton.h>

FormIndex::FormIndex(LyXView *v, Dialogs *d)
	: dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0)
{
	// let the dialog be shown
	// This is a permanent connection so we won't bother
	// storing a copy because we won't be disconnecting.
	d->showIndex.connect(slot(this, &FormIndex::showIndex));
	d->createIndex.connect(slot(this, &FormIndex::createIndex));
}

FormIndex::~FormIndex()
{
	delete dialog_;
}

void FormIndex::showIndex(InsetCommand * const inset)
{
	// FIXME: when could inset be 0 here ?
	if (inset==0)
		return;

	inset_ = inset;
	readonly = lv_->buffer()->isReadonly();
	ih_ = inset_->hide.connect(slot(this,&FormIndex::hide));
	params = inset->params();
	
	show();
}
 
void FormIndex::createIndex(string const & arg)
{
	// we could already be showing a URL, clear it out
	if (inset_)
		close();
 
	readonly = lv_->buffer()->isReadonly();
	params.setFromString(arg);
	show();
}
 
void FormIndex::update()
{
	dialog_->keywordED->setText(params.getContents().c_str());

	if (readonly) {
		dialog_->keywordED->setFocusPolicy(QWidget::NoFocus);
		dialog_->okPB->setEnabled(false);
		dialog_->cancelPB->setText(_("Close"));
	} else {
		dialog_->keywordED->setFocusPolicy(QWidget::StrongFocus);
		dialog_->keywordED->setFocus();
		dialog_->okPB->setEnabled(true);
		dialog_->cancelPB->setText(_("Cancel"));
	}
}
 
void FormIndex::apply()
{
	if (readonly)
		return;

	params.setContents(dialog_->keywordED->text().latin1());

	if (inset_ != 0) {
		if (params != inset_->params()) {
			inset_->setParams(params);
			lv_->view()->updateInset(inset_, true);
		}
	} else
		lv_->getLyXFunc()->Dispatch(LFUN_INDEX_INSERT, params.getAsString().c_str());
}
 
void FormIndex::show()
{
	if (!dialog_)
		dialog_ = new FormIndexDialog(this, 0, _("LyX: Index"), false);
 
	if (!dialog_->isVisible()) {
		h_ = d_->hideBufferDependent.connect(slot(this, &FormIndex::hide));
		u_ = d_->updateBufferDependent.connect(slot(this, &FormIndex::update));
	}

	dialog_->raise();
	dialog_->setActiveWindow();
 
	update();
	dialog_->show();
}

void FormIndex::close()
{
	h_.disconnect();
	u_.disconnect();
	ih_.disconnect();
	inset_ = 0;
}
 
void FormIndex::hide()
{
	dialog_->hide();
	close();
}
Index: Dialogs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/Dialogs.C,v
retrieving revision 1.4
diff -u -r1.4 Dialogs.C
--- Dialogs.C	2001/03/12 11:22:25	1.4
+++ Dialogs.C	2001/03/14 21:07:42
@@ -25,6 +25,7 @@
 #include "FormPrint.h"
 #include "FormRef.h"
 #include "FormSearch.h"
+#include "FormSplash.h"
 #include "FormTabular.h"
 #include "FormTabularCreate.h"
 #include "FormToc.h"
@@ -43,6 +44,9 @@
 
 Dialogs::Dialogs(LyXView * lv)
 {
+  // Kalle: Put in when FormSplash is ported
+  //	splash_ = new FormSplash(lv, this);
+
 	dialogs_.push_back(new FormCharacter(lv, this));
 	dialogs_.push_back(new FormCitation(lv, this));
 	dialogs_.push_back(new FormCopyright(lv, this));
@@ -50,16 +54,16 @@
 	dialogs_.push_back(new FormDocument(lv, this));
 	dialogs_.push_back(new FormError(lv, this));
 	dialogs_.push_back(new FormGraphics(lv, this));
-	dialogs_.push_back(new FormIndex(lv, this));
+	//	dialogs_.push_back(new FormIndex(lv, this));
 	dialogs_.push_back(new FormParagraph(lv, this));
 	dialogs_.push_back(new FormPreferences(lv, this));
 	dialogs_.push_back(new FormPrint(lv, this));
-	dialogs_.push_back(new FormRef(lv, this));
+	//	dialogs_.push_back(new FormRef(lv, this));
 	dialogs_.push_back(new FormSearch(lv, this));
 	dialogs_.push_back(new FormTabular(lv, this));
 	dialogs_.push_back(new FormTabularCreate(lv, this));
-	dialogs_.push_back(new FormToc(lv, this));
-	dialogs_.push_back(new FormUrl(lv, this));
+	//	dialogs_.push_back(new FormToc(lv, this));
+	//	dialogs_.push_back(new FormUrl(lv, this));
 
 	// reduce the number of connections needed in
 	// dialogs by a simple connection here.
@@ -74,4 +78,10 @@
 	     ++iter) {
 		delete *iter;
 	}
+}
+
+void Dialogs::destroySplash()
+{
+	delete splash_;
+	splash_ = 0;
 }
Index: Makefile.am
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/Makefile.am,v
retrieving revision 1.5
diff -u -r1.5 Makefile.am
--- Makefile.am	2001/03/12 11:22:25	1.5
+++ Makefile.am	2001/03/14 21:07:54
@@ -11,6 +11,8 @@
 # moc generated files
 BUILTSOURCES = \
 	moc_FileDialog_private.C \
+	moc_FormCitationDialogBase.C	\
+	moc_FormCitationDialog.C	\
 	moc_FormCopyrightDialogBase.C \
                 moc_FormCopyrightDialog.C \
 	       moc_chardlg.C \
@@ -25,7 +27,7 @@
 	       moc_tabularcreatedlgimpl.C \
 	       moc_emptytable.C
 
-		
+
 LYXDATADIRS = dlg
 DISTCLEANFILES = $(BUILTSOURCES) *.orig *.rej *~ *.bak core
 
@@ -82,6 +84,12 @@
 	chardlgimpl.h \
 	FileDialog.C \
 	FileDialog_private.C \
+	FormCitation.C	\
+	FormCitation.h	\
+	FormCitationDialog.C	\
+	FormCitationDialog.h	\
+	FormCitationDialogBase.C	\
+	FormCitationDialogBase.h	\
 	FormCopyright.C	\
 	FormCopyright.h	\
 	FormCopyrightDialog.C \
@@ -139,6 +147,16 @@
 moc_FormCopyrightDialogBase.C: FormCopyrightDialogBase.h
 	$(MOC) -o $@ $<
 moc_FormCopyrightDialog.C: FormCopyrightDialog.h
+	$(MOC) -o $@ $<
+
+FormCitation.C: FormCitationDialogBase.h
+FormCitationDialogBase.h: FormCitationDialogBase.ui
+	$(UIC) -o $@ $<
+FormCitationDialogBase.C: FormCitationDialogBase.ui
+	$(UIC) -impl FormCitationDialogBase.h -o $@ $<
+moc_FormCitationDialogBase.C: FormCitationDialogBase.h
+	$(MOC) -o $@ $<
+moc_FormCitationDialog.C: FormCitationDialog.h
 	$(MOC) -o $@ $<
 
 FormParagraph.C: paragraphdlg.h
/*
 * FormCitation.C
 * (C) 2000 LyX Team
 * John Levon, [EMAIL PROTECTED]
 */

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <config.h>

#include <algorithm> 

#include "FormCitationDialog.h"
#undef emit

#include "Dialogs.h"
#include "FormCitation.h"
#include "gettext.h"
#include "buffer.h"
#include "LyXView.h"
#include "lyxfunc.h"

#include <qlineedit.h>
#include <qlistbox.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
 
using std::vector;
using std::pair;
using std::find;
 
FormCitation::FormCitation(LyXView *v, Dialogs *d)
	: dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0), 
	keys(0), chosenkeys(0)
{
	// let the dialog be shown
	// This is a permanent connection so we won't bother
	// storing a copy because we won't be disconnecting.
  // PENDING(kalle) Put back in
// 	d->showCitation.connect(slot(this, &FormCitation::showCitation));
// 	d->createCitation.connect(slot(this, &FormCitation::createCitation));
}

FormCitation::~FormCitation()
{
	delete dialog_;
}

void FormCitation::showCitation(InsetCommand * const inset)
{
	// FIXME: when could inset be 0 here ?
	if (inset==0)
		return;

	inset_ = inset;
	readonly = lv_->buffer()->isReadonly();
	// PENDING(kalle) Put back in
	//	ih_ = inset_->hide.connect(slot(this,&FormCitation::hide));
	params = inset->params();
	
	show();
}

void FormCitation::createCitation(string const & arg)
{
	// we could already be showing stuff, clear it out
	if (inset_)
		close();

	readonly = lv_->buffer()->isReadonly();
	params.setFromString(arg);
	show();
}

void FormCitation::updateButtons()
{ 
	bool iskey,ischosenkey;

	iskey = !selectedKey.empty();
	ischosenkey = !selectedChosenKey.empty();
 
	dialog_->stopPB->setEnabled(ischosenkey);
	dialog_->leftPB->setEnabled(iskey);
	dialog_->upPB->setEnabled(ischosenkey);
	dialog_->downPB->setEnabled(ischosenkey);
}
 
void FormCitation::updateChosenList()
{
	dialog_->insetKeysLB->setAutoUpdate(false);
	dialog_->insetKeysLB->clear();

	for (vector< string >::const_iterator iter = chosenkeys.begin();
		iter != chosenkeys.end(); ++iter) {
		dialog_->insetKeysLB->insertItem(iter->c_str());
	}
	dialog_->insetKeysLB->setAutoUpdate(true);
	dialog_->insetKeysLB->update();
}

void FormCitation::updateAvailableList()
{
	dialog_->bibliographyKeysLB->setAutoUpdate(false);
	dialog_->bibliographyKeysLB->clear();

	for (vector< pair<string,string> >::const_iterator iter = keys.begin();
		iter != keys.end(); ++iter) {
		dialog_->bibliographyKeysLB->insertItem(iter->first.c_str());
	}
	dialog_->bibliographyKeysLB->setAutoUpdate(true);
	dialog_->bibliographyKeysLB->update();
}
 
void FormCitation::update()
{
	keys.clear();
 
	vector < pair<string,string> > ckeys = lv_->buffer()->getBibkeyList(); 

	for (vector< pair<string,string> >::const_iterator iter = ckeys.begin();
		iter != ckeys.end(); ++iter) {
		keys.push_back(*iter);
	}
 
	updateAvailableList();
	selectedKey.erase();
 
	chosenkeys.clear();
 
	string tmp, paramkeys(params.getContents());
	paramkeys = frontStrip(split(paramkeys, tmp, ','));

	while (!tmp.empty()) {
		chosenkeys.push_back(tmp);
		paramkeys = frontStrip(split(paramkeys, tmp, ','));
	}

	updateChosenList();
	selectedChosenKey.erase();
 
	dialog_->infoML->setText("");

	dialog_->textAfterED->setText(params.getOptions().c_str());

	updateButtons();
 
	if (readonly) {
		dialog_->insetKeysLB->setFocusPolicy(QWidget::NoFocus);
		dialog_->bibliographyKeysLB->setFocusPolicy(QWidget::NoFocus);
		dialog_->textAfterED->setFocusPolicy(QWidget::NoFocus);
		dialog_->okPB->setEnabled(false);
		dialog_->cancelPB->setText(_("Close"));
	} else {
		dialog_->insetKeysLB->setFocusPolicy(QWidget::StrongFocus);
		dialog_->bibliographyKeysLB->setFocusPolicy(QWidget::StrongFocus);
		dialog_->textAfterED->setFocusPolicy(QWidget::StrongFocus);
		dialog_->okPB->setEnabled(true);
		dialog_->cancelPB->setText(_("Cancel"));
	}
}

void FormCitation::apply()
{
	if (readonly)
		return;

	string contents;

	for (vector< string >::const_iterator iter = chosenkeys.begin();
		iter != chosenkeys.end(); ++iter) {
		if (iter != chosenkeys.begin())
			contents += ", ";
		contents += *iter;
	}
		
	params.setContents(contents);
	params.setOptions(dialog_->textAfterED->text().latin1());
	 
	if (inset_ != 0) {
		if (params != inset_->params()) {
			inset_->setParams(params);
			lv_->view()->updateInset(inset_, true);
		}
	} else
		lv_->getLyXFunc()->Dispatch(LFUN_CITATION_INSERT, params.getAsString().c_str());
}

void FormCitation::show()
{
	if (!dialog_)
		dialog_ = new FormCitationDialog(this, 0, _("LyX: Citation Reference"), false);

	if (!dialog_->isVisible()) {
	  // PENDING(kalle) Put back in
// 		h_ = d_->hideBufferDependent.connect(slot(this, &FormCitation::hide));
// 		u_ = d_->updateBufferDependent.connect(slot(this, &FormCitation::update));
	}

	dialog_->raise();
	dialog_->setActiveWindow();

	update();
	dialog_->show();
}

void FormCitation::close()
{
	h_.disconnect();
	u_.disconnect();
	ih_.disconnect();
	inset_ = 0;
}

void FormCitation::hide()
{
	dialog_->hide();
	close();
}

void FormCitation::selectChosen()
{
	for (unsigned int i=0; i < dialog_->insetKeysLB->count(); ++i) {
		if (dialog_->insetKeysLB->text(i)==selectedChosenKey.c_str()) {
			dialog_->insetKeysLB->setSelected(i,true);
			dialog_->insetKeysLB->setTopItem(i);
			break;
		}
	}
}
 
void FormCitation::add()
{
	if (selectedKey.empty())
		return;

	for (vector< pair<string,string> >::const_iterator iter = keys.begin(); 
		iter != keys.end(); ++iter) {
		if (iter->first == selectedKey) {
			chosenkeys.push_back(iter->first);
			break; 
		}
	}
		 
	selectedChosenKey.erase();
	updateChosenList();
	updateButtons();
}

void FormCitation::remove()
{
	if (selectedChosenKey.empty())
		return; 

	for (vector< string >::iterator iter = chosenkeys.begin();
		iter != chosenkeys.end(); ++iter) {
		if (*iter==selectedChosenKey) {
			chosenkeys.erase(iter);
			break;
		}
	}
	selectedChosenKey.erase();
	updateChosenList();
	updateButtons();
}

void FormCitation::up()
{
	if (selectedChosenKey.empty())
		return;

	// Qt will select the first one on redo, so we need this 
	string tmp = selectedChosenKey;
 
	vector< string >::iterator iter = chosenkeys.begin();

	for (; iter != chosenkeys.end(); ++iter) {
		if (*iter==selectedChosenKey && iter!=chosenkeys.begin()) {
			string tmp = *iter;
			chosenkeys.erase(iter);
			chosenkeys.insert(iter-1,tmp);
			break;
		}
	}
	if (iter==chosenkeys.end())
		return;
 
	updateChosenList();
	selectedChosenKey=tmp;
	selectChosen();
}

void FormCitation::down()
{
	if (selectedChosenKey.empty())
		return;

	// Qt will select the first one on redo, so we need this 
	string tmp = selectedChosenKey;
 
	vector< string >::iterator iter = chosenkeys.begin();

	for (; iter != chosenkeys.end(); ++iter) {
		if (*iter==selectedChosenKey && (iter+1)!=chosenkeys.end()) {
			string tmp = *iter;
			chosenkeys.erase(iter);
			chosenkeys.insert(iter+1, tmp);
			break;
		}
	}
	if (iter==chosenkeys.end())
		return;
 
	updateChosenList();
	selectedChosenKey=tmp;
	selectChosen();
}
 
void FormCitation::select_key(const char *key)
{
	selectedKey.erase();
	selectedKey = key;

	add();
}
 
void FormCitation::highlight_key(const char *key)
{
	selectedKey.erase();
	selectedKey = key;

	for (unsigned int i=0; i < keys.size(); i++) {
		if (keys[i].first==key) {
			dialog_->infoML->setText(keys[i].second.c_str());
			break;
		}
	}

	updateButtons();
}

void FormCitation::highlight_chosen(const char *key)
{
	selectedChosenKey.erase();
	selectedChosenKey = key;
 
	unsigned int i;

	for (i=0; i < keys.size(); i++) {
		if (keys[i].first==key) {
			if (keys[i].second.compare(dialog_->infoML->text()))
				dialog_->infoML->setText(keys[i].second.c_str());
			break;
		}
	}

	if (i==keys.size())
		dialog_->infoML->setText(_("Key not found in references."));
 
	updateButtons();
}

Reply via email to