X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiProgress.h;h=09c891acd1e9601aa21a66681038b6a611f36109;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=79891548c1277e9c8aadcf5bf11bb237b1b2f605;hpb=aa613aaf010f1dd991222dbf1e83d51aa9f4b8a7;p=lyx.git diff --git a/src/frontends/qt4/GuiProgress.h b/src/frontends/qt4/GuiProgress.h index 79891548c1..09c891acd1 100644 --- a/src/frontends/qt4/GuiProgress.h +++ b/src/frontends/qt4/GuiProgress.h @@ -5,6 +5,7 @@ * Licence details can be found in the file COPYING. * * \author Peter Kümmel + * \author Pavel Sanda * * Full author contact details are available in file CREDITS. */ @@ -20,24 +21,26 @@ #include #include -#include +#include namespace lyx { namespace frontend { -class GuiProgress : - public DockView, - public lyx::support::ProgressInterface +class GuiProgress : + public QObject, + public lyx::support::ProgressInterface { - Q_OBJECT + public: - GuiProgress( - GuiView & parent, ///< the main window where to dock. - Qt::DockWidgetArea area, ///< Position of the dock (and also drawer) - Qt::WindowFlags flags = 0); + GuiProgress(GuiView * view); + ~GuiProgress(); + + void lyxerrConnect(); + void lyxerrDisconnect(); + void lyxerrFlush(); Q_SIGNALS: void processStarted(QString const &); @@ -45,6 +48,13 @@ Q_SIGNALS: void appendMessage(QString const &); void appendError(QString const &); void clearMessages(); + void appendLyXErrMessage(QString const & text); + + // Alert interface + void warning(QString const & title, QString const & message); + void toggleWarning(QString const & title, QString const & msg, QString const & formatted); + void error(QString const & title, QString const & message); + void information(QString const & title, QString const & message); private Q_SLOTS: void doProcessStarted(QString const &); @@ -53,26 +63,16 @@ private Q_SLOTS: void doAppendError(QString const &); void doClearMessages(); -public: - /// Controller inherited method. - ///@{ - bool initialiseParams(std::string const &) { return true; } - void clearParams() {} - void dispatchParams() {} - bool isBufferDependent() const { return false; } - bool canApply() const { return true; } - bool canApplyToReadOnly() const { return true; } - void updateView() {} - ///@} - - - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); + void doWarning(QString const &, QString const &); + void doToggleWarning(QString const & title, QString const & msg, QString const & formatted); + void doError(QString const &, QString const &); + void doInformation(QString const &, QString const &); -private: - QTextEdit text_edit; +private: + GuiView* view_; void appendText(QString const &); + std::ostringstream lyxerr_stream_; };