X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2FProgressInterface.h;h=1efb79a7e3b6296875311eea692fb27b82175218;hb=3f59d7e2cc6a3f9a09631c804b49b6d28e05d857;hp=1bc980e4857b95029b0f515c973c91cd1bd3f115;hpb=3af56311a7bddc491fa01457bdb5e9efa2dd31d8;p=lyx.git diff --git a/src/support/ProgressInterface.h b/src/support/ProgressInterface.h index 1bc980e485..1efb79a7e3 100644 --- a/src/support/ProgressInterface.h +++ b/src/support/ProgressInterface.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Peter Kümmel + * \author Peter Kümmel * * Full author contact details are available in file CREDITS. */ @@ -12,6 +12,8 @@ #ifndef LYX_SUPPORT_PROGRESSINTERFACE_H #define LYX_SUPPORT_PROGRESSINTERFACE_H +#include "support/strfwd.h" + class QString; namespace lyx { @@ -23,14 +25,35 @@ class ProgressInterface public: virtual ~ProgressInterface() {} + /// will be Signals in Qt classes + virtual void processStarted(QString const &) = 0; + virtual void processFinished(QString const &) = 0; virtual void appendMessage(QString const &) = 0; + virtual void appendError(QString const &) = 0; virtual void clearMessages() = 0; + virtual void lyxerrFlush() = 0; + + /// Alert interface + virtual void warning(QString const & title, QString const & message) = 0; + virtual void toggleWarning(QString const & title, QString const & msg, QString const & formatted) = 0; + virtual void error(QString const & title, QString const & message) = 0; + virtual void information(QString const & title, QString const & message) = 0; + virtual int prompt(docstring const & title, docstring const & question, + int default_button, int cancel_button, + docstring const & b1, docstring const & b2) = 0; + + virtual void lyxerrConnect() = 0; + virtual void lyxerrDisconnect() = 0; + + static void setInstance(ProgressInterface*); + static ProgressInterface* instance(); protected: ProgressInterface() {} }; + } // namespace support } // namespace lyx