3 * \file GuiProgress.cpp
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
14 #include "GuiProgress.h"
16 #include "support/Systemcall.h"
18 #include <QApplication>
25 GuiProgress::GuiProgress(GuiView & parent, Qt::DockWidgetArea area,
26 Qt::WindowFlags flags) : DockView(parent, "latex-progress", area, flags)
28 setWindowTitle(qt_("LaTeX Progress"));
29 setWidget(&text_edit);
30 lyx::support::Systemcall::registerProgressInterface(this);
34 void GuiProgress::appendMessage(QString const & msg)
36 text_edit.append(msg);
37 // QEventLoop::ExcludeUserInputEvents:
38 // don't allow user inputs while processing a document
39 // if we allow it, we open will Pandora's Box of multithreading
40 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
44 void GuiProgress::clearMessages()
50 Dialog * createGuiProgress(GuiView & lv)
52 GuiView & guiview = static_cast<GuiView &>(lv);
54 // TODO where to show up on the Mac?
55 //return new GuiProgress(guiview, Qt::RightDockWidgetArea, Qt::Drawer);
57 return new GuiProgress(guiview, Qt::BottomDockWidgetArea);
61 } // namespace frontend