]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/indexdlg.C
small cleanup, doxygen, formatting changes
[lyx.git] / src / frontends / kde / indexdlg.C
1 /**
2  * \file indexdlg.C
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #include <config.h>
10 #include <gettext.h>
11
12 #include "indexdlg.h"
13 #include "FormIndex.h"
14
15 #include <qtooltip.h>
16
17 IndexDialog::IndexDialog(FormIndex * f, QWidget * p, char const * name)
18         : IndexDialogData(p, name), form_(f)
19 {
20         setCaption(name);
21
22         // tooltips
23
24         QToolTip::add(labelindex,_("Index entry"));
25         QToolTip::add(index,_("Index entry"));
26
27         setMinimumSize(200, 65);
28         setMaximumSize(32767, 65);
29 }
30
31
32 IndexDialog::~IndexDialog()
33 {
34 }
35
36
37 void IndexDialog::clickedOK()
38 {
39         form_->apply();
40         form_->close();
41         hide();
42 }
43
44
45 void IndexDialog::clickedCancel()
46 {
47         form_->close();
48         hide();
49 }
50
51
52 void IndexDialog::setReadOnly(bool readonly)
53 {
54         if (readonly) {
55                 index->setFocusPolicy(QWidget::NoFocus);
56                 buttonOk->setEnabled(false);
57                 buttonCancel->setText(_("&Close"));
58         } else {
59                 index->setFocusPolicy(QWidget::StrongFocus);
60                 index->setFocus();
61                 buttonOk->setEnabled(true);
62                 buttonCancel->setText(_("&Cancel"));
63         }
64 }