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 #pragma implementation
18 #include "QParagraphDialog.h"
19 #include "QParagraph.h"
21 #include <qlineedit.h>
22 #include <qcombobox.h>
23 #include <qpushbutton.h>
24 #include <qvalidator.h>
26 #include "helper_funcs.h"
30 QParagraphDialog::QParagraphDialog(QParagraph * form)
31 : QParagraphDialogBase(0, 0, false, 0),
34 connect(okPB, SIGNAL(clicked()),
35 form_, SLOT(slotOK()));
36 connect(applyPB, SIGNAL(clicked()),
37 form_, SLOT(slotApply()));
38 connect(closePB, SIGNAL(clicked()),
39 form_, SLOT(slotClose()));
42 linespacingValue->setValidator(new QDoubleValidator(linespacingValue));
43 // disabled to allow glue spacing for latexperts
44 //valueAbove->setValidator(new QDoubleValidator(valueAbove));
45 //valueBelow->setValidator(new QDoubleValidator(valueBelow));
48 void QParagraphDialog::closeEvent(QCloseEvent * e)
55 void QParagraphDialog::change_adaptor()
60 void QParagraphDialog::enableAbove(int)
62 bool const enable = spacingAbove->currentItem()==6;
63 valueAbove->setEnabled(enable);
64 unitAbove->setEnabled(enable);
68 void QParagraphDialog::enableBelow(int)
70 bool const enable = spacingBelow->currentItem()==6;
71 valueBelow->setEnabled(enable);
72 unitBelow->setEnabled(enable);
75 void QParagraphDialog::enableLinespacingValue(int)
77 bool const enable = linespacing->currentItem()==4;
78 linespacingValue->setEnabled(enable);