3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
13 #pragma implementation
16 #include <qmultilineedit.h>
17 #include <qpushbutton.h>
19 #include "QPreambleDialog.h"
20 #include "QPreamble.h"
24 #include "QtLyXView.h"
25 #include "ControlPreamble.h"
27 typedef Qt2CB<ControlPreamble, Qt2DB<QPreambleDialog> > base_class;
29 QPreamble::QPreamble(ControlPreamble & c)
30 : base_class(c, _("LaTeX Preamble"))
35 void QPreamble::build_dialog()
37 dialog_.reset(new QPreambleDialog(this));
39 bc().setOK(dialog_->okPB);
40 bc().setApply(dialog_->applyPB);
41 bc().setCancel(dialog_->closePB);
45 void QPreamble::update_contents()
47 dialog_->preambleLE->setText(controller().params().c_str());
51 void QPreamble::apply()
53 controller().params() = dialog_->preambleLE->text().latin1();