]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QVSpaceDialog.C
fix math fonts with LyX/Mac
[lyx.git] / src / frontends / qt2 / QVSpaceDialog.C
1 /**
2  * \file QVSpaceDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  * \author Edwin Leuven
8  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #include <config.h>
14
15 #include "QVSpaceDialog.h"
16 #include "QVSpace.h"
17
18 #include "lengthcombo.h"
19 #include "qt_helpers.h"
20
21 #include <qcombobox.h>
22 #include <qlineedit.h>
23 #include <qpushbutton.h>
24 #include <qvalidator.h>
25
26
27 namespace lyx {
28 namespace frontend {
29
30 QVSpaceDialog::QVSpaceDialog(QVSpace * form)
31         : QVSpaceDialogBase(0, 0, false, 0),
32         form_(form)
33 {
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()));
40 }
41
42
43 void QVSpaceDialog::closeEvent(QCloseEvent * e)
44 {
45         form_->slotWMHide();
46         e->accept();
47 }
48
49
50 void QVSpaceDialog::change_adaptor()
51 {
52         form_->changed();
53 }
54
55
56 void QVSpaceDialog::enableCustom(int)
57 {
58         bool const enable = spacingCO->currentItem()==5;
59         valueLE->setEnabled(enable);
60         unitCO->setEnabled(enable);
61 }
62
63 } // namespace frontend
64 } // namespace lyx