2009-12-20 14:26:55 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file GuiProgress.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Peter Kümmel
|
2009-12-29 15:05:37 +00:00
|
|
|
* \author Pavel Sanda
|
2009-12-20 14:26:55 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUIPROGRESS_H
|
|
|
|
#define GUIPROGRESS_H
|
|
|
|
|
|
|
|
#include "support/ProgressInterface.h"
|
|
|
|
|
|
|
|
#include "DockView.h"
|
|
|
|
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <QSplashScreen>
|
|
|
|
#include <QTimer>
|
|
|
|
|
2009-12-29 15:05:37 +00:00
|
|
|
#include <sstream>
|
2009-12-20 14:26:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
|
2009-12-21 11:48:19 +00:00
|
|
|
class GuiProgress :
|
|
|
|
public QObject,
|
|
|
|
public lyx::support::ProgressInterface
|
2009-12-20 14:26:55 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2009-12-21 11:48:19 +00:00
|
|
|
|
2009-12-20 14:26:55 +00:00
|
|
|
public:
|
2009-12-21 11:48:19 +00:00
|
|
|
GuiProgress(GuiView * view);
|
2009-12-29 15:05:37 +00:00
|
|
|
~GuiProgress();
|
2009-12-21 11:48:19 +00:00
|
|
|
|
2009-12-29 15:05:37 +00:00
|
|
|
void lyxerrConnect();
|
|
|
|
void lyxerrDisconnect();
|
2010-01-13 19:07:18 +00:00
|
|
|
void lyxerrFlush();
|
2009-12-20 14:26:55 +00:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void processStarted(QString const &);
|
|
|
|
void processFinished(QString const &);
|
|
|
|
void appendMessage(QString const &);
|
|
|
|
void appendError(QString const &);
|
|
|
|
void clearMessages();
|
2010-01-03 16:30:54 +00:00
|
|
|
void appendLyXErrMessage(QString const & text);
|
2009-12-20 14:26:55 +00:00
|
|
|
|
2009-12-21 11:48:19 +00:00
|
|
|
// Alert interface
|
|
|
|
void warning(QString const & title, QString const & message);
|
|
|
|
void toggleWarning(QString const & title, QString const & msg, QString const & formatted);
|
|
|
|
void error(QString const & title, QString const & message);
|
|
|
|
void information(QString const & title, QString const & message);
|
|
|
|
|
2009-12-20 14:26:55 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void doProcessStarted(QString const &);
|
|
|
|
void doProcessFinished(QString const &);
|
|
|
|
void doAppendMessage(QString const &);
|
|
|
|
void doAppendError(QString const &);
|
|
|
|
void doClearMessages();
|
|
|
|
|
2009-12-21 11:48:19 +00:00
|
|
|
void doWarning(QString const &, QString const &);
|
|
|
|
void doToggleWarning(QString const & title, QString const & msg, QString const & formatted);
|
|
|
|
void doError(QString const &, QString const &);
|
|
|
|
void doInformation(QString const &, QString const &);
|
2009-12-20 14:26:55 +00:00
|
|
|
|
2009-12-21 11:48:19 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
GuiView* view_;
|
2009-12-20 14:26:55 +00:00
|
|
|
void appendText(QString const &);
|
2009-12-29 15:05:37 +00:00
|
|
|
std::ostringstream lyxerr_stream_;
|
2009-12-20 14:26:55 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|