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.
14 #include "QParagraphDialog.h"
15 #include "QParagraph.h"
18 #include <QPushButton>
21 #include <QCloseEvent>
23 #include "qt_helpers.h"
28 QParagraphDialog::QParagraphDialog(QParagraph * form)
33 connect(okPB, SIGNAL(clicked()),
34 form_, SLOT(slotOK()));
35 connect(applyPB, SIGNAL(clicked()),
36 form_, SLOT(slotApply()));
37 connect(closePB, SIGNAL(clicked()),
38 form_, SLOT(slotClose()));
39 connect(align, SIGNAL( activated(int) ),
40 this, SLOT( change_adaptor() ) );
41 connect(linespacing, SIGNAL( activated(int) ),
42 this, SLOT( change_adaptor() ) );
43 connect(linespacing, SIGNAL( activated(int) ),
44 this, SLOT( enableLinespacingValue(int) ) );
45 connect(linespacingValue, SIGNAL( textChanged(const QString&) ),
46 this, SLOT( change_adaptor() ) );
47 connect(indentCB, SIGNAL( toggled(bool) ),
48 this, SLOT( change_adaptor() ) );
49 connect(labelWidth, SIGNAL( textChanged(const QString&) ),
50 this, SLOT( change_adaptor() ) );
52 linespacingValue->setValidator(new QDoubleValidator(linespacingValue));
54 labelWidth->setWhatsThis( qt_(
55 "As described in the User Guide, the length of"
56 " this text will determine how wide the label part"
57 " of each item is in environments like List and"
60 " Normally you won't need to set this,"
61 " since the largest label width of all the"
62 " items is used. But if you need to, you can"
68 void QParagraphDialog::closeEvent(QCloseEvent * e)
75 void QParagraphDialog::change_adaptor()
81 void QParagraphDialog::enableLinespacingValue(int)
83 bool const enable = linespacing->currentIndex() == 4;
84 linespacingValue->setEnabled(enable);
87 } // namespace frontend
90 #include "QParagraphDialog_moc.cpp"