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 #pragma implementation
19 #include "ControlLog.h"
22 #include <qtextview.h>
23 #include <qpushbutton.h>
25 #include "QLogDialog.h"
34 typedef Qt2CB<ControlLog, Qt2DB<QLogDialog> > base_class;
37 : base_class(_("Log"))
42 void QLog::build_dialog()
44 dialog_.reset(new QLogDialog(this));
46 bc().setCancel(dialog_->closePB);
50 void QLog::update_contents()
52 std::pair<Buffer::LogType, string> const & logfile =
53 controller().logfile();
55 if (logfile.first == Buffer::buildlog)
56 dialog_->setCaption(_("Build log"));
58 dialog_->setCaption(_("LaTeX log"));
60 dialog_->logTV->setText("");
62 ifstream ifstr(logfile.second.c_str());
64 if (logfile.first == Buffer::buildlog)
65 dialog_->logTV->setText(_("No build log file found"));
67 dialog_->logTV->setText(_("No LaTeX log file found"));
74 dialog_->logTV->setText(ost.str().c_str());