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 "ControlIndex.h"
17 #include <qlineedit.h>
18 #include <qpushbutton.h>
20 typedef Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > base_class;
22 QIndex::QIndex(ControlIndex & c)
23 : base_class(c, _("Index"))
28 void QIndex::build_dialog()
30 dialog_.reset(new QIndexDialog(this));
32 bc().setOK(dialog_->okPB);
33 bc().setCancel(dialog_->closePB);
34 bc().addReadOnly(dialog_->keywordED);
38 void QIndex::update_contents()
40 dialog_->keywordED->setText(controller().params().getContents().c_str());
46 controller().params().setContents(dialog_->keywordED->text().latin1());
50 bool QIndex::isValid()
52 return !string(dialog_->keywordED->text()).empty();