]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QLog.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QLog.C
1 /**
2  * \file QLog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QLog.h"
14 #include "QLogDialog.h"
15 #include "qt_helpers.h"
16
17 #include "controllers/ControlLog.h"
18
19 #include <sstream>
20
21 #include <QTextBrowser>
22 #include <QPushButton>
23
24 namespace lyx {
25 namespace frontend {
26
27 typedef QController<ControlLog, QView<QLogDialog> > base_class;
28
29 QLog::QLog(Dialog & parent)
30         : base_class(parent, "")
31 {}
32
33
34 void QLog::build_dialog()
35 {
36         dialog_.reset(new QLogDialog(this));
37 }
38
39
40 void QLog::update_contents()
41 {
42         setTitle(controller().title());
43
44         std::ostringstream ss;
45         controller().getContents(ss);
46
47         dialog_->logTB->setPlainText(toqstr(ss.str()));
48 }
49
50 } // namespace frontend
51 } // namespace lyx