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"
17 #include <qlineedit.h>
18 #include <qpushbutton.h>
19 #include <qvalidator.h>
20 #include <q3whatsthis.h>
22 #include "qt_helpers.h"
24 #include <QCloseEvent>
29 QParagraphDialog::QParagraphDialog(QParagraph * form)
34 connect(okPB, SIGNAL(clicked()),
35 form_, SLOT(slotOK()));
36 connect(applyPB, SIGNAL(clicked()),
37 form_, SLOT(slotApply()));
38 connect(closePB, SIGNAL(clicked()),
39 form_, SLOT(slotClose()));
42 connect( align, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
43 connect( linespacing, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
44 connect( linespacing, SIGNAL( activated(int) ), this, SLOT( enableLinespacingValue(int) ) );
45 connect( linespacingValue, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
46 connect( indentCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
47 connect( labelWidth, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
49 linespacingValue->setValidator(new QDoubleValidator(linespacingValue));
51 Q3WhatsThis::add(labelWidth, qt_(
52 "As described in the User Guide, the length of"
53 " this text will determine how wide the label part"
54 " of each item is in environments like List and"
57 " Normally you won't need to set this,"
58 " since the largest label width of all the"
59 " items is used. But if you need to, you can"
65 void QParagraphDialog::closeEvent(QCloseEvent * e)
72 void QParagraphDialog::change_adaptor()
78 void QParagraphDialog::enableLinespacingValue(int)
80 bool const enable = linespacing->currentItem() == 4;
81 linespacingValue->setEnabled(enable);
84 } // namespace frontend