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