lyx_mirror/src/frontends/qt2/QIndex.C
John Levon 66d7fea6df Some string(widget->text()) fixes. Weirdness
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5752 a592a061-630c-0410-9148-cb99ea01b6c8
2002-11-30 02:09:16 +00:00

61 lines
1.0 KiB
C

/**
* \file QIndex.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
*
* Full author contact details are available in file CREDITS
*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include "ControlIndex.h"
#include "gettext.h"
#include "QIndexDialog.h"
#include "QIndex.h"
#include "Qt2BC.h"
#include <qlineedit.h>
#include <qpushbutton.h>
typedef Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > base_class;
QIndex::QIndex()
: base_class(_("Index"))
{
}
void QIndex::build_dialog()
{
dialog_.reset(new QIndexDialog(this));
bc().setOK(dialog_->okPB);
bc().setCancel(dialog_->closePB);
bc().addReadOnly(dialog_->keywordED);
}
void QIndex::update_contents()
{
dialog_->keywordED->setText(controller().params().getContents().c_str());
}
void QIndex::apply()
{
controller().params().setContents(dialog_->keywordED->text().latin1());
}
bool QIndex::isValid()
{
return !dialog_->keywordED->text().isEmpty();
}