3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include "qt_helpers.h"
15 #include "ControlLog.h"
18 #include <qtextview.h>
19 #include <qpushbutton.h>
21 #include "QLogDialog.h"
30 typedef QController<ControlLog, QView<QLogDialog> > base_class;
32 QLog::QLog(Dialog & parent)
33 : base_class(parent, _("LyX: LaTeX Log"))
38 void QLog::build_dialog()
40 dialog_.reset(new QLogDialog(this));
42 bcview().setCancel(dialog_->closePB);
46 void QLog::update_contents()
48 std::pair<Buffer::LogType, string> const & logfile =
49 controller().logfile();
51 if (logfile.first == Buffer::buildlog)
52 setTitle(_("Build log"));
54 setTitle(_("LaTeX log"));
56 dialog_->logTV->setText("");
58 ifstream ifstr(logfile.second.c_str());
60 if (logfile.first == Buffer::buildlog)
61 dialog_->logTV->setText(qt_("No build log file found."));
63 dialog_->logTV->setText(qt_("No LaTeX log file found."));
70 dialog_->logTV->setText(toqstr(ost.str()));