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