]> git.lyx.org Git - lyx.git/commitdiff
qt2.diff.gz
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 14 Feb 2001 19:43:56 +0000 (19:43 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 14 Feb 2001 19:43:56 +0000 (19:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1517 a592a061-630c-0410-9148-cb99ea01b6c8

25 files changed:
src/frontends/qt2/ChangeLog
src/frontends/qt2/FormParagraph.C [new file with mode: 0644]
src/frontends/qt2/FormParagraph.h [new file with mode: 0644]
src/frontends/qt2/FormPrint.C [new file with mode: 0644]
src/frontends/qt2/FormPrint.h [new file with mode: 0644]
src/frontends/qt2/FormTabularCreate.C [new file with mode: 0644]
src/frontends/qt2/FormTabularCreate.h [new file with mode: 0644]
src/frontends/qt2/QtLyXView.h [new file with mode: 0644]
src/frontends/qt2/emptytable.C [new file with mode: 0644]
src/frontends/qt2/emptytable.h [new file with mode: 0644]
src/frontends/qt2/paragraphdlg.C [new file with mode: 0644]
src/frontends/qt2/paragraphdlg.h [new file with mode: 0644]
src/frontends/qt2/paragraphdlg.ui [new file with mode: 0644]
src/frontends/qt2/paragraphdlgimpl.C [new file with mode: 0644]
src/frontends/qt2/paragraphdlgimpl.h [new file with mode: 0644]
src/frontends/qt2/printdlg.C [new file with mode: 0644]
src/frontends/qt2/printdlg.h [new file with mode: 0644]
src/frontends/qt2/printdlg.ui [new file with mode: 0644]
src/frontends/qt2/printdlgimpl.C [new file with mode: 0644]
src/frontends/qt2/printdlgimpl.h [new file with mode: 0644]
src/frontends/qt2/tabularcreatedlg.C [new file with mode: 0644]
src/frontends/qt2/tabularcreatedlg.h [new file with mode: 0644]
src/frontends/qt2/tabularcreatedlg.ui [new file with mode: 0644]
src/frontends/qt2/tabularcreatedlgimpl.C [new file with mode: 0644]
src/frontends/qt2/tabularcreatedlgimpl.h [new file with mode: 0644]

index e3d052e766177ea77ff7f7834c0faaf28a0d7903..c95d9db1b3ec9404b0b615e32be5e8fcc019ce3e 100644 (file)
@@ -1,3 +1,31 @@
+2001-01-24  Edwin Leuven  <leuven@fee.uva.nl>
+
+       *FormParagraph.C:
+       *FormParagraph.h:
+       *FormPrint.C:
+       *FormPrint.h:
+       *FormTabularCreate.C:
+       *FormTabularCreate.h:
+       *QtLyXView.h:
+       *emptytable.C:
+       *emptytable.h:
+       *paragraphdlg.C:
+       *paragraphdlg.h:
+       *paragraphdlg.ui:
+       *paragraphdlgimpl.C:
+       *paragraphdlgimpl.h:
+       *printdlg.C:
+       *printdlg.h:
+       *printdlg.ui:
+       *printdlgimpl.C:
+       *printdlgimpl.h:
+       *tabularcreatedlg.C:
+       *tabularcreatedlg.h:
+       *tabularcreatedlg.ui:
+       *tabularcreatedlgimpl.C:
+       *tabularcreatedlgimpl.h:
+       *Makefile.am: added paragraph/print/tabular create dialogs
+
 2001-01-24  John Levon  <moz@compsoc.man.ac.uk>
 
        * src/frontends/qt2/.cvsignore:
diff --git a/src/frontends/qt2/FormParagraph.C b/src/frontends/qt2/FormParagraph.C
new file mode 100644 (file)
index 0000000..aaabe70
--- /dev/null
@@ -0,0 +1,204 @@
+/**
+ * \file FormParagraph.C
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ */
+
+#include <config.h>
+
+#include "paragraphdlgimpl.h"
+
+#include "FormParagraph.h"
+#include "Dialogs.h"
+#include "Liason.h"
+#include "gettext.h"
+#include "buffer.h"
+#include "QtLyXView.h"
+#include "lyxtext.h"
+#include "debug.h"
+
+#ifdef CXX_WORKING_NAMESPACES
+using Liason::setMinibuffer;
+#endif
+
+using std::endl;
+
+FormParagraph::FormParagraph(LyXView *v, Dialogs *d)
+       : dialog_(0), lv_(v), d_(d), h_(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->showLayoutParagraph.connect(slot(this, &FormParagraph::show));
+}
+
+FormParagraph::~FormParagraph()
+{
+       delete dialog_;
+}
+
+void FormParagraph::update(bool switched)
+{
+       if (switched) {
+               hide();
+               return;
+       }
+
+       if (!lv_->view()->available())
+               return;
+
+       Buffer *buf = lv_->view()->buffer();
+       
+       if (readonly!=buf->isReadonly()) {
+               readonly = buf->isReadonly();
+               dialog_->setReadOnly(readonly);
+       }
+
+       LyXText *text = 0;
+
+       if (lv_->view()->theLockingInset())
+               text = lv_->view()->theLockingInset()->getLyXText(lv_->view());
+
+       if (!text)
+               text = lv_->view()->text;
+
+       LyXParagraph *par = text->cursor.par();
+
+       int align = par->GetAlign();
+       
+       if (align==LYX_ALIGN_LAYOUT)
+               align = textclasslist.Style(buf->params.textclass, par->GetLayout()).align;
+
+#ifndef NEW_INSETS
+       LyXParagraph *physpar = par->FirstPhysicalPar();
+#else
+       LyXParagraph *physpar = par;
+#endif
+
+       if (physpar->added_space_top.kind()==VSpace::LENGTH) {
+               LyXGlueLength above = physpar->added_space_top.length();
+               lyxerr[Debug::GUI] << "Reading above space : \"" << physpar->added_space_top.length().asString() << "\"" << endl;
+               dialog_->setAboveLength(above.value(), above.plusValue(), above.minusValue(),
+                       above.unit(), above.plusUnit(), above.minusUnit());
+       } else
+               dialog_->setAboveLength(0.0, 0.0, 0.0, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE);
+
+       if (physpar->added_space_bottom.kind()==VSpace::LENGTH) {
+               LyXGlueLength below = physpar->added_space_bottom.length();
+               lyxerr[Debug::GUI] << "Reading below space : \"" << physpar->added_space_bottom.length().asString() << "\"" << endl;
+               dialog_->setBelowLength(below.value(), below.plusValue(), below.minusValue(),
+                       below.unit(), below.plusUnit(), below.minusUnit());
+       } else
+               dialog_->setBelowLength(0.0, 0.0, 0.0, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE);
+
+       dialog_->setLabelWidth(text->cursor.par()->GetLabelWidthString().c_str());
+       dialog_->setAlign(align);
+       dialog_->setChecks(physpar->line_top, physpar->line_bottom,
+               physpar->pagebreak_top, physpar->pagebreak_bottom, physpar->noindent);
+       dialog_->setSpace(physpar->added_space_top.kind(), physpar->added_space_bottom.kind(),
+               physpar->added_space_top.keep(), physpar->added_space_bottom.keep());
+
+       // now the extras page
+
+       LyXLength extrawidth;
+       float val = 0.0;
+       LyXLength::UNIT unit = LyXLength::CM;
+
+       if (isValidLength(par->pextra_width, &extrawidth)) {
+               lyxerr[Debug::GUI] << "Reading extra width \"" << extrawidth.asString() << "\"" << endl;
+               val = extrawidth.value();
+               unit = extrawidth.unit();
+       }
+
+       lyxerr[Debug::GUI] << "Reading widthp \"" << par->pextra_widthp << "\"" << endl;
+
+       dialog_->setExtra(val, unit, par->pextra_widthp,
+               par->pextra_alignment,
+               par->pextra_hfill,
+               par->pextra_start_minipage,
+               static_cast<LyXParagraph::PEXTRA_TYPE>(par->pextra_type));
+}
+
+void FormParagraph::apply()
+{
+       if (readonly)
+               return;
+
+       VSpace spaceabove;
+       VSpace spacebelow;
+
+       if (dialog_->getSpaceAboveKind()==VSpace::LENGTH)
+               spaceabove = VSpace(dialog_->getAboveLength());
+       else
+               spaceabove = VSpace(dialog_->getSpaceAboveKind());
+
+       if (dialog_->getSpaceBelowKind()==VSpace::LENGTH)
+               spacebelow = VSpace(dialog_->getBelowLength());
+       else
+               spacebelow = VSpace(dialog_->getSpaceBelowKind());
+
+       spaceabove.setKeep(dialog_->getAboveKeep());
+       spacebelow.setKeep(dialog_->getBelowKeep());
+
+       lyxerr[Debug::GUI] << "Setting above space \"" << LyXGlueLength(spaceabove.length().asString()).asString() << "\"" << endl;
+       lyxerr[Debug::GUI] << "Setting below space \"" << LyXGlueLength(spacebelow.length().asString()).asString() << "\"" << endl;
+
+       lv_->view()->text->SetParagraph(lv_->view(),
+               dialog_->getLineAbove(), dialog_->getLineBelow(),
+               dialog_->getPagebreakAbove(), dialog_->getPagebreakBelow(),
+               spaceabove, spacebelow, dialog_->getAlign(),
+               dialog_->getLabelWidth(), dialog_->getNoIndent());
+
+       // extra stuff
+
+       string width("");
+       string widthp("");
+
+       LyXLength extrawidth(dialog_->getExtraWidth());
+       if (extrawidth.unit()==LyXLength::UNIT_NONE) {
+               widthp = dialog_->getExtraWidthPercent();
+       } else
+               width = extrawidth.asString();
+
+       lyxerr[Debug::GUI] << "Setting extrawidth \"" << width << "\"" << endl;
+       lyxerr[Debug::GUI] << "Setting percent extrawidth \"" << widthp << "\"" << endl;
+
+       lv_->view()->text->SetParagraphExtraOpt(lv_->view(),
+               dialog_->getExtraType(), width, widthp,
+               dialog_->getExtraAlign(),
+               dialog_->getHfillBetween(),
+               dialog_->getStartNewMinipage());
+
+       lv_->view()->update(BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
+       lv_->buffer()->markDirty();
+       setMinibuffer(lv_, _("Paragraph layout set"));
+}
+
+void FormParagraph::show()
+{
+       if (!dialog_)
+               dialog_ = new ParagraphDlgImpl(this, 0, _("LyX: Paragraph Options"), false);
+
+       if (!dialog_->isVisible())
+               h_ = d_->hideBufferDependent.connect(slot(this, &FormParagraph::hide));
+
+        
+       dialog_->raise();
+       dialog_->setActiveWindow();
+       update();
+        
+       dialog_->show();
+}
+
+void FormParagraph::close()
+{
+       h_.disconnect();
+}
+
+void FormParagraph::hide()
+{
+       dialog_->hide();
+       close();
+}
diff --git a/src/frontends/qt2/FormParagraph.h b/src/frontends/qt2/FormParagraph.h
new file mode 100644 (file)
index 0000000..d560d86
--- /dev/null
@@ -0,0 +1,59 @@
+/**
+ * \file FormParagraph.h
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ */
+
+#ifndef FORMPARAGRAPH_H
+#define FORMPARAGRAPH_H
+
+#include "DialogBase.h"
+#include "LString.h"
+#include "boost/utility.hpp"
+
+class Dialogs;
+class LyXView;
+class ParagraphDlgImpl;
+
+class FormParagraph : public DialogBase, public noncopyable {
+public: 
+       /**@name Constructors and Destructors */
+       //@{
+       ///
+       FormParagraph(LyXView *, Dialogs *);
+       /// 
+       ~FormParagraph();
+       //@}
+
+       /// Apply changes
+       void apply();
+       /// Update the dialog.
+       void update(bool switched = false);
+       /// Close the connections
+       void close();
+private: 
+       /// Create the dialog if necessary, update it and display it.
+       void show();
+       /// Hide the dialog.
+       void hide();
+
+       /// Real GUI implementation.
+       ParagraphDlgImpl * dialog_;
+
+       /// the LyXView we belong to
+       LyXView * lv_;
+       /// Used so we can get at the signals we have to connect to.
+       Dialogs * d_;
+       
+       /// Hide connection.
+       Connection h_;
+       
+       /// readonly file or not
+       bool readonly; 
+};
+
+#endif
diff --git a/src/frontends/qt2/FormPrint.C b/src/frontends/qt2/FormPrint.C
new file mode 100644 (file)
index 0000000..1e2ffa4
--- /dev/null
@@ -0,0 +1,135 @@
+/**
+ * \file FormPrint.C
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ */
+
+#include <config.h>
+
+#include "printdlgimpl.h"
+#include "FormPrint.h"
+#include "Dialogs.h"
+#include "gettext.h"
+#include "buffer.h"
+#include "lyxrc.h" 
+#include "QtLyXView.h" 
+
+#include "PrinterParams.h" 
+#include "Liason.h" 
+#include "BufferView.h" 
+#include "support/lstrings.h"
+#include "qmessagebox.h"
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::slot;
+#endif
+
+#ifdef CXX_WORKING_NAMESPACES
+using Liason::printBuffer;
+using Liason::getPrinterParams;
+using std::max;
+#endif
+
+FormPrint::FormPrint(LyXView *v, Dialogs *d)
+       : dialog_(0), lv_(v), d_(d), h_(0), u_(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->showPrint.connect(slot(this, &FormPrint::show));
+}
+
+FormPrint::~FormPrint()
+{
+       delete dialog_;
+}
+
+// we can safely ignore the parameter because we can always update
+void FormPrint::update(bool)
+{
+       if (!lv_->view()->available())
+              return;
+
+       PrinterParams pp(getPrinterParams(lv_->buffer()));
+
+       dialog_->setTarget(pp.target);
+               dialog_->setPrinter(pp.printer_name.c_str());
+               dialog_->setFile(pp.file_name.c_str());
+       dialog_->setWhichPages(pp.which_pages);
+        dialog_->setReverse(pp.reverse_order);
+       dialog_->setSort(pp.unsorted_copies);
+       dialog_->setCount(pp.count_copies);
+       
+               if (!pp.from_page.empty()) {
+               dialog_->setFrom(pp.from_page.c_str());
+               if (pp.to_page)
+                       dialog_->setTo(tostr(pp.to_page).c_str());
+               else
+                       dialog_->setTo("");
+       } else {
+               dialog_->setFrom("");
+               dialog_->setTo("");
+       }
+}
+void FormPrint::print()
+{
+       if (!lv_->view()->available())
+              return;
+
+       string from;
+       int to(0);
+
+       if (strlen(dialog_->getFrom())) {
+               from = dialog_->getFrom();
+               if (strlen(dialog_->getTo()))
+                       to = strToInt(dialog_->getTo());
+       }
+       
+       int retval; 
+       retval = printBuffer(lv_->buffer(), PrinterParams(dialog_->getTarget(),
+               string(dialog_->getPrinter()), string(dialog_->getFile()), 
+               dialog_->getWhichPages(), from, to, dialog_->getReverse(), 
+               dialog_->getSort(), max(strToInt(dialog_->getCount()),1)));
+
+       if (!retval) {
+               // FIXME: should have a utility class for this
+               string message(_("An error occured while printing.\n\n"));
+               message += _("Check the parameters are correct.\n");
+               QMessageBox msg( _("LyX: Print Error"), message.c_str(), QMessageBox::Warning, 1,0,0);
+               msg.raise();
+               msg.setActiveWindow();
+               msg.show();
+       }
+}
+
+void FormPrint::show()
+{
+       if (!dialog_)
+               dialog_ = new PrintDlgImpl(this, 0, _("LyX: Print"));
+       if (!dialog_->isVisible()) {
+               h_ = d_->hideBufferDependent.connect(slot(this, &FormPrint::hide));
+               u_ = d_->updateBufferDependent.connect(slot(this, &FormPrint::update));
+       }
+
+       dialog_->raise();
+       dialog_->setActiveWindow();
+       update();
+       dialog_->show();
+}
+
+void FormPrint::close()
+{
+       h_.disconnect();
+       u_.disconnect();
+}
+void FormPrint::hide()
+{
+       dialog_->hide();
+       close();
+}
diff --git a/src/frontends/qt2/FormPrint.h b/src/frontends/qt2/FormPrint.h
new file mode 100644 (file)
index 0000000..bd8fe30
--- /dev/null
@@ -0,0 +1,62 @@
+/**
+ * \file FormPrint.h
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ */
+#ifndef FORMPRINT_H
+#define FORMPRINT_H
+
+#include "DialogBase.h"
+#include "boost/utility.hpp"
+
+class Dialogs;
+class LyXView;
+class PrintDlgImpl;
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Connection;
+#endif
+
+class FormPrint : public DialogBase, public noncopyable {
+public: 
+       /**@name Constructors and Destructors */
+       //@{
+       ///
+       FormPrint(LyXView *, Dialogs *);
+       /// 
+       ~FormPrint();
+       //@}
+
+       /// start print
+       void print();
+       /// close
+       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(bool = false);
+
+       /// Real GUI implementation.
+       PrintDlgImpl * 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_;
+       
+       /// Hide connection.
+       Connection h_;
+       /// Update connection.
+       Connection u_;
+};
+
+#endif
diff --git a/src/frontends/qt2/FormTabularCreate.C b/src/frontends/qt2/FormTabularCreate.C
new file mode 100644 (file)
index 0000000..553f9b0
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * \file FormTabularCreate.C
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ * 
+ * \author John Levon, moz@compsoc.man.ac.uk
+ */
+
+#include <config.h>
+
+#include "tabularcreatedlgimpl.h"
+#include "Dialogs.h"
+#include "FormTabularCreate.h"
+#include "gettext.h"
+#include "QtLyXView.h"
+#include "BufferView.h"
+#include "insets/insettabular.h"  
+#include "support/lstrings.h"
+
+FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d)
+       : dialog_(0), lv_(v), d_(d), h_(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->showTabularCreate.connect(slot(this, &FormTabularCreate::show));
+}
+
+FormTabularCreate::~FormTabularCreate()
+{
+   delete dialog_;
+}
+
+void FormTabularCreate::apply(int rows, int cols)
+{
+   if (!lv_->view()->available())
+     return;
+   
+   string tmp = tostr(rows) + " " + tostr(cols);
+   lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp);
+}
+
+void FormTabularCreate::show()
+{
+   if (!dialog_)
+     dialog_ = new TabularCreateDlgImpl(this, 0, _("LyX: Insert Table"));
+   
+   if (!dialog_->isVisible()) {
+      h_ = d_->hideBufferDependent.connect(slot(this, &FormTabularCreate::hide));
+      }
+   
+   dialog_->raise();
+   dialog_->setActiveWindow();
+   
+   update();
+   dialog_->show();
+}
+
+void FormTabularCreate::close()
+{
+   h_.disconnect();
+}
+
+void FormTabularCreate::hide()
+{
+   dialog_->hide();
+   close();
+}
diff --git a/src/frontends/qt2/FormTabularCreate.h b/src/frontends/qt2/FormTabularCreate.h
new file mode 100644 (file)
index 0000000..cfae331
--- /dev/null
@@ -0,0 +1,62 @@
+/* FormTabularCreate.h
+ * (C) 2000 LyX Team
+ * John Levon, moz@compsoc.man.ac.uk
+ */
+
+/***************************************************************************
+ *                                                                         *
+ *   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 FORMTABULARCREATE_H
+#define FORMTABULARCREATE_H
+
+#include "DialogBase.h"
+#include "LString.h"
+#include "boost/utility.hpp"
+
+class Dialogs;
+class LyXView; 
+class TabularCreateDlgImpl;
+
+class FormTabularCreate : public DialogBase, public noncopyable {
+public: 
+       /**@name Constructors and Destructors */
+       //@{
+       ///
+       FormTabularCreate(LyXView *, Dialogs *);
+       /// 
+       ~FormTabularCreate();
+       //@}
+
+       /// create the table 
+       void apply(int rows, int cols);
+       /// close the connections
+       void close();
+private:
+       /// Create the dialog if necessary, update it and display it.
+       void show();
+       /// Hide the dialog.
+       void hide();
+       /// Real GUI implementation.
+       TabularCreateDlgImpl * 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_;
+       
+       /// Hide connection.
+       Connection h_;
+};
+
+#endif
diff --git a/src/frontends/qt2/QtLyXView.h b/src/frontends/qt2/QtLyXView.h
new file mode 100644 (file)
index 0000000..d9081cb
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * QtLyXView.h
+ * (C) 2000 LyX Team
+ * moz@compsoc.man.ac.uk
+ */
+
+/* Qt 1.x has a messy namespace which conflicts with 'emit' in
+ * src/Timeout.h. This can go away when Qt 2.x happens.
+ */
+
+#undef emit
+#include "LyXView.h"
diff --git a/src/frontends/qt2/emptytable.C b/src/frontends/qt2/emptytable.C
new file mode 100644 (file)
index 0000000..53ef522
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * emptytable.C
+ * (C) 2000 LyX Team
+ * John Levon, moz@compsoc.man.ac.uk
+ */
+
+/***************************************************************************
+ *                                                                         *
+ *   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 "emptytable.h"
+
+/**
+ * A simple widget for a quick "preview" in TabularCreateDialog
+ */
+
+const unsigned int cellsize = 20;
+
+EmptyTable::EmptyTable(QWidget * parent, const char * name)
+       : QTableView(parent,name)
+{
+       setNumCols(5);
+       setNumRows(5);
+       setCellWidth(cellsize);
+       setCellHeight(cellsize);
+       setTableFlags(Tbl_autoScrollBars);
+}
+
+void EmptyTable::paintCell(QPainter *p, int row, int col)
+{
+       int x2 = cellWidth(col) - 1;
+       int y2 = cellHeight(row) - 1;
+
+       p->fillRect(0, 0, x2, y2, QColor("white"));
+       p->drawLine(x2, 0, x2, y2);
+       p->drawLine(0, y2, x2, y2);
+}
+
+void EmptyTable::setNumberColumns(int nr_cols)
+{
+       if (nr_cols < 1)
+               return;
+       if (nr_cols == numCols())
+               return;
+       setAutoUpdate(false);
+       setNumCols(nr_cols);
+       setAutoUpdate(true);
+       update();
+       emit colsChanged(nr_cols);
+}
+
+void EmptyTable::setNumberRows(int nr_rows)
+{
+       if (nr_rows < 1)
+               return;
+       if (nr_rows == numRows())
+               return;
+       setAutoUpdate(false);
+       setNumRows(nr_rows);
+       setAutoUpdate(true);
+       update();
+       emit rowsChanged(nr_rows);
+}
+
+void EmptyTable::mouseMoveEvent(QMouseEvent *ev)
+{
+       int x = ev->pos().x();
+       int y = ev->pos().y();
+
+       if (x > 0) 
+               setNumberColumns(x / cellsize + leftCell());
+
+       if (y > 0) 
+               setNumberRows(y / cellsize + topCell());
+}
diff --git a/src/frontends/qt2/emptytable.h b/src/frontends/qt2/emptytable.h
new file mode 100644 (file)
index 0000000..e17807b
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * emptytable.h
+ * (C) 2000 LyX Team
+ * John Levon, moz@compsoc.man.ac.uk
+ */
+
+/***************************************************************************
+ *                                                                         *
+ *   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 EMPTYTABLE_H
+#define EMPTYTABLE_H
+
+#include <qpainter.h> 
+#include <qtableview.h> 
+
+#include "boost/utility.hpp"
+
+/**
+ * A simple widget for a quick "preview" in TabularCreateDialog.
+ * The user can drag on the widget to change the table dimensions.
+ */
+class EmptyTable : public QTableView, public noncopyable {
+   Q_OBJECT
+public:
+       EmptyTable(QWidget * parent = 0, const char * name = 0);
+       
+       ~EmptyTable() {};
+
+public slots:
+       /// set the number of columns in the table and emit colsChanged() signal 
+       void setNumberColumns(int nr_cols);
+       /// set the number of rows in the table and emit rowsChanged() signal 
+       void setNumberRows(int nr_rows);
+signals:
+       /// the number of columns changed
+       void colsChanged(int);
+       /// the number of rows changed
+       void rowsChanged(int);
+
+protected:
+       /// fill in a cell
+       virtual void paintCell(class QPainter *, int, int);
+       virtual void mouseMoveEvent(QMouseEvent *);
+       
+private:
+       /// number of current columns 
+       unsigned int cols;
+       /// number of current rows
+       unsigned int rows;
+};
+
+#endif
diff --git a/src/frontends/qt2/paragraphdlg.C b/src/frontends/qt2/paragraphdlg.C
new file mode 100644 (file)
index 0000000..31791b9
--- /dev/null
@@ -0,0 +1,618 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'paragraphdlg.ui'
+**
+** Created: Sat Feb 10 14:22:28 2001
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "paragraphdlg.h"
+
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qwidget.h>
+#include <qlayout.h>
+#include <qvariant.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a ParagraphDlg 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.
+ */
+ParagraphDlg::ParagraphDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name )
+       setName( "ParagraphDlg" );
+    resize( 559, 387 ); 
+    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, sizePolicy().hasHeightForWidth() ) );
+    setCaption( tr( "Paragraph" ) );
+    setSizeGripEnabled( TRUE );
+    ParagraphDlgLayout = new QVBoxLayout( this ); 
+    ParagraphDlgLayout->setSpacing( 6 );
+    ParagraphDlgLayout->setMargin( 11 );
+
+    TabsParagraph = new QTabWidget( this, "TabsParagraph" );
+
+    tab = new QWidget( TabsParagraph, "tab" );
+    tabLayout = new QVBoxLayout( tab ); 
+    tabLayout->setSpacing( 6 );
+    tabLayout->setMargin( 11 );
+
+    Layout6 = new QHBoxLayout; 
+    Layout6->setSpacing( 6 );
+    Layout6->setMargin( 0 );
+
+    alignmentL = new QLabel( tab, "alignmentL" );
+    alignmentL->setText( tr( "Alignment:" ) );
+    alignmentL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, alignmentL->sizePolicy().hasHeightForWidth() ) );
+    Layout6->addWidget( alignmentL );
+
+    alignment = new QComboBox( FALSE, tab, "alignment" );
+    alignment->insertItem( tr( "Justified" ) );
+    alignment->insertItem( tr( "Left" ) );
+    alignment->insertItem( tr( "Right" ) );
+    alignment->insertItem( tr( "Centered" ) );
+    alignment->setInsertionPolicy( QComboBox::AtBottom );
+    alignment->setAutoCompletion( FALSE );
+    Layout6->addWidget( alignment );
+    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout6->addItem( spacer );
+
+    noIndent = new QCheckBox( tab, "noIndent" );
+    noIndent->setText( tr( "No indentation" ) );
+    Layout6->addWidget( noIndent );
+    tabLayout->addLayout( Layout6 );
+
+    spacingOptions = new QGroupBox( tab, "spacingOptions" );
+    spacingOptions->setTitle( tr( "Spacing" ) );
+    spacingOptions->setEnabled( TRUE );
+    spacingOptions->setColumnLayout(0, Qt::Vertical );
+    spacingOptions->layout()->setSpacing( 0 );
+    spacingOptions->layout()->setMargin( 0 );
+    spacingOptionsLayout = new QGridLayout( spacingOptions->layout() );
+    spacingOptionsLayout->setAlignment( Qt::AlignTop );
+    spacingOptionsLayout->setSpacing( 6 );
+    spacingOptionsLayout->setMargin( 11 );
+
+    spacingBelowValueUnit = new QComboBox( FALSE, spacingOptions, "spacingBelowValueUnit" );
+    spacingBelowValueUnit->insertItem( tr( "Centimetres" ) );
+    spacingBelowValueUnit->insertItem( tr( "Inches" ) );
+    spacingBelowValueUnit->insertItem( tr( "Points" ) );
+    spacingBelowValueUnit->insertItem( tr( "Millimetres" ) );
+    spacingBelowValueUnit->insertItem( tr( "Picas" ) );
+    spacingBelowValueUnit->insertItem( tr( "ex Units" ) );
+    spacingBelowValueUnit->insertItem( tr( "em Units" ) );
+    spacingBelowValueUnit->insertItem( tr( "Scaled Points" ) );
+    spacingBelowValueUnit->insertItem( tr( "Big/PS Points" ) );
+    spacingBelowValueUnit->insertItem( tr( "Didot Points" ) );
+    spacingBelowValueUnit->insertItem( tr( "Cicero Points" ) );
+    spacingBelowValueUnit->setEnabled( FALSE );
+    spacingBelowValueUnit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingBelowValueUnit->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingBelowValueUnit, 4, 2 );
+
+    spacingBelowPlusUnit = new QComboBox( FALSE, spacingOptions, "spacingBelowPlusUnit" );
+    spacingBelowPlusUnit->insertItem( tr( "Centimetres" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Inches" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Points" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Millimetres" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Picas" ) );
+    spacingBelowPlusUnit->insertItem( tr( "ex Units" ) );
+    spacingBelowPlusUnit->insertItem( tr( "em Units" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Scaled Points" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Big/PS Points" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Didot Points" ) );
+    spacingBelowPlusUnit->insertItem( tr( "Cicero Points" ) );
+    spacingBelowPlusUnit->setEnabled( FALSE );
+    spacingBelowPlusUnit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingBelowPlusUnit->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingBelowPlusUnit, 4, 3 );
+
+    spacingBelowMinusUnit = new QComboBox( FALSE, spacingOptions, "spacingBelowMinusUnit" );
+    spacingBelowMinusUnit->insertItem( tr( "Centimetres" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Inches" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Points" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Millimetres" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Picas" ) );
+    spacingBelowMinusUnit->insertItem( tr( "ex Units" ) );
+    spacingBelowMinusUnit->insertItem( tr( "em Units" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Scaled Points" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Big/PS Points" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Didot Points" ) );
+    spacingBelowMinusUnit->insertItem( tr( "Cicero Points" ) );
+    spacingBelowMinusUnit->setEnabled( FALSE );
+    spacingBelowMinusUnit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingBelowMinusUnit->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingBelowMinusUnit, 4, 4 );
+
+    spacingAbovePlusUnit = new QComboBox( FALSE, spacingOptions, "spacingAbovePlusUnit" );
+    spacingAbovePlusUnit->insertItem( tr( "Centimetres" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Inches" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Points" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Millimetres" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Picas" ) );
+    spacingAbovePlusUnit->insertItem( tr( "ex Units" ) );
+    spacingAbovePlusUnit->insertItem( tr( "em Units" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Scaled Points" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Big/PS Points" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Didot Points" ) );
+    spacingAbovePlusUnit->insertItem( tr( "Cicero Points" ) );
+    spacingAbovePlusUnit->setEnabled( FALSE );
+    spacingAbovePlusUnit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingAbovePlusUnit->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingAbovePlusUnit, 2, 3 );
+
+    spacingAboveValueUnit = new QComboBox( FALSE, spacingOptions, "spacingAboveValueUnit" );
+    spacingAboveValueUnit->insertItem( tr( "Centimetres" ) );
+    spacingAboveValueUnit->insertItem( tr( "Inches" ) );
+    spacingAboveValueUnit->insertItem( tr( "Points" ) );
+    spacingAboveValueUnit->insertItem( tr( "Millimetres" ) );
+    spacingAboveValueUnit->insertItem( tr( "Picas" ) );
+    spacingAboveValueUnit->insertItem( tr( "ex Units" ) );
+    spacingAboveValueUnit->insertItem( tr( "em Units" ) );
+    spacingAboveValueUnit->insertItem( tr( "Scaled Points" ) );
+    spacingAboveValueUnit->insertItem( tr( "Big/PS Points" ) );
+    spacingAboveValueUnit->insertItem( tr( "Didot Points" ) );
+    spacingAboveValueUnit->insertItem( tr( "Cicero Points" ) );
+    spacingAboveValueUnit->setEnabled( FALSE );
+    spacingAboveValueUnit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingAboveValueUnit->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingAboveValueUnit, 2, 2 );
+
+    spacingBelowValue = new QLineEdit( spacingOptions, "spacingBelowValue" );
+    spacingBelowValue->setEnabled( FALSE );
+
+    spacingOptionsLayout->addWidget( spacingBelowValue, 3, 2 );
+
+    spacingBelowPlus = new QLineEdit( spacingOptions, "spacingBelowPlus" );
+    spacingBelowPlus->setEnabled( FALSE );
+
+    spacingOptionsLayout->addWidget( spacingBelowPlus, 3, 3 );
+
+    spacingAboveMinusUnit = new QComboBox( FALSE, spacingOptions, "spacingAboveMinusUnit" );
+    spacingAboveMinusUnit->insertItem( tr( "Centimetres" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Inches" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Points" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Millimetres" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Picas" ) );
+    spacingAboveMinusUnit->insertItem( tr( "ex Units" ) );
+    spacingAboveMinusUnit->insertItem( tr( "em Units" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Scaled Points" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Big/PS Points" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Didot Points" ) );
+    spacingAboveMinusUnit->insertItem( tr( "Cicero Points" ) );
+    spacingAboveMinusUnit->setEnabled( FALSE );
+    spacingAboveMinusUnit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingAboveMinusUnit->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingAboveMinusUnit, 2, 4 );
+
+    spacingAboveValue = new QLineEdit( spacingOptions, "spacingAboveValue" );
+    spacingAboveValue->setEnabled( FALSE );
+
+    spacingOptionsLayout->addWidget( spacingAboveValue, 1, 2 );
+
+    spacingAbovePlus = new QLineEdit( spacingOptions, "spacingAbovePlus" );
+    spacingAbovePlus->setEnabled( FALSE );
+
+    spacingOptionsLayout->addWidget( spacingAbovePlus, 1, 3 );
+
+    spacingAboveMinus = new QLineEdit( spacingOptions, "spacingAboveMinus" );
+    spacingAboveMinus->setEnabled( FALSE );
+
+    spacingOptionsLayout->addWidget( spacingAboveMinus, 1, 4 );
+
+    spacingBelowMinus = new QLineEdit( spacingOptions, "spacingBelowMinus" );
+    spacingBelowMinus->setEnabled( FALSE );
+
+    spacingOptionsLayout->addWidget( spacingBelowMinus, 3, 4 );
+
+    Layout2_1 = new QHBoxLayout; 
+    Layout2_1->setSpacing( 6 );
+    Layout2_1->setMargin( 0 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout2_1->addItem( spacer_2 );
+
+    spacingBelowUnitsL = new QLabel( spacingOptions, "spacingBelowUnitsL" );
+    spacingBelowUnitsL->setText( tr( "Units:" ) );
+    spacingBelowUnitsL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, spacingBelowUnitsL->sizePolicy().hasHeightForWidth() ) );
+    spacingBelowUnitsL->setEnabled( FALSE );
+    QToolTip::add(  spacingBelowUnitsL, tr( "Unit of Size, Stretch and Slink" ) );
+    Layout2_1->addWidget( spacingBelowUnitsL );
+
+    spacingOptionsLayout->addLayout( Layout2_1, 4, 1 );
+
+    Layout2_1_2 = new QHBoxLayout; 
+    Layout2_1_2->setSpacing( 6 );
+    Layout2_1_2->setMargin( 0 );
+    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout2_1_2->addItem( spacer_3 );
+
+    spacingAboveUnitsL = new QLabel( spacingOptions, "spacingAboveUnitsL" );
+    spacingAboveUnitsL->setText( tr( "Units:" ) );
+    spacingAboveUnitsL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, spacingAboveUnitsL->sizePolicy().hasHeightForWidth() ) );
+    spacingAboveUnitsL->setEnabled( FALSE );
+    QToolTip::add(  spacingAboveUnitsL, tr( "Unit of Size, Stretch and Slink" ) );
+    Layout2_1_2->addWidget( spacingAboveUnitsL );
+
+    spacingOptionsLayout->addLayout( Layout2_1_2, 2, 1 );
+
+    spacingValueL = new QLabel( spacingOptions, "spacingValueL" );
+    spacingValueL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, spacingValueL->sizePolicy().hasHeightForWidth() ) );
+    spacingValueL->setText( tr( "Value:" ) );
+    spacingValueL->setEnabled( FALSE );
+    QToolTip::add(  spacingValueL, tr( "Amount of spacing" ) );
+
+    spacingOptionsLayout->addWidget( spacingValueL, 0, 2 );
+
+    spacingPlusL = new QLabel( spacingOptions, "spacingPlusL" );
+    spacingPlusL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, spacingPlusL->sizePolicy().hasHeightForWidth() ) );
+    spacingPlusL->setText( tr( "Stretch:" ) );
+    spacingPlusL->setEnabled( FALSE );
+    QToolTip::add(  spacingPlusL, tr( "Margin by with paragraph is allowed to increase" ) );
+
+    spacingOptionsLayout->addWidget( spacingPlusL, 0, 3 );
+
+    spacingMinusL = new QLabel( spacingOptions, "spacingMinusL" );
+    spacingMinusL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, spacingMinusL->sizePolicy().hasHeightForWidth() ) );
+    spacingMinusL->setText( tr( "Shrink:" ) );
+    spacingMinusL->setEnabled( FALSE );
+    QToolTip::add(  spacingMinusL, tr( "Margin by with paragraph is allowed to increase" ) );
+
+    spacingOptionsLayout->addWidget( spacingMinusL, 0, 4 );
+
+    spacingAbove = new QComboBox( FALSE, spacingOptions, "spacingAbove" );
+    spacingAbove->insertItem( tr( "None" ) );
+    spacingAbove->insertItem( tr( "DefSkip" ) );
+    spacingAbove->insertItem( tr( "SmallSkip" ) );
+    spacingAbove->insertItem( tr( "MedSkip" ) );
+    spacingAbove->insertItem( tr( "BigSkip" ) );
+    spacingAbove->insertItem( tr( "VFill" ) );
+    spacingAbove->insertItem( tr( "Custom" ) );
+    spacingAbove->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingAbove->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingAbove, 1, 1 );
+
+    spacingAboveL = new QLabel( spacingOptions, "spacingAboveL" );
+    spacingAboveL->setText( tr( "Above:" ) );
+
+    spacingOptionsLayout->addWidget( spacingAboveL, 1, 0 );
+
+    spacingBelowL = new QLabel( spacingOptions, "spacingBelowL" );
+    spacingBelowL->setText( tr( "Below:" ) );
+
+    spacingOptionsLayout->addWidget( spacingBelowL, 3, 0 );
+
+    spacingBelow = new QComboBox( FALSE, spacingOptions, "spacingBelow" );
+    spacingBelow->insertItem( tr( "None" ) );
+    spacingBelow->insertItem( tr( "DefSkip" ) );
+    spacingBelow->insertItem( tr( "SmallSkip" ) );
+    spacingBelow->insertItem( tr( "MedSkip" ) );
+    spacingBelow->insertItem( tr( "BigSkip" ) );
+    spacingBelow->insertItem( tr( "VFill" ) );
+    spacingBelow->insertItem( tr( "Custom" ) );
+    spacingBelow->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, spacingBelow->sizePolicy().hasHeightForWidth() ) );
+
+    spacingOptionsLayout->addWidget( spacingBelow, 3, 1 );
+
+    spacingAboveKeep = new QCheckBox( spacingOptions, "spacingAboveKeep" );
+    spacingAboveKeep->setText( tr( "Keep space at the top of the page" ) );
+    spacingAboveKeep->setEnabled( TRUE );
+    QToolTip::add(  spacingAboveKeep, tr( "Keep space at top of the page" ) );
+
+    spacingOptionsLayout->addMultiCellWidget( spacingAboveKeep, 5, 5, 1, 2 );
+
+    spacingBelowKeep = new QCheckBox( spacingOptions, "spacingBelowKeep" );
+    spacingBelowKeep->setText( tr( "Keep space at the bottom of the page" ) );
+    spacingBelowKeep->setEnabled( TRUE );
+    QToolTip::add(  spacingBelowKeep, tr( "Keep space at the bottom of the page" ) );
+
+    spacingOptionsLayout->addMultiCellWidget( spacingBelowKeep, 5, 5, 3, 4 );
+    tabLayout->addWidget( spacingOptions );
+
+    listOptions = new QGroupBox( tab, "listOptions" );
+    listOptions->setTitle( tr( "List environment" ) );
+    listOptions->setEnabled( FALSE );
+    listOptions->setColumnLayout(0, Qt::Vertical );
+    listOptions->layout()->setSpacing( 0 );
+    listOptions->layout()->setMargin( 0 );
+    listOptionsLayout = new QHBoxLayout( listOptions->layout() );
+    listOptionsLayout->setAlignment( Qt::AlignTop );
+    listOptionsLayout->setSpacing( 6 );
+    listOptionsLayout->setMargin( 11 );
+
+    labelWidthL = new QLabel( listOptions, "labelWidthL" );
+    labelWidthL->setText( tr( "Label width:" ) );
+    labelWidthL->setEnabled( FALSE );
+    QToolTip::add(  labelWidthL, tr( "Label width in list environment" ) );
+    listOptionsLayout->addWidget( labelWidthL );
+
+    labelWidth = new QLineEdit( listOptions, "labelWidth" );
+    labelWidth->setEnabled( FALSE );
+    listOptionsLayout->addWidget( labelWidth );
+    QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    listOptionsLayout->addItem( spacer_4 );
+    tabLayout->addWidget( listOptions );
+    QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    tabLayout->addItem( spacer_5 );
+    TabsParagraph->insertTab( tab, tr( "&Alignment and Spacing" ) );
+
+    tab_2 = new QWidget( TabsParagraph, "tab_2" );
+    tabLayout_2 = new QGridLayout( tab_2 ); 
+    tabLayout_2->setSpacing( 6 );
+    tabLayout_2->setMargin( 11 );
+
+    pagebreakOptions = new QGroupBox( tab_2, "pagebreakOptions" );
+    pagebreakOptions->setTitle( tr( "Page break" ) );
+    pagebreakOptions->setOrientation( QGroupBox::Vertical );
+    pagebreakOptions->setColumnLayout(0, Qt::Vertical );
+    pagebreakOptions->layout()->setSpacing( 0 );
+    pagebreakOptions->layout()->setMargin( 0 );
+    pagebreakOptionsLayout = new QVBoxLayout( pagebreakOptions->layout() );
+    pagebreakOptionsLayout->setAlignment( Qt::AlignTop );
+    pagebreakOptionsLayout->setSpacing( 6 );
+    pagebreakOptionsLayout->setMargin( 11 );
+
+    pagebreakAbove = new QCheckBox( pagebreakOptions, "pagebreakAbove" );
+    pagebreakAbove->setText( tr( "above paragraph" ) );
+    pagebreakOptionsLayout->addWidget( pagebreakAbove );
+
+    pagebreakBelow = new QCheckBox( pagebreakOptions, "pagebreakBelow" );
+    pagebreakBelow->setText( tr( "below paragraph" ) );
+    pagebreakOptionsLayout->addWidget( pagebreakBelow );
+
+    tabLayout_2->addWidget( pagebreakOptions, 0, 1 );
+    QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    tabLayout_2->addItem( spacer_6, 0, 2 );
+    QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    tabLayout_2->addItem( spacer_7, 1, 2 );
+
+    lineOptions = new QGroupBox( tab_2, "lineOptions" );
+    lineOptions->setTitle( tr( "Line" ) );
+    lineOptions->setColumnLayout(0, Qt::Vertical );
+    lineOptions->layout()->setSpacing( 0 );
+    lineOptions->layout()->setMargin( 0 );
+    lineOptionsLayout = new QVBoxLayout( lineOptions->layout() );
+    lineOptionsLayout->setAlignment( Qt::AlignTop );
+    lineOptionsLayout->setSpacing( 6 );
+    lineOptionsLayout->setMargin( 11 );
+
+    lineAbove = new QCheckBox( lineOptions, "lineAbove" );
+    lineAbove->setText( tr( "above paragraph" ) );
+    lineOptionsLayout->addWidget( lineAbove );
+
+    lineBelow = new QCheckBox( lineOptions, "lineBelow" );
+    lineBelow->setText( tr( "below paragraph" ) );
+    lineOptionsLayout->addWidget( lineBelow );
+
+    tabLayout_2->addWidget( lineOptions, 0, 0 );
+    TabsParagraph->insertTab( tab_2, tr( "&Lines and Page breaks" ) );
+
+    tab_3 = new QWidget( TabsParagraph, "tab_3" );
+    tabLayout_3 = new QGridLayout( tab_3 ); 
+    tabLayout_3->setSpacing( 6 );
+    tabLayout_3->setMargin( 11 );
+    QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    tabLayout_3->addItem( spacer_8, 1, 1 );
+
+    Layout7 = new QGridLayout; 
+    Layout7->setSpacing( 6 );
+    Layout7->setMargin( 0 );
+
+    extraUnitL = new QLabel( tab_3, "extraUnitL" );
+    extraUnitL->setText( tr( "Unit:" ) );
+    extraUnitL->setEnabled( FALSE );
+
+    Layout7->addWidget( extraUnitL, 0, 2 );
+
+    extraUnit = new QComboBox( FALSE, tab_3, "extraUnit" );
+    extraUnit->insertItem( tr( "Centimetres" ) );
+    extraUnit->insertItem( tr( "Inches" ) );
+    extraUnit->insertItem( tr( "Points" ) );
+    extraUnit->insertItem( tr( "Millimetres" ) );
+    extraUnit->insertItem( tr( "Picas" ) );
+    extraUnit->insertItem( tr( "ex Units" ) );
+    extraUnit->insertItem( tr( "em Units" ) );
+    extraUnit->insertItem( tr( "Scaled Points" ) );
+    extraUnit->insertItem( tr( "Big/PS Points" ) );
+    extraUnit->insertItem( tr( "Didot Points" ) );
+    extraUnit->insertItem( tr( "Cicero Points" ) );
+    extraUnit->setFocusPolicy( QComboBox::TabFocus );
+    extraUnit->setEnabled( FALSE );
+
+    Layout7->addWidget( extraUnit, 1, 2 );
+
+    extraWidth = new QLineEdit( tab_3, "extraWidth" );
+    extraWidth->setEnabled( FALSE );
+
+    Layout7->addWidget( extraWidth, 1, 1 );
+
+    extraType = new QComboBox( FALSE, tab_3, "extraType" );
+    extraType->insertItem( tr( "None" ) );
+    extraType->insertItem( tr( "Minipage" ) );
+    extraType->insertItem( tr( "Wrap text around floats" ) );
+    extraType->insertItem( tr( "Indent whole paragraph" ) );
+
+    Layout7->addWidget( extraType, 1, 0 );
+
+    extraWidthL = new QLabel( tab_3, "extraWidthL" );
+    extraWidthL->setText( tr( "Width:" ) );
+    extraWidthL->setEnabled( FALSE );
+
+    Layout7->addWidget( extraWidthL, 0, 1 );
+
+    tabLayout_3->addLayout( Layout7, 0, 0 );
+
+    minipageOptions = new QGroupBox( tab_3, "minipageOptions" );
+    minipageOptions->setTitle( tr( "Minipage options" ) );
+    minipageOptions->setEnabled( FALSE );
+    minipageOptions->setColumnLayout(0, Qt::Vertical );
+    minipageOptions->layout()->setSpacing( 0 );
+    minipageOptions->layout()->setMargin( 0 );
+    minipageOptionsLayout = new QVBoxLayout( minipageOptions->layout() );
+    minipageOptionsLayout->setAlignment( Qt::AlignTop );
+    minipageOptionsLayout->setSpacing( 6 );
+    minipageOptionsLayout->setMargin( 11 );
+
+    minipageStart = new QCheckBox( minipageOptions, "minipageStart" );
+    minipageStart->setText( tr( "Start new minipage" ) );
+    minipageStart->setEnabled( FALSE );
+    minipageOptionsLayout->addWidget( minipageStart );
+
+    minipageHfill = new QCheckBox( minipageOptions, "minipageHfill" );
+    minipageHfill->setText( tr( "HFill between minipage paragraphs" ) );
+    minipageHfill->setEnabled( FALSE );
+    minipageOptionsLayout->addWidget( minipageHfill );
+
+    Layout15 = new QHBoxLayout; 
+    Layout15->setSpacing( 6 );
+    Layout15->setMargin( 0 );
+
+    minipageValignL = new QLabel( minipageOptions, "minipageValignL" );
+    minipageValignL->setText( tr( "Vertical Alignment:" ) );
+    Layout15->addWidget( minipageValignL );
+
+    minipageValign = new QComboBox( FALSE, minipageOptions, "minipageValign" );
+    minipageValign->insertItem( tr( "Top" ) );
+    minipageValign->insertItem( tr( "Middle" ) );
+    minipageValign->insertItem( tr( "Bottom" ) );
+    Layout15->addWidget( minipageValign );
+    QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout15->addItem( spacer_9 );
+    minipageOptionsLayout->addLayout( Layout15 );
+
+    tabLayout_3->addWidget( minipageOptions, 1, 0 );
+    QSpacerItem* spacer_10 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    tabLayout_3->addItem( spacer_10, 2, 0 );
+    TabsParagraph->insertTab( tab_3, tr( "&Extra options" ) );
+    ParagraphDlgLayout->addWidget( TabsParagraph );
+
+    Layout1 = new QHBoxLayout; 
+    Layout1->setSpacing( 6 );
+    Layout1->setMargin( 0 );
+
+    defaultsPB = new QPushButton( this, "defaultsPB" );
+    defaultsPB->setText( tr( "&Restore" ) );
+    Layout1->addWidget( defaultsPB );
+    QSpacerItem* spacer_11 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout1->addItem( spacer_11 );
+
+    applyPB = new QPushButton( this, "applyPB" );
+    applyPB->setText( tr( "&Apply" ) );
+    Layout1->addWidget( applyPB );
+
+    okPB = new QPushButton( this, "okPB" );
+    okPB->setText( tr( "&OK" ) );
+    okPB->setFlat( FALSE );
+    okPB->setDefault( FALSE );
+    Layout1->addWidget( okPB );
+
+    cancelPB = new QPushButton( this, "cancelPB" );
+    cancelPB->setText( tr( "&Cancel" ) );
+    cancelPB->setDefault( TRUE );
+    Layout1->addWidget( cancelPB );
+    ParagraphDlgLayout->addLayout( Layout1 );
+
+    // signals and slots connections
+    connect( defaultsPB, SIGNAL( clicked() ), this, SLOT( restore_adaptor() ) );
+    connect( applyPB, SIGNAL( clicked() ), this, SLOT( apply_adaptor() ) );
+    connect( cancelPB, SIGNAL( clicked() ), this, SLOT( cancel_adaptor() ) );
+    connect( okPB, SIGNAL( clicked() ), this, SLOT( ok_adaptor() ) );
+    connect( spacingAbove, SIGNAL( activated(int) ), this, SLOT( enable_spacingAbove(int) ) );
+    connect( spacingBelow, SIGNAL( activated(int) ), this, SLOT( enable_spacingBelow(int) ) );
+    connect( extraType, SIGNAL( activated(int) ), this, SLOT( enable_minipageOptions(int) ) );
+    connect( extraType, SIGNAL( activated(int) ), this, SLOT( enable_extraOptions(int) ) );
+
+    // tab order
+    setTabOrder( TabsParagraph, alignment );
+    setTabOrder( alignment, noIndent );
+    setTabOrder( noIndent, spacingAbove );
+    setTabOrder( spacingAbove, spacingAboveValue );
+    setTabOrder( spacingAboveValue, spacingAbovePlus );
+    setTabOrder( spacingAbovePlus, spacingAboveMinus );
+    setTabOrder( spacingAboveMinus, spacingAboveKeep );
+    setTabOrder( spacingAboveKeep, spacingAboveValueUnit );
+    setTabOrder( spacingAboveValueUnit, spacingAbovePlusUnit );
+    setTabOrder( spacingAbovePlusUnit, spacingAboveMinusUnit );
+    setTabOrder( spacingAboveMinusUnit, spacingBelow );
+    setTabOrder( spacingBelow, spacingBelowValue );
+    setTabOrder( spacingBelowValue, spacingBelowPlus );
+    setTabOrder( spacingBelowPlus, spacingBelowMinus );
+    setTabOrder( spacingBelowMinus, spacingBelowKeep );
+    setTabOrder( spacingBelowKeep, spacingBelowValueUnit );
+    setTabOrder( spacingBelowValueUnit, spacingBelowPlusUnit );
+    setTabOrder( spacingBelowPlusUnit, spacingBelowMinusUnit );
+    setTabOrder( spacingBelowMinusUnit, labelWidth );
+    setTabOrder( labelWidth, lineAbove );
+    setTabOrder( lineAbove, lineBelow );
+    setTabOrder( lineBelow, pagebreakAbove );
+    setTabOrder( pagebreakAbove, pagebreakBelow );
+    setTabOrder( pagebreakBelow, extraType );
+    setTabOrder( extraType, extraWidth );
+    setTabOrder( extraWidth, extraUnit );
+    setTabOrder( extraUnit, minipageStart );
+    setTabOrder( minipageStart, minipageHfill );
+    setTabOrder( minipageHfill, minipageValign );
+    setTabOrder( minipageValign, cancelPB );
+    setTabOrder( cancelPB, okPB );
+    setTabOrder( okPB, applyPB );
+    setTabOrder( applyPB, defaultsPB );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+ParagraphDlg::~ParagraphDlg()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+void ParagraphDlg::apply_adaptor()
+{
+    qWarning( "ParagraphDlg::apply_adaptor(): Not implemented yet!" );
+}
+
+void ParagraphDlg::cancel_adaptor()
+{
+    qWarning( "ParagraphDlg::cancel_adaptor(): Not implemented yet!" );
+}
+
+void ParagraphDlg::enable_extraOptions(int)
+{
+    qWarning( "ParagraphDlg::enable_extraOptions(int): Not implemented yet!" );
+}
+
+void ParagraphDlg::enable_minipageOptions(int)
+{
+    qWarning( "ParagraphDlg::enable_minipageOptions(int): Not implemented yet!" );
+}
+
+void ParagraphDlg::enable_spacingAbove(int)
+{
+    qWarning( "ParagraphDlg::enable_spacingAbove(int): Not implemented yet!" );
+}
+
+void ParagraphDlg::enable_spacingBelow(int)
+{
+    qWarning( "ParagraphDlg::enable_spacingBelow(int): Not implemented yet!" );
+}
+
+void ParagraphDlg::ok_adaptor()
+{
+    qWarning( "ParagraphDlg::ok_adaptor(): Not implemented yet!" );
+}
+
+void ParagraphDlg::restore_adaptor()
+{
+    qWarning( "ParagraphDlg::restore_adaptor(): Not implemented yet!" );
+}
+
diff --git a/src/frontends/qt2/paragraphdlg.h b/src/frontends/qt2/paragraphdlg.h
new file mode 100644 (file)
index 0000000..39c0877
--- /dev/null
@@ -0,0 +1,117 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'paragraphdlg.ui'
+**
+** Created: Sat Feb 10 14:22:05 2001
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef PARAGRAPHDLG_H
+#define PARAGRAPHDLG_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTabWidget;
+class QWidget;
+
+class ParagraphDlg : public QDialog
+{ 
+    Q_OBJECT
+
+public:
+    ParagraphDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~ParagraphDlg();
+
+    QTabWidget* TabsParagraph;
+    QWidget* tab;
+    QLabel* alignmentL;
+    QComboBox* alignment;
+    QCheckBox* noIndent;
+    QGroupBox* spacingOptions;
+    QComboBox* spacingBelowValueUnit;
+    QComboBox* spacingBelowPlusUnit;
+    QComboBox* spacingBelowMinusUnit;
+    QComboBox* spacingAbovePlusUnit;
+    QComboBox* spacingAboveValueUnit;
+    QLineEdit* spacingBelowValue;
+    QLineEdit* spacingBelowPlus;
+    QComboBox* spacingAboveMinusUnit;
+    QLineEdit* spacingAboveValue;
+    QLineEdit* spacingAbovePlus;
+    QLineEdit* spacingAboveMinus;
+    QLineEdit* spacingBelowMinus;
+    QLabel* spacingBelowUnitsL;
+    QLabel* spacingAboveUnitsL;
+    QLabel* spacingValueL;
+    QLabel* spacingPlusL;
+    QLabel* spacingMinusL;
+    QComboBox* spacingAbove;
+    QLabel* spacingAboveL;
+    QLabel* spacingBelowL;
+    QComboBox* spacingBelow;
+    QCheckBox* spacingAboveKeep;
+    QCheckBox* spacingBelowKeep;
+    QGroupBox* listOptions;
+    QLabel* labelWidthL;
+    QLineEdit* labelWidth;
+    QWidget* tab_2;
+    QGroupBox* pagebreakOptions;
+    QCheckBox* pagebreakAbove;
+    QCheckBox* pagebreakBelow;
+    QGroupBox* lineOptions;
+    QCheckBox* lineAbove;
+    QCheckBox* lineBelow;
+    QWidget* tab_3;
+    QLabel* extraUnitL;
+    QComboBox* extraUnit;
+    QLineEdit* extraWidth;
+    QComboBox* extraType;
+    QLabel* extraWidthL;
+    QGroupBox* minipageOptions;
+    QCheckBox* minipageStart;
+    QCheckBox* minipageHfill;
+    QLabel* minipageValignL;
+    QComboBox* minipageValign;
+    QPushButton* defaultsPB;
+    QPushButton* applyPB;
+    QPushButton* okPB;
+    QPushButton* cancelPB;
+
+protected slots:
+    virtual void apply_adaptor();
+    virtual void cancel_adaptor();
+    virtual void enable_extraOptions(int);
+    virtual void enable_minipageOptions(int);
+    virtual void enable_spacingAbove(int);
+    virtual void enable_spacingBelow(int);
+    virtual void ok_adaptor();
+    virtual void restore_adaptor();
+
+protected:
+    QVBoxLayout* ParagraphDlgLayout;
+    QVBoxLayout* tabLayout;
+    QHBoxLayout* Layout6;
+    QGridLayout* spacingOptionsLayout;
+    QHBoxLayout* Layout2_1;
+    QHBoxLayout* Layout2_1_2;
+    QHBoxLayout* listOptionsLayout;
+    QGridLayout* tabLayout_2;
+    QVBoxLayout* pagebreakOptionsLayout;
+    QVBoxLayout* lineOptionsLayout;
+    QGridLayout* tabLayout_3;
+    QGridLayout* Layout7;
+    QVBoxLayout* minipageOptionsLayout;
+    QHBoxLayout* Layout15;
+    QHBoxLayout* Layout1;
+};
+
+#endif // PARAGRAPHDLG_H
diff --git a/src/frontends/qt2/paragraphdlg.ui b/src/frontends/qt2/paragraphdlg.ui
new file mode 100644 (file)
index 0000000..777e2c8
--- /dev/null
@@ -0,0 +1,1978 @@
+<!DOCTYPE UI><UI>
+<class>ParagraphDlg</class>
+<widget>
+    <class>QDialog</class>
+    <property stdset="1">
+        <name>name</name>
+        <cstring>ParagraphDlg</cstring>
+    </property>
+    <property stdset="1">
+        <name>geometry</name>
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>559</width>
+            <height>387</height>
+        </rect>
+    </property>
+    <property stdset="1">
+        <name>sizePolicy</name>
+        <sizepolicy>
+            <hsizetype>1</hsizetype>
+            <vsizetype>1</vsizetype>
+        </sizepolicy>
+    </property>
+    <property stdset="1">
+        <name>caption</name>
+        <string>Paragraph</string>
+    </property>
+    <property stdset="1">
+        <name>sizeGripEnabled</name>
+        <bool>true</bool>
+    </property>
+    <property>
+        <name>layoutMargin</name>
+    </property>
+    <property>
+        <name>layoutSpacing</name>
+    </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>TabsParagraph</cstring>
+            </property>
+            <property>
+                <name>layoutMargin</name>
+            </property>
+            <property>
+                <name>layoutSpacing</name>
+            </property>
+            <widget>
+                <class>QWidget</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>tab</cstring>
+                </property>
+                <attribute>
+                    <name>title</name>
+                    <string>&amp;Alignment and Spacing</string>
+                </attribute>
+                <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>Layout6</cstring>
+                        </property>
+                        <hbox>
+                            <property stdset="1">
+                                <name>margin</name>
+                                <number>0</number>
+                            </property>
+                            <property stdset="1">
+                                <name>spacing</name>
+                                <number>6</number>
+                            </property>
+                            <widget>
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>alignmentL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Alignment:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>1</hsizetype>
+                                        <vsizetype>1</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget>
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Justified</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Left</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Right</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centered</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>alignment</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>insertionPolicy</name>
+                                    <enum>AtBottom</enum>
+                                </property>
+                                <property stdset="1">
+                                    <name>autoCompletion</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <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>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>noIndent</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>No indentation</string>
+                                </property>
+                            </widget>
+                        </hbox>
+                    </widget>
+                    <widget>
+                        <class>QGroupBox</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>spacingOptions</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>title</name>
+                            <string>Spacing</string>
+                        </property>
+                        <property stdset="1">
+                            <name>enabled</name>
+                            <bool>true</bool>
+                        </property>
+                        <property>
+                            <name>layoutSpacing</name>
+                        </property>
+                        <grid>
+                            <property stdset="1">
+                                <name>margin</name>
+                                <number>11</number>
+                            </property>
+                            <property stdset="1">
+                                <name>spacing</name>
+                                <number>6</number>
+                            </property>
+                            <widget row="4"  column="2" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowValueUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="4"  column="3" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowPlusUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="4"  column="4" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowMinusUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="2"  column="3" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAbovePlusUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="2"  column="2" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAboveValueUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="3"  column="2" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowValue</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="3"  column="3" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowPlus</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="2"  column="4" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAboveMinusUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="2" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAboveValue</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="3" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAbovePlus</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="4" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAboveMinus</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="3"  column="4" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowMinus</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="4"  column="1" >
+                                <class>QLayoutWidget</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>Layout2_1</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>Spacer2_1_1</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>QLabel</class>
+                                        <property stdset="1">
+                                            <name>name</name>
+                                            <cstring>spacingBelowUnitsL</cstring>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>text</name>
+                                            <string>Units:</string>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>sizePolicy</name>
+                                            <sizepolicy>
+                                                <hsizetype>1</hsizetype>
+                                                <vsizetype>1</vsizetype>
+                                            </sizepolicy>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>enabled</name>
+                                            <bool>false</bool>
+                                        </property>
+                                        <property>
+                                            <name>toolTip</name>
+                                            <string>Unit of Size, Stretch and Slink</string>
+                                        </property>
+                                    </widget>
+                                </hbox>
+                            </widget>
+                            <widget row="2"  column="1" >
+                                <class>QLayoutWidget</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>Layout2_1_2</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>Spacer2_1_1_2</cstring>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>orientation</name>
+                                            <enum>Horizontal</enum>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>sizeType</name>
+                                            <enum>Expanding</enum>
+                                        </property>
+                                        <property>
+                                            <name>sizeHint</name>
+                                            <size>
+                                                <width>20</width>
+                                                <height>20</height>
+                                            </size>
+                                        </property>
+                                    </spacer>
+                                    <widget>
+                                        <class>QLabel</class>
+                                        <property stdset="1">
+                                            <name>name</name>
+                                            <cstring>spacingAboveUnitsL</cstring>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>text</name>
+                                            <string>Units:</string>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>sizePolicy</name>
+                                            <sizepolicy>
+                                                <hsizetype>1</hsizetype>
+                                                <vsizetype>1</vsizetype>
+                                            </sizepolicy>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>enabled</name>
+                                            <bool>false</bool>
+                                        </property>
+                                        <property>
+                                            <name>toolTip</name>
+                                            <string>Unit of Size, Stretch and Slink</string>
+                                        </property>
+                                    </widget>
+                                </hbox>
+                            </widget>
+                            <widget row="0"  column="2" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingValueL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>1</hsizetype>
+                                        <vsizetype>1</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Value:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property>
+                                    <name>toolTip</name>
+                                    <string>Amount of spacing</string>
+                                </property>
+                            </widget>
+                            <widget row="0"  column="3" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingPlusL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>1</hsizetype>
+                                        <vsizetype>1</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Stretch:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property>
+                                    <name>toolTip</name>
+                                    <string>Margin by with paragraph is allowed to increase</string>
+                                </property>
+                            </widget>
+                            <widget row="0"  column="4" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingMinusL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>1</hsizetype>
+                                        <vsizetype>1</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Shrink:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property>
+                                    <name>toolTip</name>
+                                    <string>Margin by with paragraph is allowed to increase</string>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="1" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>None</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>DefSkip</string>
+                                    </property>
+                                </item>
+                                <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>VFill</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Custom</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAbove</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="0" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAboveL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Above:</string>
+                                </property>
+                                <property>
+                                    <name>buddy</name>
+                                    <cstring></cstring>
+                                </property>
+                            </widget>
+                            <widget row="3"  column="0" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Below:</string>
+                                </property>
+                                <property>
+                                    <name>buddy</name>
+                                    <cstring></cstring>
+                                </property>
+                            </widget>
+                            <widget row="3"  column="1" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>None</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>DefSkip</string>
+                                    </property>
+                                </item>
+                                <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>VFill</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Custom</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelow</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>sizePolicy</name>
+                                    <sizepolicy>
+                                        <hsizetype>3</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                    </sizepolicy>
+                                </property>
+                            </widget>
+                            <widget row="5"  column="1"  rowspan="1"  colspan="2" >
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingAboveKeep</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Keep space at the top of the page</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>true</bool>
+                                </property>
+                                <property>
+                                    <name>toolTip</name>
+                                    <string>Keep space at top of the page</string>
+                                </property>
+                            </widget>
+                            <widget row="5"  column="3"  rowspan="1"  colspan="2" >
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>spacingBelowKeep</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Keep space at the bottom of the page</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>true</bool>
+                                </property>
+                                <property>
+                                    <name>toolTip</name>
+                                    <string>Keep space at the bottom of the page</string>
+                                </property>
+                            </widget>
+                        </grid>
+                    </widget>
+                    <widget>
+                        <class>QGroupBox</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>listOptions</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>title</name>
+                            <string>List environment</string>
+                        </property>
+                        <property stdset="1">
+                            <name>enabled</name>
+                            <bool>false</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>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>labelWidthL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Label width:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                                <property>
+                                    <name>toolTip</name>
+                                    <string>Label width in list environment</string>
+                                </property>
+                            </widget>
+                            <widget>
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>labelWidth</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </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>
+                            </spacer>
+                        </hbox>
+                    </widget>
+                    <spacer>
+                        <property>
+                            <name>name</name>
+                            <cstring>Spacer1_5</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>
+                </vbox>
+            </widget>
+            <widget>
+                <class>QWidget</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>tab</cstring>
+                </property>
+                <attribute>
+                    <name>title</name>
+                    <string>&amp;Lines and Page breaks</string>
+                </attribute>
+                <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>QGroupBox</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>pagebreakOptions</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>title</name>
+                            <string>Page break</string>
+                        </property>
+                        <property stdset="1">
+                            <name>orientation</name>
+                            <enum>Vertical</enum>
+                        </property>
+                        <vbox>
+                            <property stdset="1">
+                                <name>margin</name>
+                                <number>11</number>
+                            </property>
+                            <property stdset="1">
+                                <name>spacing</name>
+                                <number>6</number>
+                            </property>
+                            <widget>
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>pagebreakAbove</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>above paragraph</string>
+                                </property>
+                            </widget>
+                            <widget>
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>pagebreakBelow</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>below paragraph</string>
+                                </property>
+                            </widget>
+                        </vbox>
+                    </widget>
+                    <spacer row="0"  column="2" >
+                        <property>
+                            <name>name</name>
+                            <cstring>Spacer1_2</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>orientation</name>
+                            <enum>Horizontal</enum>
+                        </property>
+                        <property stdset="1">
+                            <name>sizeType</name>
+                            <enum>Expanding</enum>
+                        </property>
+                        <property>
+                            <name>sizeHint</name>
+                            <size>
+                                <width>20</width>
+                                <height>20</height>
+                            </size>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>Index entry</string>
+                        </property>
+                    </spacer>
+                    <spacer row="1"  column="2" >
+                        <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 row="0"  column="0" >
+                        <class>QGroupBox</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>lineOptions</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>title</name>
+                            <string>Line</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>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>lineAbove</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>above paragraph</string>
+                                </property>
+                            </widget>
+                            <widget>
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>lineBelow</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>below paragraph</string>
+                                </property>
+                            </widget>
+                        </vbox>
+                    </widget>
+                </grid>
+            </widget>
+            <widget>
+                <class>QWidget</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>tab</cstring>
+                </property>
+                <attribute>
+                    <name>title</name>
+                    <string>&amp;Extra options</string>
+                </attribute>
+                <grid>
+                    <property stdset="1">
+                        <name>margin</name>
+                        <number>11</number>
+                    </property>
+                    <property stdset="1">
+                        <name>spacing</name>
+                        <number>6</number>
+                    </property>
+                    <spacer row="1"  column="1" >
+                        <property>
+                            <name>name</name>
+                            <cstring>Spacer1_4</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 row="0"  column="0" >
+                        <class>QLayoutWidget</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>Layout7</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="2" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>extraUnitL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Unit:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="2" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Centimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Inches</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Millimetres</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Picas</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>ex Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>em Units</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Scaled Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Big/PS Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Didot Points</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Cicero Points</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>extraUnit</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>focusPolicy</name>
+                                    <enum>TabFocus</enum>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="1" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>extraWidth</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget row="1"  column="0" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>None</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Minipage</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Wrap text around floats</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Indent whole paragraph</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>extraType</cstring>
+                                </property>
+                            </widget>
+                            <widget row="0"  column="1" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>extraWidthL</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Width:</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                        </grid>
+                    </widget>
+                    <widget row="1"  column="0" >
+                        <class>QGroupBox</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>minipageOptions</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>title</name>
+                            <string>Minipage options</string>
+                        </property>
+                        <property stdset="1">
+                            <name>enabled</name>
+                            <bool>false</bool>
+                        </property>
+                        <vbox>
+                            <property stdset="1">
+                                <name>margin</name>
+                                <number>11</number>
+                            </property>
+                            <property stdset="1">
+                                <name>spacing</name>
+                                <number>6</number>
+                            </property>
+                            <widget>
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>minipageStart</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>Start new minipage</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget>
+                                <class>QCheckBox</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>minipageHfill</cstring>
+                                </property>
+                                <property stdset="1">
+                                    <name>text</name>
+                                    <string>HFill between minipage paragraphs</string>
+                                </property>
+                                <property stdset="1">
+                                    <name>enabled</name>
+                                    <bool>false</bool>
+                                </property>
+                            </widget>
+                            <widget>
+                                <class>QLayoutWidget</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>Layout15</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>minipageValignL</cstring>
+                                        </property>
+                                        <property stdset="1">
+                                            <name>text</name>
+                                            <string>Vertical Alignment:</string>
+                                        </property>
+                                    </widget>
+                                    <widget>
+                                        <class>QComboBox</class>
+                                        <item>
+                                            <property>
+                                                <name>text</name>
+                                                <string>Top</string>
+                                            </property>
+                                        </item>
+                                        <item>
+                                            <property>
+                                                <name>text</name>
+                                                <string>Middle</string>
+                                            </property>
+                                        </item>
+                                        <item>
+                                            <property>
+                                                <name>text</name>
+                                                <string>Bottom</string>
+                                            </property>
+                                        </item>
+                                        <property stdset="1">
+                                            <name>name</name>
+                                            <cstring>minipageValign</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>
+                        </vbox>
+                    </widget>
+                    <spacer row="2"  column="0" >
+                        <property>
+                            <name>name</name>
+                            <cstring>Spacer6</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>
+                </grid>
+            </widget>
+        </widget>
+        <widget>
+            <class>QLayoutWidget</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>Layout1</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>defaultsPB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Restore</string>
+                    </property>
+                </widget>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer1</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>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>okPB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;OK</string>
+                    </property>
+                    <property stdset="1">
+                        <name>flat</name>
+                        <bool>false</bool>
+                    </property>
+                    <property stdset="1">
+                        <name>default</name>
+                        <bool>false</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>
+                    <property stdset="1">
+                        <name>default</name>
+                        <bool>true</bool>
+                    </property>
+                </widget>
+            </hbox>
+        </widget>
+    </vbox>
+</widget>
+<connections>
+    <connection>
+        <sender>defaultsPB</sender>
+        <signal>clicked()</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>restore_adaptor()</slot>
+    </connection>
+    <connection>
+        <sender>applyPB</sender>
+        <signal>clicked()</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>apply_adaptor()</slot>
+    </connection>
+    <connection>
+        <sender>cancelPB</sender>
+        <signal>clicked()</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>cancel_adaptor()</slot>
+    </connection>
+    <connection>
+        <sender>okPB</sender>
+        <signal>clicked()</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>ok_adaptor()</slot>
+    </connection>
+    <connection>
+        <sender>spacingAbove</sender>
+        <signal>activated(int)</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>enable_spacingAbove(int)</slot>
+    </connection>
+    <connection>
+        <sender>spacingBelow</sender>
+        <signal>activated(int)</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>enable_spacingBelow(int)</slot>
+    </connection>
+    <connection>
+        <sender>extraType</sender>
+        <signal>activated(int)</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>enable_minipageOptions(int)</slot>
+    </connection>
+    <connection>
+        <sender>extraType</sender>
+        <signal>activated(int)</signal>
+        <receiver>ParagraphDlg</receiver>
+        <slot>enable_extraOptions(int)</slot>
+    </connection>
+    <slot access="protected">apply_adaptor()</slot>
+    <slot access="protected">cancel_adaptor()</slot>
+    <slot access="protected">enable_extraOptions(int)</slot>
+    <slot access="protected">enable_minipageOptions(int)</slot>
+    <slot access="protected">enable_spacingAbove(int)</slot>
+    <slot access="protected">enable_spacingBelow(int)</slot>
+    <slot access="protected">ok_adaptor()</slot>
+    <slot access="protected">restore_adaptor()</slot>
+</connections>
+<tabstops>
+    <tabstop>TabsParagraph</tabstop>
+    <tabstop>alignment</tabstop>
+    <tabstop>noIndent</tabstop>
+    <tabstop>spacingAbove</tabstop>
+    <tabstop>spacingAboveValue</tabstop>
+    <tabstop>spacingAbovePlus</tabstop>
+    <tabstop>spacingAboveMinus</tabstop>
+    <tabstop>spacingAboveKeep</tabstop>
+    <tabstop>spacingAboveValueUnit</tabstop>
+    <tabstop>spacingAbovePlusUnit</tabstop>
+    <tabstop>spacingAboveMinusUnit</tabstop>
+    <tabstop>spacingBelow</tabstop>
+    <tabstop>spacingBelowValue</tabstop>
+    <tabstop>spacingBelowPlus</tabstop>
+    <tabstop>spacingBelowMinus</tabstop>
+    <tabstop>spacingBelowKeep</tabstop>
+    <tabstop>spacingBelowValueUnit</tabstop>
+    <tabstop>spacingBelowPlusUnit</tabstop>
+    <tabstop>spacingBelowMinusUnit</tabstop>
+    <tabstop>labelWidth</tabstop>
+    <tabstop>lineAbove</tabstop>
+    <tabstop>lineBelow</tabstop>
+    <tabstop>pagebreakAbove</tabstop>
+    <tabstop>pagebreakBelow</tabstop>
+    <tabstop>extraType</tabstop>
+    <tabstop>extraWidth</tabstop>
+    <tabstop>extraUnit</tabstop>
+    <tabstop>minipageStart</tabstop>
+    <tabstop>minipageHfill</tabstop>
+    <tabstop>minipageValign</tabstop>
+    <tabstop>cancelPB</tabstop>
+    <tabstop>okPB</tabstop>
+    <tabstop>applyPB</tabstop>
+    <tabstop>defaultsPB</tabstop>
+</tabstops>
+</UI>
diff --git a/src/frontends/qt2/paragraphdlgimpl.C b/src/frontends/qt2/paragraphdlgimpl.C
new file mode 100644 (file)
index 0000000..64f2aff
--- /dev/null
@@ -0,0 +1,469 @@
+/**
+ * \file paragraphdlgimpl.C
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#include "paragraphdlg.h"
+
+#include <config.h>
+#include <gettext.h>
+#include <string>
+
+#include "paragraphdlgimpl.h"
+#include "FormParagraph.h"
+#include "support/lstrings.h" 
+#include "debug.h"
+
+#include "qlineedit.h"
+#include "qcombobox.h"
+#include "qcheckbox.h"
+#include "qpushbutton.h"
+#include "qtabwidget.h"
+#include "qlabel.h"
+#include "qgroupbox.h"
+
+
+ParagraphDlgImpl::ParagraphDlgImpl(FormParagraph *form, QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : ParagraphDlg( parent, name, modal, fl ), form_(form)
+{
+  setCaption(name);
+}
+
+ParagraphDlgImpl::~ParagraphDlgImpl()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+void ParagraphDlgImpl::setReadOnly(bool readonly)
+{
+   TabsParagraph->setEnabled(!readonly);
+   okPB->setEnabled(!readonly);
+   applyPB->setEnabled(!readonly);
+   defaultsPB->setEnabled(!readonly);
+   cancelPB->setText(readonly ? _("&Close") : _("&Cancel"));
+}
+
+void ParagraphDlgImpl::setLabelWidth(const char *text)
+{
+   // FIXME: should be cleverer here
+   if (!strcmp(_("Senseless with this layout!"),text)) {
+      listOptions->setEnabled(false);
+      labelWidth->setText("");
+   } else {
+      listOptions->setEnabled(true);
+      labelWidth->setText(text);
+   }
+}
+
+void ParagraphDlgImpl::setAlign(int type)
+{
+   int item=0;
+   switch (type) {
+    case LYX_ALIGN_BLOCK : item=0; break;
+    case LYX_ALIGN_LEFT : item=1; break;
+    case LYX_ALIGN_RIGHT : item=2; break;
+    case LYX_ALIGN_CENTER : item=3; break;
+    default:
+      item=0;
+   }
+   alignment->setCurrentItem(item);
+}
+
+void ParagraphDlgImpl::setChecks(bool labove, bool lbelow, bool pabove, bool pbelow, bool noindent)
+{
+   lineAbove->setChecked(labove);
+   lineBelow->setChecked(lbelow);
+   pagebreakAbove->setChecked(pabove);
+   pagebreakBelow->setChecked(pbelow);
+   noIndent->setChecked(noindent);
+}
+
+void ParagraphDlgImpl::setSpace(VSpace::vspace_kind kindabove, VSpace::vspace_kind kindbelow, bool keepabove, bool keepbelow)
+{
+   int item=0;
+   
+   switch (kindabove) {
+      case VSpace::NONE: item = 0; break;
+      case VSpace::DEFSKIP: item = 1; break;
+      case VSpace::SMALLSKIP: item = 2; break;
+      case VSpace::MEDSKIP: item = 3; break;
+      case VSpace::BIGSKIP: item = 4; break;
+      case VSpace::VFILL: item = 5; break;
+      case VSpace::LENGTH: item = 6; break;
+   }
+   spacingAbove->setCurrentItem(item);
+   
+   switch (kindbelow) {
+      case VSpace::NONE: item = 0; break;
+      case VSpace::DEFSKIP: item = 1; break;
+      case VSpace::SMALLSKIP: item = 2; break;
+      case VSpace::MEDSKIP: item = 3; break;
+      case VSpace::BIGSKIP: item = 4; break;
+      case VSpace::VFILL: item = 5; break;
+      case VSpace::LENGTH: item = 6; break;
+   }
+   spacingBelow->setCurrentItem(item);
+   
+   spacingAboveValue->setEnabled(kindabove == VSpace::LENGTH);
+   spacingAbovePlus->setEnabled(kindabove == VSpace::LENGTH);
+   spacingAboveMinus->setEnabled(kindabove == VSpace::LENGTH);
+   spacingBelowValue->setEnabled(kindbelow == VSpace::LENGTH);
+   spacingBelowPlus->setEnabled(kindbelow == VSpace::LENGTH);
+   spacingBelowMinus->setEnabled(kindbelow == VSpace::LENGTH);
+   
+   spacingAboveKeep->setChecked(keepabove);
+   spacingBelowKeep->setChecked(keepbelow);
+}
+
+void ParagraphDlgImpl::setAboveLength(float val, float plus, float minus, 
+       LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit)
+{
+   if (vunit==LyXLength::UNIT_NONE) {
+      spacingAboveValue->setText("");
+      spacingAbovePlus->setText("");
+      spacingAboveMinus->setText("");
+   } else {
+      spacingAboveValue->setText(tostr(val).c_str());
+      spacingAbovePlus->setText(tostr(plus).c_str());
+      spacingAboveMinus->setText(tostr(minus).c_str());
+   }
+   
+   spacingAboveValueUnit->setCurrentItem(getItem(vunit));
+   spacingAbovePlusUnit->setCurrentItem(getItem(punit));
+   spacingAboveMinusUnit->setCurrentItem(getItem(munit));
+
+}
+
+void ParagraphDlgImpl::setBelowLength(float val, float plus, float minus, 
+       LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit)
+{
+   if (vunit==LyXLength::UNIT_NONE) {
+      spacingBelowValue->setText("");
+      spacingBelowPlus->setText("");
+      spacingBelowMinus->setText("");
+   } else {
+      spacingBelowValue->setText(tostr(val).c_str());
+      spacingBelowPlus->setText(tostr(plus).c_str());
+      spacingBelowMinus->setText(tostr(minus).c_str());
+   }
+   
+   spacingBelowValueUnit->setCurrentItem(getItem(vunit));
+   spacingBelowPlusUnit->setCurrentItem(getItem(punit));
+   spacingBelowMinusUnit->setCurrentItem(getItem(munit));
+}
+
+void ParagraphDlgImpl::setExtra(float widthval, LyXLength::UNIT units, const string percent, int align, 
+       bool hfill, bool startminipage, LyXParagraph::PEXTRA_TYPE type)
+{
+   if (type!=LyXParagraph::PEXTRA_NONE) {
+      lyxerr[Debug::GUI] << "percent : $" << percent << "$ widthval " << widthval << " unit " << long(units) << endl;
+      if (percent != "") {
+        extraWidth->setText(percent.c_str());
+        extraUnit->setCurrentItem(11);
+      } else {
+        extraWidth->setText(tostr(widthval).c_str());
+        extraUnit->setCurrentItem(getItem(units));
+      }
+   } else
+     extraWidth->setText("");
+   
+   switch (type) {
+      case LyXParagraph::PEXTRA_NONE: 
+      extraType->setCurrentItem(0); 
+      break;
+      case LyXParagraph::PEXTRA_MINIPAGE: 
+      extraType->setCurrentItem(1); 
+      enable_extraOptions(1); 
+      enable_minipageOptions(1); 
+      break;
+      case LyXParagraph::PEXTRA_FLOATFLT: 
+      extraType->setCurrentItem(2); 
+      enable_extraOptions(2); 
+      break;
+      case LyXParagraph::PEXTRA_INDENT: 
+      extraType->setCurrentItem(3); 
+      enable_extraOptions(3); 
+      break;
+   }
+   
+   switch (align) {
+      case LyXParagraph::MINIPAGE_ALIGN_TOP: 
+      minipageValign->setCurrentItem(0); 
+      break;
+      case LyXParagraph::MINIPAGE_ALIGN_MIDDLE:        
+      minipageValign->setCurrentItem(1); 
+      break;
+      case LyXParagraph::MINIPAGE_ALIGN_BOTTOM:        
+      minipageValign->setCurrentItem(2); 
+      break;
+   }
+   
+   minipageHfill->setChecked(hfill);
+   minipageStart->setChecked(startminipage);
+   
+}
+
+LyXGlueLength ParagraphDlgImpl::getAboveLength() const
+{
+   LyXGlueLength len(
+                    spacingAboveValue->text().toFloat(),
+                    getLyXLength( spacingAboveValueUnit->currentItem() ),
+                    spacingAbovePlus->text().toFloat(),
+                    getLyXLength( spacingAbovePlusUnit->currentItem() ),
+                    spacingAboveMinus->text().toFloat(),
+                    getLyXLength( spacingAboveMinusUnit->currentItem() )
+                    );
+   return len;
+}
+
+LyXGlueLength ParagraphDlgImpl::getBelowLength() const
+{
+   LyXGlueLength len(
+                    spacingBelowValue->text().toFloat(),
+                    getLyXLength( spacingBelowValueUnit->currentItem() ),
+                    spacingBelowPlus->text().toFloat(),
+                    getLyXLength( spacingBelowPlusUnit->currentItem() ),
+                    spacingBelowMinus->text().toFloat(),
+                    getLyXLength( spacingBelowMinusUnit->currentItem() )
+               );
+   return len;
+}
+
+LyXLength ParagraphDlgImpl::getExtraWidth() const
+{
+   if (extraUnit->currentItem()!=11) {
+      LyXLength len( 
+                   (extraWidth->text()).toDouble(), 
+                   getLyXLength(extraUnit->currentItem())
+                   );
+      return len;
+   } else {
+      LyXLength len(0.0, LyXLength::UNIT_NONE);
+      return len;
+   }
+}
+
+string ParagraphDlgImpl::getExtraWidthPercent() const
+{
+   double val = (extraWidth->text()).toDouble();
+   if (val > 100.0)
+     val = 100.0;
+   if (val < 0.0)
+     val = 0.0;
+   return tostr(val);
+}
+
+
+const char* ParagraphDlgImpl::getLabelWidth() const { 
+   return labelWidth->text(); 
+}
+   
+LyXAlignment ParagraphDlgImpl::getAlign() const {
+   switch (alignment->currentItem()) {
+      case 0: return LYX_ALIGN_BLOCK;
+      case 1: return LYX_ALIGN_LEFT;
+      case 2: return LYX_ALIGN_RIGHT;
+      case 3: return LYX_ALIGN_CENTER;
+      default: return LYX_ALIGN_CENTER;
+   }
+}
+   
+   
+bool ParagraphDlgImpl::getAboveKeep() const { 
+   return spacingAboveKeep->isChecked(); 
+}
+   
+bool ParagraphDlgImpl::getBelowKeep() const { 
+   return spacingBelowKeep->isChecked(); 
+}
+   
+bool ParagraphDlgImpl::getLineAbove() const { 
+   return lineAbove->isChecked(); 
+}
+   
+bool ParagraphDlgImpl::getLineBelow() const { 
+   return lineBelow->isChecked(); 
+}
+   
+bool ParagraphDlgImpl::getPagebreakAbove() const { 
+   return pagebreakAbove->isChecked(); 
+}
+   
+bool ParagraphDlgImpl::getPagebreakBelow() const { 
+   return pagebreakBelow->isChecked(); 
+}
+   
+bool ParagraphDlgImpl::getNoIndent() const { 
+   return noIndent->isChecked(); 
+}
+   
+VSpace::vspace_kind ParagraphDlgImpl::getSpaceAboveKind() const {
+   return getSpaceKind(spacingAbove->currentItem());
+}
+   
+VSpace::vspace_kind ParagraphDlgImpl::getSpaceBelowKind() const {
+   return getSpaceKind(spacingBelow->currentItem());
+}
+   
+LyXParagraph::PEXTRA_TYPE ParagraphDlgImpl::getExtraType() const {
+   switch (extraType->currentItem()) {
+      case 0: return LyXParagraph::PEXTRA_NONE;
+      case 1: return LyXParagraph::PEXTRA_MINIPAGE;
+      case 2: return LyXParagraph::PEXTRA_FLOATFLT;
+      case 3: return LyXParagraph::PEXTRA_INDENT;
+   }
+   return LyXParagraph::PEXTRA_NONE;
+}
+   
+LyXParagraph::MINIPAGE_ALIGNMENT ParagraphDlgImpl::getExtraAlign() const {
+   switch (minipageValign->currentItem()) {
+      case 0: return LyXParagraph::MINIPAGE_ALIGN_TOP;
+      case 1: return LyXParagraph::MINIPAGE_ALIGN_MIDDLE;
+      case 2: return LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
+      default: return LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
+   }
+}
+   
+bool ParagraphDlgImpl::getHfillBetween() const {
+   return minipageHfill->isChecked();
+}
+
+bool ParagraphDlgImpl::getStartNewMinipage() const {
+   return minipageStart->isChecked();
+}
+
+VSpace::vspace_kind ParagraphDlgImpl::getSpaceKind(int val) const {
+   switch (val) {
+      case 0: return VSpace::NONE;
+      case 1: return VSpace::DEFSKIP;
+      case 2: return VSpace::SMALLSKIP;
+      case 3: return VSpace::MEDSKIP;
+      case 4: return VSpace::BIGSKIP;
+      case 5: return VSpace::VFILL;
+      case 6: return VSpace::LENGTH;
+      default:
+      lyxerr[Debug::GUI] << "Unknown kind combo entry " << val << std::endl;
+      }
+   return VSpace::NONE;
+}
+
+LyXLength::UNIT ParagraphDlgImpl::getLyXLength(int val) const {
+   switch (val) {
+    case 0: return LyXLength::CM;
+    case 1: return LyXLength::IN;
+    case 2: return LyXLength::PT;
+    case 3: return LyXLength::MM;
+    case 4: return LyXLength::PC;
+    case 5: return LyXLength::EX;
+    case 6: return LyXLength::EM;
+    case 7: return LyXLength::SP;
+    case 8: return LyXLength::BP;
+    case 9: return LyXLength::DD;
+    case 10: return LyXLength::CC;
+    default:
+      lyxerr[Debug::GUI] << "Unknown kind combo entry " << val << std::endl;
+   }
+   return LyXLength::UNIT_NONE;
+}
+   
+int ParagraphDlgImpl::getItem(LyXLength::UNIT unit) const {
+   int item=0;
+   switch (unit) {
+      case LyXLength::CM: item = 0; break;
+      case LyXLength::IN: item = 1; break;
+      case LyXLength::PT: item = 2; break;
+      case LyXLength::MM: item = 3; break;
+      case LyXLength::PC: item = 4; break;
+      case LyXLength::EX: item = 5; break;
+      case LyXLength::EM: item = 6; break;
+      case LyXLength::SP: item = 7; break;
+      case LyXLength::BP: item = 8; break;
+      case LyXLength::DD: item = 9; break;
+      case LyXLength::CC: item = 10; break;
+      case LyXLength::MU: item = 0; break;
+      case LyXLength::UNIT_NONE: item = 0; break;
+      default:
+      lyxerr[Debug::GUI] << "Unknown unit " << long(unit) << endl;
+   }
+   return item;
+}
+
+void ParagraphDlgImpl::enable_extraOptions(int item)
+{
+   bool enable = (item==0);
+   extraWidth->setEnabled(enable);
+   extraWidthL->setEnabled(enable);
+   extraUnit->setEnabled(enable);
+   extraUnitL->setEnabled(enable);
+}
+
+void ParagraphDlgImpl::enable_minipageOptions(int item)
+{
+   minipageOptions->setEnabled( item==1 );
+}
+
+void ParagraphDlgImpl::enable_spacingAbove(int item)
+{
+   bool enable = (item==6);
+   spacingAboveValue->setEnabled(enable);
+   spacingAbovePlus->setEnabled(enable);
+   spacingAboveMinus->setEnabled(enable);
+   spacingAboveValueUnit->setEnabled(enable);
+   spacingAbovePlusUnit->setEnabled(enable);
+   spacingAboveMinusUnit->setEnabled(enable);
+   spacingAboveUnitsL->setEnabled(enable);
+   bool enablel = ( (item==6) || (item!=6 && spacingBelow->currentItem()==6) );
+   spacingValueL->setEnabled(enablel);
+   spacingPlusL->setEnabled(enablel);
+   spacingMinusL->setEnabled(enablel);
+}
+
+void ParagraphDlgImpl::enable_spacingBelow(int item)
+{
+   bool enable = (item==6);
+   spacingBelowValue->setEnabled(enable);
+   spacingBelowPlus->setEnabled(enable);
+   spacingBelowMinus->setEnabled(enable);
+   spacingBelowValueUnit->setEnabled(enable);
+   spacingBelowPlusUnit->setEnabled(enable);
+   spacingBelowMinusUnit->setEnabled(enable);
+   spacingBelowUnitsL->setEnabled(enable);
+   bool enablel = ( (item==6) || (item!=6 && spacingAbove->currentItem()==6) );
+   spacingValueL->setEnabled(enablel);
+   spacingPlusL->setEnabled(enablel);
+   spacingMinusL->setEnabled(enablel);
+}
+
+void ParagraphDlgImpl::closeEvent(QCloseEvent * e)
+{
+   form_->close();
+   e->accept();
+}
+
+void ParagraphDlgImpl::apply_adaptor()
+{
+   form_->apply();
+}
+
+void ParagraphDlgImpl::cancel_adaptor()  
+{
+   form_->close();
+   hide();
+}
+
+void ParagraphDlgImpl::ok_adaptor()
+{
+   apply_adaptor();
+   form_->close();
+   hide();
+}
+
+void ParagraphDlgImpl::restore_adaptor()
+{
+   form_->update();
+}
+
diff --git a/src/frontends/qt2/paragraphdlgimpl.h b/src/frontends/qt2/paragraphdlgimpl.h
new file mode 100644 (file)
index 0000000..ab40e68
--- /dev/null
@@ -0,0 +1,84 @@
+/**
+ * \file paragraphdlgimpl.h
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#ifndef PARAGRAPHDLGIMPL_H
+#define PARAGRAPHDLGIMPL_H
+
+#include "paragraphdlg.h"
+#include "vspace.h"
+#include "lyxparagraph.h"
+
+
+class FormParagraph;
+
+class ParagraphDlgImpl : public ParagraphDlg
+{
+   Q_OBJECT
+     
+ public:
+   
+    ParagraphDlgImpl(FormParagraph *form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~ParagraphDlgImpl();
+   
+   void setReadOnly(bool);
+   void setLabelWidth(const char *);
+   void setAlign(int);
+   void setChecks(bool, bool, bool, bool, bool);
+   void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
+   void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
+   void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
+   void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, LyXParagraph::PEXTRA_TYPE);
+   LyXGlueLength getAboveLength() const;
+   LyXGlueLength getBelowLength() const;
+   LyXLength getExtraWidth() const;
+   string getExtraWidthPercent() const;
+   const char * getLabelWidth() const;
+   LyXAlignment getAlign() const;
+   bool getAboveKeep() const;
+   bool getBelowKeep() const;
+   bool getLineAbove() const;
+   bool getLineBelow() const;
+   bool getPagebreakAbove() const;
+   bool getPagebreakBelow() const;
+   bool getNoIndent() const;
+   VSpace::vspace_kind getSpaceAboveKind() const;
+   VSpace::vspace_kind getSpaceBelowKind() const;
+   LyXParagraph::PEXTRA_TYPE getExtraType() const;
+   LyXParagraph::MINIPAGE_ALIGNMENT getExtraAlign() const;
+   bool getHfillBetween() const;
+   bool getStartNewMinipage() const;
+   
+   
+ protected:
+   
+   void closeEvent (QCloseEvent * e);
+   
+   
+ private:
+   
+   FormParagraph * form_;
+   VSpace::vspace_kind getSpaceKind(int val) const;
+   LyXLength::UNIT getLyXLength(int val) const;
+   int getItem(LyXLength::UNIT unit) const;
+   
+   
+ protected slots:
+   
+    void apply_adaptor();
+    void cancel_adaptor();
+    void enable_extraOptions(int);
+    void enable_minipageOptions(int);
+    void enable_spacingAbove(int);
+    void enable_spacingBelow(int);
+    void ok_adaptor();
+    void restore_adaptor();
+
+};
+
+#endif // PARAGRAPHDLGIMPL_H
diff --git a/src/frontends/qt2/printdlg.C b/src/frontends/qt2/printdlg.C
new file mode 100644 (file)
index 0000000..83f34ea
--- /dev/null
@@ -0,0 +1,223 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'printdlg.ui'
+**
+** Created: Sun Feb 4 23:02:20 2001
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "printdlg.h"
+
+#include <qbuttongroup.h>
+#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qvariant.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a PrintDlg 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.
+ */
+PrintDlg::PrintDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name )
+       setName( "PrintDlg" );
+    resize( 363, 342 ); 
+    setCaption( tr( "Form1" ) );
+    PrintDlgLayout = new QVBoxLayout( this ); 
+    PrintDlgLayout->setSpacing( 6 );
+    PrintDlgLayout->setMargin( 11 );
+
+    ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
+    ButtonGroup1->setTitle( tr( "Print Destination" ) );
+    ButtonGroup1->setColumnLayout(0, Qt::Vertical );
+    ButtonGroup1->layout()->setSpacing( 0 );
+    ButtonGroup1->layout()->setMargin( 0 );
+    ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
+    ButtonGroup1Layout->setAlignment( Qt::AlignTop );
+    ButtonGroup1Layout->setSpacing( 3 );
+    ButtonGroup1Layout->setMargin( 11 );
+
+    toPrinter = new QRadioButton( ButtonGroup1, "toPrinter" );
+    toPrinter->setText( tr( "&Printer" ) );
+    toPrinter->setChecked( TRUE );
+
+    ButtonGroup1Layout->addWidget( toPrinter, 0, 0 );
+
+    toFile = new QRadioButton( ButtonGroup1, "toFile" );
+    toFile->setText( tr( "&File" ) );
+
+    ButtonGroup1Layout->addWidget( toFile, 1, 0 );
+
+    printerName = new QLineEdit( ButtonGroup1, "printerName" );
+
+    ButtonGroup1Layout->addWidget( printerName, 0, 1 );
+
+    fileName = new QLineEdit( ButtonGroup1, "fileName" );
+    fileName->setEnabled( FALSE );
+
+    ButtonGroup1Layout->addWidget( fileName, 1, 1 );
+
+    browsePB = new QPushButton( ButtonGroup1, "browsePB" );
+    browsePB->setText( tr( "&Browse..." ) );
+    browsePB->setEnabled( FALSE );
+
+    ButtonGroup1Layout->addWidget( browsePB, 1, 2 );
+    PrintDlgLayout->addWidget( ButtonGroup1 );
+
+    ButtonGroup3 = new QButtonGroup( this, "ButtonGroup3" );
+    ButtonGroup3->setTitle( tr( "Pages" ) );
+    ButtonGroup3->setColumnLayout(0, Qt::Vertical );
+    ButtonGroup3->layout()->setSpacing( 0 );
+    ButtonGroup3->layout()->setMargin( 0 );
+    ButtonGroup3Layout = new QGridLayout( ButtonGroup3->layout() );
+    ButtonGroup3Layout->setAlignment( Qt::AlignTop );
+    ButtonGroup3Layout->setSpacing( 3 );
+    ButtonGroup3Layout->setMargin( 11 );
+
+    allPages = new QRadioButton( ButtonGroup3, "allPages" );
+    allPages->setText( tr( "All" ) );
+    allPages->setChecked( TRUE );
+
+    ButtonGroup3Layout->addWidget( allPages, 0, 0 );
+
+    oddPages = new QRadioButton( ButtonGroup3, "oddPages" );
+    oddPages->setText( tr( "Odd" ) );
+
+    ButtonGroup3Layout->addWidget( oddPages, 1, 0 );
+
+    evenPages = new QRadioButton( ButtonGroup3, "evenPages" );
+    evenPages->setText( tr( "Even" ) );
+
+    ButtonGroup3Layout->addWidget( evenPages, 2, 0 );
+
+    fromPageL = new QLabel( ButtonGroup3, "fromPageL" );
+    fromPageL->setText( tr( "Starting range:" ) );
+    fromPageL->setEnabled( FALSE );
+
+    ButtonGroup3Layout->addWidget( fromPageL, 3, 1 );
+
+    toPageL = new QLabel( ButtonGroup3, "toPageL" );
+    toPageL->setText( tr( "Last page:" ) );
+    toPageL->setEnabled( FALSE );
+
+    ButtonGroup3Layout->addWidget( toPageL, 3, 2 );
+
+    toPage = new QLineEdit( ButtonGroup3, "toPage" );
+    toPage->setEnabled( FALSE );
+
+    ButtonGroup3Layout->addWidget( toPage, 4, 2 );
+
+    reverse = new QCheckBox( ButtonGroup3, "reverse" );
+    reverse->setText( tr( "&Reverse order" ) );
+
+    ButtonGroup3Layout->addWidget( reverse, 0, 2 );
+
+    fromPage = new QLineEdit( ButtonGroup3, "fromPage" );
+    fromPage->setEnabled( FALSE );
+
+    ButtonGroup3Layout->addWidget( fromPage, 4, 1 );
+
+    customPages = new QRadioButton( ButtonGroup3, "customPages" );
+    customPages->setText( tr( "Pages:" ) );
+
+    ButtonGroup3Layout->addWidget( customPages, 4, 0 );
+    PrintDlgLayout->addWidget( ButtonGroup3 );
+
+    GroupBox3 = new QGroupBox( this, "GroupBox3" );
+    GroupBox3->setTitle( tr( "Copies" ) );
+    GroupBox3->setColumnLayout(0, Qt::Vertical );
+    GroupBox3->layout()->setSpacing( 0 );
+    GroupBox3->layout()->setMargin( 0 );
+    GroupBox3Layout = new QHBoxLayout( GroupBox3->layout() );
+    GroupBox3Layout->setAlignment( Qt::AlignTop );
+    GroupBox3Layout->setSpacing( 6 );
+    GroupBox3Layout->setMargin( 11 );
+
+    copies = new QSpinBox( GroupBox3, "copies" );
+    copies->setMinValue( 1 );
+    copies->setValue( 1 );
+    GroupBox3Layout->addWidget( copies );
+
+    collate = new QCheckBox( GroupBox3, "collate" );
+    collate->setText( tr( "Co&llate" ) );
+    collate->setEnabled( FALSE );
+    GroupBox3Layout->addWidget( collate );
+    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    GroupBox3Layout->addItem( spacer );
+    PrintDlgLayout->addWidget( GroupBox3 );
+
+    Layout1 = new QHBoxLayout; 
+    Layout1->setSpacing( 6 );
+    Layout1->setMargin( 0 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout1->addItem( spacer_2 );
+
+    printPB = new QPushButton( this, "printPB" );
+    printPB->setText( tr( "&Print" ) );
+    Layout1->addWidget( printPB );
+
+    cancelPB = new QPushButton( this, "cancelPB" );
+    cancelPB->setText( tr( "&Cancel" ) );
+    cancelPB->setDefault( TRUE );
+    Layout1->addWidget( cancelPB );
+    PrintDlgLayout->addLayout( Layout1 );
+
+    // signals and slots connections
+    connect( toFile, SIGNAL( toggled(bool) ), browsePB, SLOT( setEnabled(bool) ) );
+    connect( toFile, SIGNAL( toggled(bool) ), fileName, SLOT( setEnabled(bool) ) );
+    connect( toFile, SIGNAL( toggled(bool) ), printerName, SLOT( setDisabled(bool) ) );
+    connect( printPB, SIGNAL( clicked() ), this, SLOT( print() ) );
+    connect( cancelPB, SIGNAL( clicked() ), this, SLOT( cancel_adaptor() ) );
+    connect( copies, SIGNAL( valueChanged(int) ), this, SLOT( set_collate(int) ) );
+    connect( browsePB, SIGNAL( clicked() ), this, SLOT( browse_file() ) );
+    connect( customPages, SIGNAL( toggled(bool) ), fromPage, SLOT( setEnabled(bool) ) );
+    connect( customPages, SIGNAL( toggled(bool) ), fromPageL, SLOT( setEnabled(bool) ) );
+    connect( customPages, SIGNAL( toggled(bool) ), toPage, SLOT( setEnabled(bool) ) );
+    connect( customPages, SIGNAL( toggled(bool) ), toPageL, SLOT( setEnabled(bool) ) );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+PrintDlg::~PrintDlg()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+void PrintDlg::cancel_adaptor()
+{
+    qWarning( "PrintDlg::cancel_adaptor(): Not implemented yet!" );
+}
+
+void PrintDlg::enable_pagerange(int)
+{
+    qWarning( "PrintDlg::enable_pagerange(int): Not implemented yet!" );
+}
+
+void PrintDlg::browse_file()
+{
+    qWarning( "PrintDlg::browse_file(): Not implemented yet!" );
+}
+
+void PrintDlg::print()
+{
+    qWarning( "PrintDlg::print(): Not implemented yet!" );
+}
+
+void PrintDlg::set_collate(int)
+{
+    qWarning( "PrintDlg::set_collate(int): Not implemented yet!" );
+}
+
diff --git a/src/frontends/qt2/printdlg.h b/src/frontends/qt2/printdlg.h
new file mode 100644 (file)
index 0000000..d31d4e7
--- /dev/null
@@ -0,0 +1,71 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'printdlg.ui'
+**
+** Created: Sun Feb 4 23:02:16 2001
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef PRINTDLG_H
+#define PRINTDLG_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QButtonGroup;
+class QCheckBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QRadioButton;
+class QSpinBox;
+
+class PrintDlg : public QDialog
+{ 
+    Q_OBJECT
+
+public:
+    PrintDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~PrintDlg();
+
+    QButtonGroup* ButtonGroup1;
+    QRadioButton* toPrinter;
+    QRadioButton* toFile;
+    QLineEdit* printerName;
+    QLineEdit* fileName;
+    QPushButton* browsePB;
+    QButtonGroup* ButtonGroup3;
+    QRadioButton* allPages;
+    QRadioButton* oddPages;
+    QRadioButton* evenPages;
+    QLabel* fromPageL;
+    QLabel* toPageL;
+    QLineEdit* toPage;
+    QCheckBox* reverse;
+    QLineEdit* fromPage;
+    QRadioButton* customPages;
+    QGroupBox* GroupBox3;
+    QSpinBox* copies;
+    QCheckBox* collate;
+    QPushButton* printPB;
+    QPushButton* cancelPB;
+
+protected slots:
+    virtual void cancel_adaptor();
+    virtual void enable_pagerange(int);
+    virtual void browse_file();
+    virtual void print();
+    virtual void set_collate(int);
+
+protected:
+    QVBoxLayout* PrintDlgLayout;
+    QGridLayout* ButtonGroup1Layout;
+    QGridLayout* ButtonGroup3Layout;
+    QHBoxLayout* GroupBox3Layout;
+    QHBoxLayout* Layout1;
+};
+
+#endif // PRINTDLG_H
diff --git a/src/frontends/qt2/printdlg.ui b/src/frontends/qt2/printdlg.ui
new file mode 100644 (file)
index 0000000..b68743b
--- /dev/null
@@ -0,0 +1,460 @@
+<!DOCTYPE UI><UI>
+<class>PrintDlg</class>
+<widget>
+    <class>QDialog</class>
+    <property stdset="1">
+        <name>name</name>
+        <cstring>PrintDlg</cstring>
+    </property>
+    <property stdset="1">
+        <name>geometry</name>
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>363</width>
+            <height>342</height>
+        </rect>
+    </property>
+    <property stdset="1">
+        <name>caption</name>
+        <string>Form1</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>QButtonGroup</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>ButtonGroup1</cstring>
+            </property>
+            <property stdset="1">
+                <name>title</name>
+                <string>Print Destination</string>
+            </property>
+            <property>
+                <name>layoutSpacing</name>
+            </property>
+            <grid>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>11</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>3</number>
+                </property>
+                <widget row="0"  column="0" >
+                    <class>QRadioButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>toPrinter</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Printer</string>
+                    </property>
+                    <property stdset="1">
+                        <name>checked</name>
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <widget row="1"  column="0" >
+                    <class>QRadioButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>toFile</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;File</string>
+                    </property>
+                </widget>
+                <widget row="0"  column="1" >
+                    <class>QLineEdit</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>printerName</cstring>
+                    </property>
+                </widget>
+                <widget row="1"  column="1" >
+                    <class>QLineEdit</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>fileName</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <widget row="1"  column="2" >
+                    <class>QPushButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>browsePB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Browse...</string>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+        <widget>
+            <class>QButtonGroup</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>ButtonGroup3</cstring>
+            </property>
+            <property stdset="1">
+                <name>title</name>
+                <string>Pages</string>
+            </property>
+            <property>
+                <name>layoutSpacing</name>
+            </property>
+            <grid>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>11</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>3</number>
+                </property>
+                <widget row="0"  column="0" >
+                    <class>QRadioButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>allPages</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>All</string>
+                    </property>
+                    <property stdset="1">
+                        <name>checked</name>
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <widget row="1"  column="0" >
+                    <class>QRadioButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>oddPages</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Odd</string>
+                    </property>
+                </widget>
+                <widget row="2"  column="0" >
+                    <class>QRadioButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>evenPages</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Even</string>
+                    </property>
+                </widget>
+                <widget row="3"  column="1" >
+                    <class>QLabel</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>fromPageL</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Starting range:</string>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <widget row="3"  column="2" >
+                    <class>QLabel</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>toPageL</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Last page:</string>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <widget row="4"  column="2" >
+                    <class>QLineEdit</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>toPage</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <widget row="0"  column="2" >
+                    <class>QCheckBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>reverse</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Reverse order</string>
+                    </property>
+                </widget>
+                <widget row="4"  column="1" >
+                    <class>QLineEdit</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>fromPage</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <widget row="4"  column="0" >
+                    <class>QRadioButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>customPages</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Pages:</string>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+        <widget>
+            <class>QGroupBox</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>GroupBox3</cstring>
+            </property>
+            <property stdset="1">
+                <name>title</name>
+                <string>Copies</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>QSpinBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>copies</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>minValue</name>
+                        <number>1</number>
+                    </property>
+                    <property stdset="1">
+                        <name>value</name>
+                        <number>1</number>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QCheckBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>collate</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Co&amp;llate</string>
+                    </property>
+                    <property stdset="1">
+                        <name>enabled</name>
+                        <bool>false</bool>
+                    </property>
+                </widget>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer1_2</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>orientation</name>
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+            </hbox>
+        </widget>
+        <widget>
+            <class>QLayoutWidget</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>Layout1</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>Spacer1</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>printPB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Print</string>
+                    </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>
+                    <property stdset="1">
+                        <name>default</name>
+                        <bool>true</bool>
+                    </property>
+                </widget>
+            </hbox>
+        </widget>
+    </vbox>
+</widget>
+<connections>
+    <connection>
+        <sender>toFile</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>browsePB</receiver>
+        <slot>setEnabled(bool)</slot>
+    </connection>
+    <connection>
+        <sender>toFile</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>fileName</receiver>
+        <slot>setEnabled(bool)</slot>
+    </connection>
+    <connection>
+        <sender>toFile</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>printerName</receiver>
+        <slot>setDisabled(bool)</slot>
+    </connection>
+    <connection>
+        <sender>printPB</sender>
+        <signal>clicked()</signal>
+        <receiver>PrintDlg</receiver>
+        <slot>print()</slot>
+    </connection>
+    <connection>
+        <sender>cancelPB</sender>
+        <signal>clicked()</signal>
+        <receiver>PrintDlg</receiver>
+        <slot>cancel_adaptor()</slot>
+    </connection>
+    <connection>
+        <sender>copies</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>PrintDlg</receiver>
+        <slot>set_collate(int)</slot>
+    </connection>
+    <connection>
+        <sender>browsePB</sender>
+        <signal>clicked()</signal>
+        <receiver>PrintDlg</receiver>
+        <slot>browse_file()</slot>
+    </connection>
+    <connection>
+        <sender>customPages</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>fromPage</receiver>
+        <slot>setEnabled(bool)</slot>
+    </connection>
+    <connection>
+        <sender>customPages</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>fromPageL</receiver>
+        <slot>setEnabled(bool)</slot>
+    </connection>
+    <connection>
+        <sender>customPages</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>toPage</receiver>
+        <slot>setEnabled(bool)</slot>
+    </connection>
+    <connection>
+        <sender>customPages</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>toPageL</receiver>
+        <slot>setEnabled(bool)</slot>
+    </connection>
+    <slot access="protected">cancel_adaptor()</slot>
+    <slot access="protected">enable_pagerange(int)</slot>
+    <slot access="protected">browse_file()</slot>
+    <slot access="protected">print()</slot>
+    <slot access="protected">set_collate(int)</slot>
+</connections>
+</UI>
diff --git a/src/frontends/qt2/printdlgimpl.C b/src/frontends/qt2/printdlgimpl.C
new file mode 100644 (file)
index 0000000..7bbf09a
--- /dev/null
@@ -0,0 +1,161 @@
+/**
+ * \file printdlgimpl.C
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#include "qfiledialog.h"
+#include "qcheckbox.h"
+#include "qlabel.h"
+#include "qlineedit.h"
+#include "qpushbutton.h"
+#include "qradiobutton.h"
+#include "qspinbox.h"
+
+#include "printdlgimpl.h"
+#include "FormPrint.h"
+
+#include <config.h>
+
+#include "support/filetools.h"
+#include "support/lstrings.h"
+#include "lyxrc.h" 
+#include "PrinterParams.h"
+
+#include <gettext.h>
+#include <cstring>
+
+
+PrintDlgImpl::PrintDlgImpl( FormPrint *f, QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : PrintDlg( parent, name, modal, fl ), form_(f)
+{
+   setCaption(name);
+}
+
+PrintDlgImpl::~PrintDlgImpl()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+const char * PrintDlgImpl::getFrom() {
+   return fromPage->text();
+}
+
+const char * PrintDlgImpl::getTo() {
+   return toPage->text();
+}
+       
+PrinterParams::Target PrintDlgImpl::getTarget() {
+   if (toPrinter->isChecked())
+     return PrinterParams::PRINTER;
+   else
+     return PrinterParams::FILE;
+}
+
+       
+const char * PrintDlgImpl::getPrinter() {
+   return printerName->text();
+}
+
+const char * PrintDlgImpl::getFile() {
+   return fileName->text();
+}
+
+PrinterParams::WhichPages PrintDlgImpl::getWhichPages() {
+   if (oddPages->isChecked())
+     return PrinterParams::ODD;
+   else if (evenPages->isChecked())
+     return PrinterParams::EVEN;
+   else
+     return PrinterParams::ALL;
+}
+
+bool PrintDlgImpl::getReverse() {
+   return reverse->isChecked();
+}
+
+bool PrintDlgImpl::getSort() {
+   return collate->isChecked();
+}
+
+const char * PrintDlgImpl::getCount() {
+   return copies->text();
+}
+
+void PrintDlgImpl::setTarget(PrinterParams::Target t) {
+   toPrinter->setChecked(t==PrinterParams::PRINTER);
+   toFile->setChecked(t!=PrinterParams::PRINTER);
+}
+
+void PrintDlgImpl::setPrinter(const char * name) {
+   printerName->setText(name);
+}
+
+void PrintDlgImpl::setFile(const char * name) {
+   fileName->setText(name);
+}       
+
+void PrintDlgImpl::setWhichPages(PrinterParams::WhichPages wp) {
+   switch (wp) {
+      case PrinterParams::ALL:
+        allPages->setChecked(true);
+        break;
+      case PrinterParams::EVEN:
+        evenPages->setChecked(true);
+        break;
+      case PrinterParams::ODD:
+        oddPages->setChecked(true);
+        break;
+   }
+}
+
+void PrintDlgImpl::setReverse(bool on) {
+   reverse->setChecked(on);
+}
+
+void PrintDlgImpl::setSort(bool on) {
+   collate->setChecked(on);
+}
+
+void PrintDlgImpl::setCount(int num) {
+   copies->setValue(num);
+   collate->setEnabled(num > 1);
+}
+
+void PrintDlgImpl::setFrom(const char * text) {
+   fromPage->setText(text);
+}
+
+void PrintDlgImpl::setTo(const char * text) {
+   toPage->setText(text);
+}
+
+void PrintDlgImpl::browse_file()
+{
+   QString d( OnlyPath(tostr(fileName->text())).c_str() );
+   QString s( QFileDialog::getOpenFileName( d, "PostScript Files (*.ps)", this ) );
+   if (!s.isNull()) 
+     fileName->setText(s);
+}
+
+void PrintDlgImpl::print()
+{
+   form_->print();
+   form_->close();
+   hide();
+}
+
+void PrintDlgImpl::cancel_adaptor()
+{
+   form_->close();
+   hide();
+}
+
+void PrintDlgImpl::set_collate(int copies)
+{
+       collate->setEnabled(copies > 1);
+}
+
diff --git a/src/frontends/qt2/printdlgimpl.h b/src/frontends/qt2/printdlgimpl.h
new file mode 100644 (file)
index 0000000..1ab016d
--- /dev/null
@@ -0,0 +1,57 @@
+/**
+ * \file printdlgimpl.h
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#ifndef PRINTDLGIMPL_H
+#define PRINTDLGIMPL_H
+#include "printdlg.h"
+#include "lyxrc.h" 
+#include "PrinterParams.h"
+
+class FormPrint;
+
+class PrintDlgImpl : public PrintDlg
+{ 
+    Q_OBJECT
+
+ public:
+    PrintDlgImpl( FormPrint *f, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~PrintDlgImpl();
+   
+   const char *getFrom();
+   const char *getTo();
+   const char *getPrinter();
+   const char *getFile();
+   const char *getCount();
+   PrinterParams::Target getTarget();
+   PrinterParams::WhichPages getWhichPages();
+   bool getReverse();
+   bool getSort();
+   void setFrom(const char *);
+   void setTo(const char *);
+   void setPrinter(const char *);
+   void setFile(const char *);
+   void setCount(int);
+   void setTarget(PrinterParams::Target);
+   void setWhichPages(PrinterParams::WhichPages);
+   void setReverse(bool);
+   void setSort(bool);
+      
+
+ protected slots:
+    void cancel_adaptor();
+    void browse_file();
+    void print();
+    void set_collate(int);
+
+ private:
+       FormPrint * form_;
+
+};
+
+#endif // PRINTDLGIMPL_H
diff --git a/src/frontends/qt2/tabularcreatedlg.C b/src/frontends/qt2/tabularcreatedlg.C
new file mode 100644 (file)
index 0000000..0c4f864
--- /dev/null
@@ -0,0 +1,108 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'tabularcreatedlg.ui'
+**
+** Created: Tue Feb 6 01:41:28 2001
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "tabularcreatedlg.h"
+
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qspinbox.h>
+#include "emptytable.h"
+#include <qlayout.h>
+#include <qvariant.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a InsertTabularDlg 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.
+ */
+InsertTabularDlg::InsertTabularDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name )
+       setName( "InsertTabularDlg" );
+    resize( 245, 235 ); 
+    setSizeGripEnabled( TRUE );
+    setCaption( tr( "Form1" ) );
+    InsertTabularDlgLayout = new QVBoxLayout( this ); 
+    InsertTabularDlgLayout->setSpacing( 6 );
+    InsertTabularDlgLayout->setMargin( 11 );
+
+    Layout1 = new QHBoxLayout; 
+    Layout1->setSpacing( 6 );
+    Layout1->setMargin( 0 );
+
+    rowsL = new QLabel( this, "rowsL" );
+    rowsL->setText( tr( "Rows:" ) );
+    Layout1->addWidget( rowsL );
+
+    rows = new QSpinBox( this, "rows" );
+    rows->setMinValue( 1 );
+    rows->setMaxValue( 511 );
+    Layout1->addWidget( rows );
+
+    columnsL = new QLabel( this, "columnsL" );
+    columnsL->setText( tr( "Columns:" ) );
+    Layout1->addWidget( columnsL );
+
+    columns = new QSpinBox( this, "columns" );
+    columns->setMinValue( 1 );
+    columns->setMaxValue( 511 );
+    Layout1->addWidget( columns );
+    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout1->addItem( spacer );
+    InsertTabularDlgLayout->addLayout( Layout1 );
+
+    table = new EmptyTable( this, "table" );
+    InsertTabularDlgLayout->addWidget( table );
+
+    Layout2 = new QHBoxLayout; 
+    Layout2->setSpacing( 6 );
+    Layout2->setMargin( 0 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout2->addItem( spacer_2 );
+
+    insertPB = new QPushButton( this, "insertPB" );
+    insertPB->setText( tr( "&Insert" ) );
+    Layout2->addWidget( insertPB );
+
+    cancelPB = new QPushButton( this, "cancelPB" );
+    cancelPB->setText( tr( "&Cancel" ) );
+    Layout2->addWidget( cancelPB );
+    InsertTabularDlgLayout->addLayout( Layout2 );
+
+    // signals and slots connections
+    connect( table, SIGNAL( rowsChanged(int) ), rows, SLOT( setValue(int) ) );
+    connect( table, SIGNAL( colsChanged(int) ), columns, SLOT( setValue(int) ) );
+    connect( rows, SIGNAL( valueChanged(int) ), table, SLOT( setNumberRows(int) ) );
+    connect( columns, SIGNAL( valueChanged(int) ), table, SLOT( setNumberColumns(int) ) );
+    connect( insertPB, SIGNAL( clicked() ), this, SLOT( insert_tabular() ) );
+    connect( cancelPB, SIGNAL( clicked() ), this, SLOT( cancel_adaptor() ) );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+InsertTabularDlg::~InsertTabularDlg()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+void InsertTabularDlg::insert_tabular()
+{
+    qWarning( "InsertTabularDlg::insert_tabular(): Not implemented yet!" );
+}
+
+void InsertTabularDlg::cancel_adaptor()
+{
+    qWarning( "InsertTabularDlg::cancel_adaptor(): Not implemented yet!" );
+}
+
diff --git a/src/frontends/qt2/tabularcreatedlg.h b/src/frontends/qt2/tabularcreatedlg.h
new file mode 100644 (file)
index 0000000..b4046f5
--- /dev/null
@@ -0,0 +1,48 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'tabularcreatedlg.ui'
+**
+** Created: Tue Feb 6 01:41:06 2001
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef INSERTTABULARDLG_H
+#define INSERTTABULARDLG_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class EmptyTable;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+
+class InsertTabularDlg : public QDialog
+{ 
+    Q_OBJECT
+
+public:
+    InsertTabularDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~InsertTabularDlg();
+
+    QLabel* rowsL;
+    QSpinBox* rows;
+    QLabel* columnsL;
+    QSpinBox* columns;
+    EmptyTable* table;
+    QPushButton* insertPB;
+    QPushButton* cancelPB;
+
+protected slots:
+    virtual void insert_tabular();
+    virtual void cancel_adaptor();
+
+protected:
+    QVBoxLayout* InsertTabularDlgLayout;
+    QHBoxLayout* Layout1;
+    QHBoxLayout* Layout2;
+};
+
+#endif // INSERTTABULARDLG_H
diff --git a/src/frontends/qt2/tabularcreatedlg.ui b/src/frontends/qt2/tabularcreatedlg.ui
new file mode 100644 (file)
index 0000000..f9a02e4
--- /dev/null
@@ -0,0 +1,260 @@
+<!DOCTYPE UI><UI>
+<class>InsertTabularDlg</class>
+<widget>
+    <class>QDialog</class>
+    <property stdset="1">
+        <name>name</name>
+        <cstring>InsertTabularDlg</cstring>
+    </property>
+    <property stdset="1">
+        <name>geometry</name>
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>245</width>
+            <height>235</height>
+        </rect>
+    </property>
+    <property stdset="1">
+        <name>sizeGripEnabled</name>
+        <bool>true</bool>
+    </property>
+    <property stdset="1">
+        <name>caption</name>
+        <string>Form1</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>Layout1</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>rowsL</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Rows:</string>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QSpinBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>rows</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>minValue</name>
+                        <number>1</number>
+                    </property>
+                    <property stdset="1">
+                        <name>maxValue</name>
+                        <number>511</number>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QLabel</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>columnsL</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>Columns:</string>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QSpinBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>columns</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>minValue</name>
+                        <number>1</number>
+                    </property>
+                    <property stdset="1">
+                        <name>maxValue</name>
+                        <number>511</number>
+                    </property>
+                </widget>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer1</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>EmptyTable</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>table</cstring>
+            </property>
+        </widget>
+        <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>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer2</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>insertPB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Insert</string>
+                    </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>
+<customwidgets>
+    <customwidget>
+        <class>EmptyTable</class>
+        <header location="local">emptytable.h</header>
+        <sizehint>
+            <width>-1</width>
+            <height>-1</height>
+        </sizehint>
+        <container>0</container>
+        <sizepolicy>
+            <hordata>5</hordata>
+            <verdata>5</verdata>
+        </sizepolicy>
+        <pixmap>image0</pixmap>
+        <signal>colsChanged(int)</signal>
+        <signal>rowsChanged(int)</signal>
+        <slot access="public">setNumberColumns(int)</slot>
+        <slot access="public">setNumberRows(int)</slot>
+    </customwidget>
+</customwidgets>
+<images>
+    <image>
+        <name>image0</name>
+        <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+    </image>
+</images>
+<connections>
+    <connection>
+        <sender>table</sender>
+        <signal>rowsChanged(int)</signal>
+        <receiver>rows</receiver>
+        <slot>setValue(int)</slot>
+    </connection>
+    <connection>
+        <sender>table</sender>
+        <signal>colsChanged(int)</signal>
+        <receiver>columns</receiver>
+        <slot>setValue(int)</slot>
+    </connection>
+    <connection>
+        <sender>rows</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>table</receiver>
+        <slot>setNumberRows(int)</slot>
+    </connection>
+    <connection>
+        <sender>columns</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>table</receiver>
+        <slot>setNumberColumns(int)</slot>
+    </connection>
+    <connection>
+        <sender>insertPB</sender>
+        <signal>clicked()</signal>
+        <receiver>InsertTabularDlg</receiver>
+        <slot>insert_tabular()</slot>
+    </connection>
+    <connection>
+        <sender>cancelPB</sender>
+        <signal>clicked()</signal>
+        <receiver>InsertTabularDlg</receiver>
+        <slot>cancel_adaptor()</slot>
+    </connection>
+    <slot access="protected">insert_tabular()</slot>
+    <slot access="protected">cancel_adaptor()</slot>
+</connections>
+</UI>
diff --git a/src/frontends/qt2/tabularcreatedlgimpl.C b/src/frontends/qt2/tabularcreatedlgimpl.C
new file mode 100644 (file)
index 0000000..b3b9ec6
--- /dev/null
@@ -0,0 +1,66 @@
+/**
+ * \file tabularcreatedlgimpl.C
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#include "tabularcreatedlg.h"
+
+#include <config.h>
+#include <gettext.h>
+#include <string>
+
+#include "tabularcreatedlgimpl.h"
+#include "FormTabularCreate.h"
+#include "support/lstrings.h"
+
+#include "qpushbutton.h"
+#include "qspinbox.h"
+#include "emptytable.h"
+#include "qpainter.h"
+#include "qtableview.h"
+#include "qtooltip.h"
+
+TabularCreateDlgImpl::TabularCreateDlgImpl(FormTabularCreate* form, QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : InsertTabularDlg( parent, name, modal, fl ), form_(form)
+{
+   setCaption(name);
+   table->setMinimumSize(100,100);
+   rows->setValue(5);
+   columns->setValue(5);
+   QToolTip::add(table, _("Drag with left mouse button to resize"));
+}
+
+TabularCreateDlgImpl::~TabularCreateDlgImpl()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+void TabularCreateDlgImpl::insert_tabular()
+{
+   form_->apply((rows->text()).toInt(), (columns->text()).toInt());
+   form_->close();
+   hide();
+}
+
+void TabularCreateDlgImpl::cancel_adaptor()
+{
+   form_->close();
+   hide();
+}
+
+void TabularCreateDlgImpl::colsChanged(int nr_cols)
+{
+   if (nr_cols != (columns->text()).toInt())
+     columns->setValue(nr_cols);
+}
+
+void TabularCreateDlgImpl::rowsChanged(int nr_rows)
+{
+   if (nr_rows != (rows->text()).toInt()) 
+     rows->setValue(nr_rows);
+}
+
diff --git a/src/frontends/qt2/tabularcreatedlgimpl.h b/src/frontends/qt2/tabularcreatedlgimpl.h
new file mode 100644 (file)
index 0000000..3287622
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * \file tabularcreatedlgimpl.h
+ * Copyright 2001 LyX Team
+ * see the file COPYING
+ *
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#ifndef TABULARCREATEDLGIMPL_H
+#define TABULARCREATEDLGIMPL_H
+#include "tabularcreatedlg.h"
+
+class FormTabularCreate;
+
+class TabularCreateDlgImpl : public InsertTabularDlg
+{ 
+    Q_OBJECT
+
+public:
+    TabularCreateDlgImpl(FormTabularCreate *form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~TabularCreateDlgImpl();
+
+protected slots:
+   void insert_tabular();
+   void cancel_adaptor();
+   virtual void colsChanged(int);
+   virtual void rowsChanged(int);
+   
+private:
+   FormTabularCreate * form_;
+};
+
+#endif // TABULARCREATEDLGIMPL_H