From 2a3ebac62eb6dd88122c0f447ea90ce368373d3a Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 16:57:45 +0200 Subject: 1.18 --- ui/guiStatusHandler.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 ui/guiStatusHandler.h (limited to 'ui/guiStatusHandler.h') diff --git a/ui/guiStatusHandler.h b/ui/guiStatusHandler.h new file mode 100644 index 00000000..51a87c98 --- /dev/null +++ b/ui/guiStatusHandler.h @@ -0,0 +1,60 @@ +#ifndef GUISTATUSHANDLER_H_INCLUDED +#define GUISTATUSHANDLER_H_INCLUDED + +#include "../library/statusHandler.h" +#include + +class SyncStatus; +class MainDialog; +class wxWindow; + +//classes handling sync and compare error as well as status information +class CompareStatusHandler : public StatusHandler +{ +public: + CompareStatusHandler(MainDialog* dlg); + ~CompareStatusHandler(); + + virtual void updateStatusText(const Zstring& text); + virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); + virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); + virtual void forceUiRefresh(); + + virtual ErrorHandler::Response reportError(const Zstring& text); + virtual void reportFatalError(const Zstring& errorMessage); + virtual void reportWarning(const Zstring& warningMessage, bool& dontShowAgain); + +private: + virtual void abortThisProcess(); + + MainDialog* mainDialog; + bool ignoreErrors; + Process currentProcess; +}; + + +class SyncStatusHandler : public StatusHandler +{ +public: + SyncStatusHandler(wxWindow* dlg, bool ignoreAllErrors); + ~SyncStatusHandler(); + + virtual void updateStatusText(const Zstring& text); + virtual void initNewProcess(int objectsTotal, wxLongLong dataTotal, Process processID); + virtual void updateProcessedData(int objectsProcessed, wxLongLong dataProcessed); + virtual void forceUiRefresh(); + + virtual ErrorHandler::Response reportError(const Zstring& text); + virtual void reportFatalError(const Zstring& errorMessage); + virtual void reportWarning(const Zstring& warningMessage, bool& dontShowAgain); + +private: + virtual void abortThisProcess(); + + SyncStatus* syncStatusFrame; + bool ignoreErrors; + wxArrayString unhandledErrors; //list of non-resolved errors +}; + + +#endif // GUISTATUSHANDLER_H_INCLUDED -- cgit