]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiProgress.h
a47eb749867eb561c96b66b83e2d99002b96292a
[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  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIPROGRESS_H
13 #define GUIPROGRESS_H
14
15 #include "support/ProgressInterface.h"
16
17 #include "DockView.h"
18
19 #include <QTextEdit>
20 #include <QSplashScreen>
21 #include <QTimer>
22
23 #include <string>
24
25
26 namespace lyx {
27 namespace frontend {
28
29
30 class GuiProgress :
31                 public QObject,
32                 public lyx::support::ProgressInterface
33 {
34         Q_OBJECT
35
36 public:
37         GuiProgress(GuiView * view);
38
39
40 Q_SIGNALS:
41         void processStarted(QString const &);
42         void processFinished(QString const &);
43         void appendMessage(QString const &);
44         void appendError(QString const &);
45         void clearMessages();
46
47         // Alert interface
48         void warning(QString const & title, QString const & message);
49         void toggleWarning(QString const & title, QString const & msg, QString const & formatted);
50         void error(QString const & title, QString const & message);
51         void information(QString const & title, QString const & message);
52
53 private Q_SLOTS:
54         void doProcessStarted(QString const &);
55         void doProcessFinished(QString const &);
56         void doAppendMessage(QString const &);
57         void doAppendError(QString const &);
58         void doClearMessages();
59
60
61         void doWarning(QString const &, QString const &);
62         void doToggleWarning(QString const & title, QString const & msg, QString const & formatted);
63         void doError(QString const &, QString const &);
64         void doInformation(QString const &, QString const &);
65
66
67 private:
68         GuiView* view_;
69         void appendText(QString const &);
70
71 };
72
73
74
75 } // namespace frontend
76 } // namespace lyx
77
78 #endif
79