]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QPreamble.C
Compile fixes. Qt2 should now build (and fail immediately when you start it,
[lyx.git] / src / frontends / qt2 / QPreamble.C
1 /**
2  * \file QPreamble.C
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon <moz@compsoc.man.ac.uk>
7  */
8
9 #include <config.h>
10 #include <fstream>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "gettext.h"
17 #include "LyXView.h"
18 #include "ControlPreamble.h"
19  
20 #include "QPreamble.h"
21 #include "QPreambleDialog.h"
22 #include "Qt2BC.h"
23
24 #include <qmultilineedit.h>
25 #include <qpushbutton.h>
26
27 typedef Qt2CB<ControlPreamble, Qt2DB<QPreambleDialog> > base_class;
28
29 QPreamble::QPreamble(ControlPreamble & c, Dialogs &)
30         : base_class(c, _("LaTeX Preamble"))
31 {
32 }
33
34
35 void QPreamble::build_dialog()
36 {
37         dialog_.reset(new QPreambleDialog(this));
38
39         bc().setOK(dialog_->okPB);
40         bc().setApply(dialog_->applyPB);
41         bc().setCancel(dialog_->closePB);
42 }
43
44
45 void QPreamble::update_contents()
46 {
47         dialog_->preambleLE->setText(controller().params().c_str());
48 }
49
50
51 void QPreamble::apply()
52 {
53         controller().params() = dialog_->preambleLE->text().latin1();
54 }