]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiProgress.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiProgress.h
index 56585582d6c11952aef7fc9036b277ecd3d9410f..09c891acd1e9601aa21a66681038b6a611f36109 100644 (file)
@@ -4,7 +4,8 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Peter Kümmel
+ * \author Peter Kümmel
+ * \author Pavel Sanda
  *
  * Full author contact details are available in file CREDITS.
  */
 #include "DockView.h"
 
 #include <QTextEdit>
+#include <QSplashScreen>
+#include <QTimer>
 
-#include <string>
+#include <sstream>
 
 
 namespace lyx {
 namespace frontend {
 
 
-class GuiProgress : 
-       public DockView, 
-       public lyx::support::ProgressInterface
+class GuiProgress :
+               public QObject,
+               public lyx::support::ProgressInterface
 {
+       Q_OBJECT
 
 public:
-       GuiProgress(
-               GuiView & parent, ///< the main window where to dock.
-               Qt::DockWidgetArea area, ///< Position of the dock (and also drawer)
-               Qt::WindowFlags flags = 0);
+       GuiProgress(GuiView * view);
+       ~GuiProgress();
 
+       void lyxerrConnect();
+       void lyxerrDisconnect();
+       void lyxerrFlush();
+
+Q_SIGNALS:
+       void processStarted(QString const &);
+       void processFinished(QString const &);
        void appendMessage(QString const &);
+       void appendError(QString const &);
        void clearMessages();
+       void appendLyXErrMessage(QString const & text);
+
+       // 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);
+
+private Q_SLOTS:
+       void doProcessStarted(QString const &);
+       void doProcessFinished(QString const &);
+       void doAppendMessage(QString const &);
+       void doAppendError(QString const &);
+       void doClearMessages();
+
+       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 &);
 
-       /// Controller inherited method.
-       ///@{
-       bool initialiseParams(std::string const & source) { return true; }
-       void clearParams() {}
-       void dispatchParams() {}
-       bool isBufferDependent() const { return true; }
-       bool canApply() const { return true; }
-       bool canApplyToReadOnly() const { return true; }
-       void updateView() {}
-       ///@}
 
 private:
-       QTextEdit text_edit;
+       GuiView* view_;
+       void appendText(QString const &);
+       std::ostringstream lyxerr_stream_;
+
 };
 
 
+
 } // namespace frontend
 } // namespace lyx