]> git.lyx.org Git - lyx.git/blob - src/support/ProgressInterface.h
Fix LaTeX length export of big numbers (bug 9416)
[lyx.git] / src / support / ProgressInterface.h
1 // -*- C++ -*-
2 /**
3  * \file ProgressInterface.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 LYX_SUPPORT_PROGRESSINTERFACE_H
13 #define LYX_SUPPORT_PROGRESSINTERFACE_H
14
15 #include "support/strfwd.h"
16
17 class QString;
18
19 namespace lyx {
20 namespace support {
21
22
23 class ProgressInterface
24 {
25 public:
26         virtual ~ProgressInterface() {}
27
28         /// will be Signals in Qt classes
29         virtual void processStarted(QString const &) = 0;
30         virtual void processFinished(QString const &) = 0;
31         virtual void appendMessage(QString const &) = 0;
32         virtual void appendError(QString const &) = 0;
33         virtual void clearMessages() = 0;
34         virtual void lyxerrFlush() = 0;
35
36         /// Alert interface
37         virtual void warning(QString const & title, QString const & message) = 0;
38         virtual void toggleWarning(QString const & title, QString const & msg, QString const & formatted) = 0;
39         virtual void error(QString const & title, QString const & message, QString const & details) = 0;
40         virtual void information(QString const & title, QString const & message) = 0;
41         virtual int prompt(docstring const & title, docstring const & question,
42                            int default_button, int cancel_button,
43                            docstring const & b1, docstring const & b2) = 0;
44
45         virtual void lyxerrConnect() = 0;
46         virtual void lyxerrDisconnect() = 0;
47
48         static void setInstance(ProgressInterface*);
49         static ProgressInterface* instance();
50
51 protected:
52         ProgressInterface() {}
53 };
54
55
56
57 } // namespace support
58 } // namespace lyx
59
60 #endif // LYX_SUPPORT_PROGRESSINTERFACE_H
61