2 * \file QParagraphDialog.C
3 * Copyright 2001 LyX Team
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS
16 #pragma implementation
19 #include "QParagraphDialog.h"
20 #include "QParagraph.h"
22 #include <qlineedit.h>
23 #include <qcombobox.h>
24 #include <qpushbutton.h>
25 #include <qvalidator.h>
27 #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));
49 void QParagraphDialog::closeEvent(QCloseEvent * e)
56 void QParagraphDialog::change_adaptor()
61 void QParagraphDialog::enableAbove(int)
63 bool const enable = spacingAbove->currentItem()==6;
64 valueAbove->setEnabled(enable);
65 unitAbove->setEnabled(enable);
69 void QParagraphDialog::enableBelow(int)
71 bool const enable = spacingBelow->currentItem()==6;
72 valueBelow->setEnabled(enable);
73 unitBelow->setEnabled(enable);
76 void QParagraphDialog::enableLinespacingValue(int)
78 bool const enable = linespacing->currentItem()==4;
79 linespacingValue->setEnabled(enable);