]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiProgress.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiProgress.h
1 // -*- C++ -*-
2 /**
3  * \file GuiProgress.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Peter Kümmel
8  * \author Pavel Sanda
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUIPROGRESS_H
14 #define GUIPROGRESS_H
15
16 #include "support/ProgressInterface.h"
17
18 #include "DockView.h"
19
20 #include <QTextEdit>
21 #include <QSplashScreen>
22 #include <QTimer>
23
24 #include <sstream>
25
26
27 namespace lyx {
28 namespace frontend {
29
30
31 class GuiProgress :
32                 public QObject,
33                 public lyx::support::ProgressInterface
34 {
35         Q_OBJECT
36
37 public:
38         GuiProgress(GuiView * view);
39         ~GuiProgress();
40
41         void lyxerrConnect();
42         void lyxerrDisconnect();
43         void lyxerrFlush();
44
45 Q_SIGNALS:
46         void processStarted(QString const &);
47         void processFinished(QString const &);
48         void appendMessage(QString const &);
49         void appendError(QString const &);
50         void clearMessages();
51         void appendLyXErrMessage(QString const & text);
52
53         // Alert interface
54         void warning(QString const & title, QString const & message);
55         void toggleWarning(QString const & title, QString const & msg, QString const & formatted);
56         void error(QString const & title, QString const & message);
57         void information(QString const & title, QString const & message);
58
59 private Q_SLOTS:
60         void doProcessStarted(QString const &);
61         void doProcessFinished(QString const &);
62         void doAppendMessage(QString const &);
63         void doAppendError(QString const &);
64         void doClearMessages();
65
66         void doWarning(QString const &, QString const &);
67         void doToggleWarning(QString const & title, QString const & msg, QString const & formatted);
68         void doError(QString const &, QString const &);
69         void doInformation(QString const &, QString const &);
70
71
72 private:
73         GuiView* view_;
74         void appendText(QString const &);
75         std::ostringstream lyxerr_stream_;
76
77 };
78
79
80
81 } // namespace frontend
82 } // namespace lyx
83
84 #endif
85