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"
31 QParagraphDialog::QParagraphDialog(QParagraph * form)
32 : QParagraphDialogBase(0, 0, false, 0),
35 connect(okPB, SIGNAL(clicked()),
36 form_, SLOT(slotOK()));
37 connect(applyPB, SIGNAL(clicked()),
38 form_, SLOT(slotApply()));
39 connect(closePB, SIGNAL(clicked()),
40 form_, SLOT(slotClose()));
43 linespacingValue->setValidator(new QDoubleValidator(linespacingValue));
44 // disabled to allow glue spacing for latexperts
45 //valueAbove->setValidator(new QDoubleValidator(valueAbove));
46 //valueBelow->setValidator(new QDoubleValidator(valueBelow));
50 void QParagraphDialog::closeEvent(QCloseEvent * e)
57 void QParagraphDialog::change_adaptor()
63 void QParagraphDialog::enableAbove(int)
65 bool const enable = spacingAbove->currentItem()==6;
66 valueAbove->setEnabled(enable);
67 unitAbove->setEnabled(enable);
72 void QParagraphDialog::enableBelow(int)
74 bool const enable = spacingBelow->currentItem()==6;
75 valueBelow->setEnabled(enable);
76 unitBelow->setEnabled(enable);
80 void QParagraphDialog::enableLinespacingValue(int)
82 bool const enable = linespacing->currentItem()==4;
83 linespacingValue->setEnabled(enable);