3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
11 #include "QIndexDialog.h"
12 #include "QtLyXView.h"
13 #include "BufferView.h"
22 #include <qlineedit.h>
23 #include <qpushbutton.h>
25 typedef Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > base_class;
27 QIndex::QIndex(ControlIndex & c)
28 : base_class(c, _("Index"))
40 dialog_.reset(new QIndexDialog(this));
42 bc().setOK(dialog_->okPB);
43 bc().setCancel(dialog_->cancelPB);
44 bc().addReadOnly(dialog_->keywordED);
50 dialog_->keywordED->setText(controller().params().getContents().c_str());
53 dialog_->keywordED->setFocusPolicy(QWidget::NoFocus);
54 dialog_->okPB->setEnabled(false);
55 dialog_->cancelPB->setText(_("Close"));
57 dialog_->keywordED->setFocusPolicy(QWidget::StrongFocus);
58 dialog_->keywordED->setFocus();
59 dialog_->okPB->setEnabled(true);
60 dialog_->cancelPB->setText(_("Cancel"));
70 controller().params().setContents(dialog_->keywordED->text().latin1());