2001-08-29 03:35:45 +00:00
|
|
|
/**
|
|
|
|
* \file QPreamble.C
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-08-29 03:35:45 +00:00
|
|
|
*
|
2002-10-20 01:48:28 +00:00
|
|
|
* \author John Levon
|
2002-09-24 13:57:09 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-08-29 03:35:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
#include "gettext.h"
|
|
|
|
#include "LyXView.h"
|
|
|
|
#include "ControlPreamble.h"
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2001-08-29 03:35:45 +00:00
|
|
|
#include "QPreamble.h"
|
2002-06-19 03:38:44 +00:00
|
|
|
#include "QPreambleDialog.h"
|
2001-08-29 03:35:45 +00:00
|
|
|
#include "Qt2BC.h"
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
#include <qmultilineedit.h>
|
|
|
|
#include <qpushbutton.h>
|
2001-08-29 03:35:45 +00:00
|
|
|
|
|
|
|
typedef Qt2CB<ControlPreamble, Qt2DB<QPreambleDialog> > base_class;
|
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
QPreamble::QPreamble()
|
|
|
|
: base_class(_("LaTeX Preamble"))
|
2001-08-29 03:35:45 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QPreamble::build_dialog()
|
|
|
|
{
|
|
|
|
dialog_.reset(new QPreambleDialog(this));
|
|
|
|
|
|
|
|
bc().setOK(dialog_->okPB);
|
|
|
|
bc().setApply(dialog_->applyPB);
|
|
|
|
bc().setCancel(dialog_->closePB);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QPreamble::update_contents()
|
|
|
|
{
|
|
|
|
dialog_->preambleLE->setText(controller().params().c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QPreamble::apply()
|
|
|
|
{
|
2002-10-21 17:38:09 +00:00
|
|
|
controller().params(dialog_->preambleLE->text().latin1());
|
2001-08-29 03:35:45 +00:00
|
|
|
}
|