]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiProgress.h
Migrate GuiLine to InsetParamsWidget.
[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
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();
39         ~GuiProgress();
40
41         void lyxerrConnect();
42         void lyxerrDisconnect();
43         void lyxerrFlush();
44
45         static QString currentTime();
46
47 Q_SIGNALS:
48
49         // ProgressInterface
50         void processStarted(QString const &);
51         void processFinished(QString const &);
52         void appendMessage(QString const &);
53         void appendError(QString const &);
54         void clearMessages();
55         void appendLyXErrMessage(QString const & text);
56
57
58         void clearMessageText();    
59         void updateStatusBarMessage(QString const &);
60
61         // Alert interface
62         void warning(QString const & title, QString const & message);
63         void toggleWarning(QString const & title, QString const & msg, QString const & formatted);
64         void error(QString const & title, QString const & message);
65         void information(QString const & title, QString const & message);
66
67 private Q_SLOTS:
68         void doProcessStarted(QString const &);
69         void doProcessFinished(QString const &);
70         void doAppendMessage(QString const &);
71         void doAppendError(QString const &);
72         void doClearMessages();
73
74         void doWarning(QString const &, QString const &);
75         void doToggleWarning(QString const & title, QString const & msg, QString const & formatted);
76         void doError(QString const &, QString const &);
77         void doInformation(QString const &, QString const &);
78
79         void updateWithLyXErr();
80
81
82 private:
83         void appendText(QString const &);
84         std::ostringstream lyxerr_stream_;
85         QTimer flushDelay_;
86 };
87
88
89
90 } // namespace frontend
91 } // namespace lyx
92
93 #endif
94