]> git.lyx.org Git - lyx.git/blob - src/frontends/qt3/QIndexDialog.C
Extracted from r14281
[lyx.git] / src / frontends / qt3 / 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.h>
19 #include <qlineedit.h>
20 #include <qwhatsthis.h>
21
22 namespace lyx {
23 namespace frontend {
24
25 QIndexDialog::QIndexDialog(QIndex * form)
26         : QIndexDialogBase(0, 0, false, 0),
27         form_(form)
28 {
29         connect(okPB, SIGNAL(clicked()),
30                 form, SLOT(slotOK()));
31         connect(closePB, SIGNAL(clicked()),
32                 form, SLOT(slotClose()));
33
34         QWhatsThis::add(keywordED, qt_(
35 "The format of the entry in the index.\n"
36 "\n"
37 "An entry can be specified as a sub-entry of\n"
38 "another with \"!\":\n"
39 "\n"
40 "cars!mileage\n"
41 "\n"
42 "You can cross-refer to another entry like so:\n"
43 "\n"
44 "cars!mileage|see{economy}\n"
45 "\n"
46 "For further details refer to the local LaTeX\n"
47 "documentation.\n"));
48 }
49
50
51 void QIndexDialog::show()
52 {
53         QIndexDialogBase::show();
54         keywordED->setFocus();
55 }
56
57
58 void QIndexDialog::change_adaptor()
59 {
60         form_->changed();
61 }
62
63
64 void QIndexDialog::reject()
65 {
66         form_->slotClose();
67 }
68
69
70 void QIndexDialog::closeEvent(QCloseEvent * e)
71 {
72         form_->slotWMHide();
73         e->accept();
74 }
75
76 } // namespace frontend
77 } // namespace lyx