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 valueAbove->setValidator(new QDoubleValidator(valueAbove));
35 valueBelow->setValidator(new QDoubleValidator(valueBelow));
38 void QParagraphDialog::closeEvent(QCloseEvent * e)
45 void QParagraphDialog::change_adaptor()
50 void QParagraphDialog::enableAbove(int)
52 bool const enable = spacingAbove->currentItem()==6;
53 valueAbove->setEnabled(enable);
54 unitAbove->setEnabled(enable);
58 void QParagraphDialog::enableBelow(int)
60 bool const enable = spacingBelow->currentItem()==6;
61 valueBelow->setEnabled(enable);
62 unitBelow->setEnabled(enable);
65 void QParagraphDialog::enableLinespacingValue(int)
67 bool const enable = linespacing->currentItem()==4;
68 linespacingValue->setEnabled(enable);