summaryrefslogtreecommitdiff
path: root/ui/gui_status_handler.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:06 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:06 +0200
commitfbe76102e941b9f1edaf236788e42678f05fdf9a (patch)
treef5f538316019fa89be8dc478103490c3a826f3ac /ui/gui_status_handler.h
parent3.8 (diff)
downloadFreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.tar.gz
FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.tar.bz2
FreeFileSync-fbe76102e941b9f1edaf236788e42678f05fdf9a.zip
3.9
Diffstat (limited to 'ui/gui_status_handler.h')
-rw-r--r--ui/gui_status_handler.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/ui/gui_status_handler.h b/ui/gui_status_handler.h
new file mode 100644
index 00000000..d519b142
--- /dev/null
+++ b/ui/gui_status_handler.h
@@ -0,0 +1,73 @@
+// **************************************************************************
+// * This file is part of the FreeFileSync project. It is distributed under *
+// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
+// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
+// **************************************************************************
+//
+#ifndef GUISTATUSHANDLER_H_INCLUDED
+#define GUISTATUSHANDLER_H_INCLUDED
+
+#include "../library/status_handler.h"
+#include <wx/event.h>
+#include "../library/error_log.h"
+#include "progress_indicator.h"
+
+class SyncStatus;
+class MainDialog;
+class wxWindow;
+class wxCommandEvent;
+
+
+//classes handling sync and compare error as well as status information
+class CompareStatusHandler : private wxEvtHandler, 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 wxString& text);
+ virtual void reportFatalError(const wxString& errorMessage);
+ virtual void reportWarning(const wxString& warningMessage, bool& warningActive);
+
+private:
+ void OnKeyPressed(wxKeyEvent& event);
+ void OnAbortCompare(wxCommandEvent& event); //handle abort button click
+ virtual void abortThisProcess();
+
+ MainDialog* mainDialog;
+ bool ignoreErrors;
+ Process currentProcess;
+};
+
+
+class SyncStatusHandler : public StatusHandler
+{
+public:
+ SyncStatusHandler(wxTopLevelWindow* parentDlg, 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 wxString& text);
+ virtual void reportFatalError(const wxString& errorMessage);
+ virtual void reportWarning(const wxString& warningMessage, bool& warningActive);
+ void reportInfo(const wxString& infoMessage);
+
+private:
+ virtual void abortThisProcess();
+
+ SyncStatus syncStatusFrame; //the window managed by SyncStatus has longer lifetime than this handler!
+ bool ignoreErrors;
+ ffs3::ErrorLogging errorLog;
+};
+
+
+#endif // GUISTATUSHANDLER_H_INCLUDED
bgstack15