2 * \file QVSpaceDialog.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * \author Jürgen Spitzmüller
10 * Full author contact details are available in file CREDITS.
15 #include "QVSpaceDialog.h"
18 #include <QCloseEvent>
20 #include "lengthcombo.h"
21 #include "validators.h"
22 #include "qt_helpers.h"
25 #include <QPushButton>
33 QVSpaceDialog::QVSpaceDialog(QVSpace * form)
38 connect(okPB, SIGNAL(clicked()),
39 form_, SLOT(slotOK()));
40 connect(applyPB, SIGNAL(clicked()),
41 form_, SLOT(slotApply()));
42 connect(closePB, SIGNAL(clicked()),
43 form_, SLOT(slotClose()));
45 connect( spacingCO, SIGNAL( highlighted(const QString&) ), this, SLOT( change_adaptor() ) );
46 connect( valueLE, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
47 connect( spacingCO, SIGNAL( activated(int) ), this, SLOT( enableCustom(int) ) );
48 connect( keepCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
49 connect( unitCO, SIGNAL( selectionChanged(LyXLength::UNIT) ), this, SLOT( change_adaptor() ) );
51 valueLE->setValidator(unsignedLengthValidator(valueLE));
55 void QVSpaceDialog::closeEvent(QCloseEvent * e)
62 void QVSpaceDialog::change_adaptor()
68 void QVSpaceDialog::enableCustom(int selection)
70 bool const enable = selection == 5;
71 valueLE->setEnabled(enable);
72 unitCO->setEnabled(enable);
75 } // namespace frontend
78 #include "QVSpaceDialog_moc.cpp"