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
15 #include "qt_helpers.h"
16 #include "ControlLog.h"
19 #include <qtextview.h>
20 #include <qpushbutton.h>
22 #include "QLogDialog.h"
31 typedef Qt2CB<ControlLog, Qt2DB<QLogDialog> > base_class;
34 : base_class(qt_("LyX: LaTeX Log"))
39 void QLog::build_dialog()
41 dialog_.reset(new QLogDialog(this));
43 bc().setCancel(dialog_->closePB);
47 void QLog::update_contents()
49 std::pair<Buffer::LogType, string> const & logfile =
50 controller().logfile();
52 if (logfile.first == Buffer::buildlog)
53 dialog_->setCaption(qt_("Build log"));
55 dialog_->setCaption(qt_("LaTeX log"));
57 dialog_->logTV->setText("");
59 ifstream ifstr(logfile.second.c_str());
61 if (logfile.first == Buffer::buildlog)
62 dialog_->logTV->setText(qt_("No build log file found."));
64 dialog_->logTV->setText(qt_("No LaTeX log file found."));
71 dialog_->logTV->setText(toqstr(ost.str()));