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>
22 #include <qwhatsthis.h>
24 #include "qt_helpers.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));
45 QWhatsThis::add(labelWidth, qt_(
46 "As described in the User Guide, the length of"
47 " this text will determine how wide the label part"
48 " of each item is in environments like List and"
51 " Normally you won't need to set this,"
52 " since the largest label width of all the"
53 " items is used. But if you need to, you can"
59 void QParagraphDialog::closeEvent(QCloseEvent * e)
66 void QParagraphDialog::change_adaptor()
72 void QParagraphDialog::enableAbove(int)
74 bool const enable = spacingAbove->currentItem()==6;
75 valueAbove->setEnabled(enable);
76 unitAbove->setEnabled(enable);
81 void QParagraphDialog::enableBelow(int)
83 bool const enable = spacingBelow->currentItem()==6;
84 valueBelow->setEnabled(enable);
85 unitBelow->setEnabled(enable);
89 void QParagraphDialog::enableLinespacingValue(int)
91 bool const enable = linespacing->currentItem()==4;
92 linespacingValue->setEnabled(enable);