2 * \file QParagraphDialog.C
3 * Copyright 2001 LyX Team
6 * \author John Levon, moz@compsoc.man.ac.uk
7 * \author Edwin Leuven, leuven@fee.uva.nl
10 #include "QParagraphDialog.h"
12 #include <qlineedit.h>
13 #include <qcombobox.h>
14 #include <qpushbutton.h>
15 #include <qvalidator.h>
17 #include "helper_funcs.h"
21 QParagraphDialog::QParagraphDialog(QParagraph * form)
22 : QParagraphDialogBase(0, 0, false, 0),
25 connect(okPB, SIGNAL(clicked()),
26 form_, SLOT(slotOK()));
27 connect(applyPB, SIGNAL(clicked()),
28 form_, SLOT(slotApply()));
29 connect(closePB, SIGNAL(clicked()),
30 form_, SLOT(slotClose()));
33 linespacingValue->setValidator(new QDoubleValidator(linespacingValue));
34 // disabled to allow glue spacing for latexperts
35 //valueAbove->setValidator(new QDoubleValidator(valueAbove));
36 //valueBelow->setValidator(new QDoubleValidator(valueBelow));
39 void QParagraphDialog::closeEvent(QCloseEvent * e)
46 void QParagraphDialog::change_adaptor()
51 void QParagraphDialog::enableAbove(int)
53 bool const enable = spacingAbove->currentItem()==6;
54 valueAbove->setEnabled(enable);
55 unitAbove->setEnabled(enable);
59 void QParagraphDialog::enableBelow(int)
61 bool const enable = spacingBelow->currentItem()==6;
62 valueBelow->setEnabled(enable);
63 unitBelow->setEnabled(enable);
66 void QParagraphDialog::enableLinespacingValue(int)
68 bool const enable = linespacing->currentItem()==4;
69 linespacingValue->setEnabled(enable);