2 * \file QParagraphDialog.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
15 #include "QParagraphDialog.h"
16 #include "QParagraph.h"
18 #include <qlineedit.h>
19 #include <qcombobox.h>
20 #include <qpushbutton.h>
21 #include <qvalidator.h>
23 #include "helper_funcs.h"
28 QParagraphDialog::QParagraphDialog(QParagraph * form)
29 : QParagraphDialogBase(0, 0, false, 0),
32 connect(okPB, SIGNAL(clicked()),
33 form_, SLOT(slotOK()));
34 connect(applyPB, SIGNAL(clicked()),
35 form_, SLOT(slotApply()));
36 connect(closePB, SIGNAL(clicked()),
37 form_, SLOT(slotClose()));
40 linespacingValue->setValidator(new QDoubleValidator(linespacingValue));
41 // disabled to allow glue spacing for latexperts
42 //valueAbove->setValidator(new QDoubleValidator(valueAbove));
43 //valueBelow->setValidator(new QDoubleValidator(valueBelow));
47 void QParagraphDialog::closeEvent(QCloseEvent * e)
54 void QParagraphDialog::change_adaptor()
60 void QParagraphDialog::enableAbove(int)
62 bool const enable = spacingAbove->currentItem()==6;
63 valueAbove->setEnabled(enable);
64 unitAbove->setEnabled(enable);
69 void QParagraphDialog::enableBelow(int)
71 bool const enable = spacingBelow->currentItem()==6;
72 valueBelow->setEnabled(enable);
73 unitBelow->setEnabled(enable);
77 void QParagraphDialog::enableLinespacingValue(int)
79 bool const enable = linespacing->currentItem()==4;
80 linespacingValue->setEnabled(enable);