]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiProgress.h
23f47f7bcd3bcf176b8e4ff7cc3723eb2a69886c
[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
44 Q_SIGNALS:
45         void processStarted(QString const &);
46         void processFinished(QString const &);
47         void appendMessage(QString const &);
48         void appendError(QString const &);
49         void clearMessages();
50         void lyxerrFlush();
51
52         // Alert interface
53         void warning(QString const & title, QString const & message);
54         void toggleWarning(QString const & title, QString const & msg, QString const & formatted);
55         void error(QString const & title, QString const & message);
56         void information(QString const & title, QString const & message);
57
58 private Q_SLOTS:
59         void doProcessStarted(QString const &);
60         void doProcessFinished(QString const &);
61         void doAppendMessage(QString const &);
62         void doAppendError(QString const &);
63         void doClearMessages();
64         void dolyxerrFlush();
65
66
67         void doWarning(QString const &, QString const &);
68         void doToggleWarning(QString const & title, QString const & msg, QString const & formatted);
69         void doError(QString const &, QString const &);
70         void doInformation(QString const &, QString const &);
71
72
73 private:
74         GuiView* view_;
75         void appendText(QString const &);
76         std::ostringstream lyxerr_stream_;
77
78 };
79
80
81
82 } // namespace frontend
83 } // namespace lyx
84
85 #endif
86