]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QNomenclDialog.C
Fix unreported bug related to 3246 by Richard Heck:
[lyx.git] / src / frontends / qt4 / QNomenclDialog.C
1 /**
2  * \file QNomenclDialog.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 O. U. Baran
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "qt_helpers.h"
15
16 #include "QNomencl.h"
17 #include "QNomenclDialog.h"
18
19 #include <QPushButton>
20 #include <QLineEdit>
21 #include <QWhatsThis>
22 #include <QCloseEvent>
23
24 namespace lyx {
25 namespace frontend {
26
27 QNomenclDialog::QNomenclDialog(QNomencl * form)
28         : form_(form)
29 {
30         setupUi(this);
31
32         connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK()));
33         connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
34         connect(symbolED, SIGNAL(textChanged(const QString&)),
35                 this, SLOT(change_adaptor()));
36         connect(descrED, SIGNAL(textChanged(const QString&)),
37                 this, SLOT(change_adaptor()));
38
39 }
40
41
42 void QNomenclDialog::show()
43 {
44         QDialog::show();
45         symbolED->setFocus();
46 }
47
48
49 void QNomenclDialog::change_adaptor()
50 {
51         form_->changed();
52 }
53
54
55 void QNomenclDialog::reject()
56 {
57         form_->slotClose();
58 }
59
60
61 void QNomenclDialog::closeEvent(QCloseEvent * e)
62 {
63         form_->slotWMHide();
64         e->accept();
65 }
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #include "QNomenclDialog_moc.cpp"