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