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 "qt_helpers.h"
18 #include "support/Systemcall.h"
20 #include <QApplication>
27 GuiProgress::GuiProgress(GuiView & parent, Qt::DockWidgetArea area,
28 Qt::WindowFlags flags) : DockView(parent, "view-console", area, flags)
30 setWindowTitle(qt_("External process monitoring"));
31 setWidget(&text_edit);
32 support::Systemcall::registerProgressInterface(this);
36 void GuiProgress::appendMessage(QString const & msg)
38 text_edit.append(msg);
39 // QEventLoop::ExcludeUserInputEvents:
40 // don't allow user inputs while processing a document
41 // if we allow it, we open will Pandora's Box of multithreading
42 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
46 void GuiProgress::clearMessages()
52 Dialog * createGuiProgress(GuiView & lv)
54 GuiView & guiview = static_cast<GuiView &>(lv);
56 // TODO where to show up on the Mac?
57 //return new GuiProgress(guiview, Qt::RightDockWidgetArea, Qt::Drawer);
59 return new GuiProgress(guiview, Qt::BottomDockWidgetArea);
63 } // namespace frontend