]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QIndexDialog.C
Remove quite a few compiler warnings:
[lyx.git] / src / frontends / qt4 / QIndexDialog.C
1 /**
2  * \file QIndexDialog.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  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "qt_helpers.h"
14
15 #include "QIndex.h"
16 #include "QIndexDialog.h"
17
18 #include <QPushButton>
19 #include <QLineEdit>
20 #include <QWhatsThis>
21 #include <QCloseEvent>
22
23 namespace lyx {
24 namespace frontend {
25
26 QIndexDialog::QIndexDialog(QIndex * form)
27         : form_(form)
28 {
29         setupUi(this);
30
31         connect(okPB, SIGNAL(clicked()),
32                 form, SLOT(slotOK()));
33         connect(closePB, SIGNAL(clicked()),
34                 form, SLOT(slotClose()));
35         connect( keywordED, SIGNAL( textChanged(const QString&) ), 
36                 this, SLOT( change_adaptor() ) );
37
38         keywordED->setWhatsThis( qt_(
39                 "The format of the entry in the index.\n"
40                 "\n"
41                 "An entry can be specified as a sub-entry of\n"
42                 "another with \"!\":\n"
43                 "\n"
44                 "cars!mileage\n"
45                 "\n"
46                 "You can cross-refer to another entry like so:\n"
47                 "\n"
48                 "cars!mileage|see{economy}\n"
49                 "\n"
50                 "For further details refer to the local LaTeX\n"
51                 "documentation.\n")
52         );
53 }
54
55
56 void QIndexDialog::show()
57 {
58         QDialog::show();
59         keywordED->setFocus();
60 }
61
62
63 void QIndexDialog::change_adaptor()
64 {
65         form_->changed();
66 }
67
68
69 void QIndexDialog::reject()
70 {
71         form_->slotClose();
72 }
73
74
75 void QIndexDialog::closeEvent(QCloseEvent * e)
76 {
77         form_->slotWMHide();
78         e->accept();
79 }
80
81 } // namespace frontend
82 } // namespace lyx
83
84 #include "QIndexDialog_moc.cpp"