]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QIndexDialog.C
Lots and lots of little trivial bits.
[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 QIndexDialog::QIndexDialog(QIndex * form)
27         : QIndexDialogBase(0, 0, false, 0),
28         form_(form)
29 {
30         connect(okPB, SIGNAL(clicked()),
31                 form, SLOT(slotOK()));
32         connect(closePB, SIGNAL(clicked()),
33                 form, SLOT(slotClose()));
34
35         QWhatsThis::add(keywordED, _(
36 "The format of the entry in the index.\n"
37 "\n"
38 "An entry can be specified as a sub-entry of\n"
39 "another with \"!\" :\n"
40 "\n"
41 "cars!mileage\n"
42 "\n"
43 "You can cross-refer to another entry like so :\n"
44 "\n"
45 "cars!mileage|see{economy}\n"
46 "\n"
47 "For further details refer to the local LaTeX\n"
48 "documentation.\n"));
49 }
50
51
52 void QIndexDialog::show()
53 {
54         QIndexDialogBase::show(); 
55         keywordED->setFocus();
56 }
57
58  
59 void QIndexDialog::change_adaptor()
60 {
61         form_->changed();
62 }
63
64
65 void QIndexDialog::closeEvent(QCloseEvent * e)
66 {
67         form_->slotWMHide();
68         e->accept();
69 }