]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QNomenclDialog.C
renaming in frontends/qt4/ui: s/Q//g
[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 #include <QTextEdit>
24
25 namespace lyx {
26 namespace frontend {
27
28 QNomenclDialog::QNomenclDialog(QNomencl * form)
29         : form_(form)
30 {
31         setupUi(this);
32
33         connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK()));
34         connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
35         connect(symbolED, SIGNAL(textChanged(const QString&)),
36                 this, SLOT(change_adaptor()));
37         connect(descriptionTE, SIGNAL(textChanged()),
38                 this, SLOT(change_adaptor()));
39
40         setFocusProxy(descriptionTE);
41 }
42
43
44 void QNomenclDialog::show()
45 {
46         QDialog::show();
47 }
48
49
50 void QNomenclDialog::change_adaptor()
51 {
52         form_->changed();
53 }
54
55
56 void QNomenclDialog::reject()
57 {
58         form_->slotClose();
59 }
60
61
62 void QNomenclDialog::closeEvent(QCloseEvent * e)
63 {
64         form_->slotWMHide();
65         e->accept();
66 }
67
68 } // namespace frontend
69 } // namespace lyx
70
71 #include "QNomenclDialog_moc.cpp"