summaryrefslogtreecommitdiff
path: root/ui/settingsDialog.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:01:29 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:01:29 +0200
commit9a2a524f1e311853d08050be2dcdddc09ac7759a (patch)
treed8e4a24169fce88c2d89931d58514889a0bcb0ea /ui/settingsDialog.h
parent2.3 (diff)
downloadFreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.gz
FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.tar.bz2
FreeFileSync-9a2a524f1e311853d08050be2dcdddc09ac7759a.zip
3.0
Diffstat (limited to 'ui/settingsDialog.h')
-rw-r--r--ui/settingsDialog.h181
1 files changed, 181 insertions, 0 deletions
diff --git a/ui/settingsDialog.h b/ui/settingsDialog.h
new file mode 100644
index 00000000..feb763a9
--- /dev/null
+++ b/ui/settingsDialog.h
@@ -0,0 +1,181 @@
+#ifndef SYNCDIALOG_H_INCLUDED
+#define SYNCDIALOG_H_INCLUDED
+
+#include "guiGenerated.h"
+#include "../library/processXml.h"
+#include <memory>
+
+class BatchFileDropEvent;
+class BatchFolderPairPanel;
+
+namespace FreeFileSync
+{
+class DragDropOnDlg;
+}
+
+
+class SyncCfgDialog : public SyncCfgDlgGenerated
+{
+public:
+ SyncCfgDialog(wxWindow* window,
+ const FreeFileSync::CompareVariant compareVar,
+ FreeFileSync::SyncConfiguration& syncConfiguration,
+ FreeFileSync::DeletionPolicy& handleDeletion,
+ wxString& customDeletionDirectory,
+ bool* ignoreErrors); //optional input parameter
+
+ ~SyncCfgDialog();
+
+ enum
+ {
+ BUTTON_APPLY = 10
+ };
+
+ static void updateConfigIcons(const FreeFileSync::CompareVariant compareVar,
+ const FreeFileSync::SyncConfiguration& syncConfig,
+ wxBitmapButton* buttonLeftOnly,
+ wxBitmapButton* buttonRightOnly,
+ wxBitmapButton* buttonLeftNewer,
+ wxBitmapButton* buttonRightNewer,
+ wxBitmapButton* buttonDifferent,
+ wxBitmapButton* buttonConflict,
+ wxStaticBitmap* bitmapLeftOnly,
+ wxStaticBitmap* bitmapRightOnly,
+ wxStaticBitmap* bitmapLeftNewer,
+ wxStaticBitmap* bitmapRightNewer,
+ wxStaticBitmap* bitmapDifferent,
+ wxStaticBitmap* bitmapConflict,
+ wxSizer* syncDirections);
+ //some syntax relaxation
+ void updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig);
+
+private:
+ virtual void OnSyncAutomatic( wxCommandEvent& event);
+ virtual void OnSyncLeftToRight( wxCommandEvent& event);
+ virtual void OnSyncUpdate( wxCommandEvent& event);
+ virtual void OnSyncBothSides( wxCommandEvent& event);
+
+ virtual void OnExLeftSideOnly( wxCommandEvent& event);
+ virtual void OnExRightSideOnly( wxCommandEvent& event);
+ virtual void OnLeftNewer( wxCommandEvent& event);
+ virtual void OnRightNewer( wxCommandEvent& event);
+ virtual void OnDifferent( wxCommandEvent& event);
+ virtual void OnConflict( wxCommandEvent& event);
+
+ virtual void OnClose( wxCloseEvent& event);
+ virtual void OnCancel( wxCommandEvent& event);
+ virtual void OnApply( wxCommandEvent& event);
+
+ //set tooltip
+ void updateToolTipErrorHandling(bool ignoreErrors);
+
+ //error handling
+ bool getErrorHandling();
+ void setErrorHandling(bool ignoreErrors);
+ void OnChangeErrorHandling(wxCommandEvent& event);
+
+ //deletion handling
+ FreeFileSync::DeletionPolicy getDeletionHandling();
+ void setDeletionHandling(FreeFileSync::DeletionPolicy newValue);
+ void OnChangeDeletionHandling(wxCommandEvent& event);
+
+ const FreeFileSync::CompareVariant cmpVariant;
+
+ //temporal copy of maindialog.cfg.syncConfiguration
+ FreeFileSync::SyncConfiguration localSyncConfiguration;
+
+ //changing data
+ FreeFileSync::SyncConfiguration& refSyncConfiguration;
+ FreeFileSync::DeletionPolicy& refHandleDeletion;
+ wxString& refCustomDeletionDirectory;
+ bool* refIgnoreErrors;
+
+ std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropCustomDelFolder;
+};
+
+
+class BatchDialog: public BatchDlgGenerated
+{
+ friend class BatchFileDropEvent;
+ friend class BatchFolderPairPanel;
+
+public:
+ BatchDialog(wxWindow* window, const xmlAccess::XmlBatchConfig& batchCfg);
+ BatchDialog(wxWindow* window, const wxString& filename);
+ ~BatchDialog() {};
+
+ enum
+ {
+ BATCH_FILE_SAVED = 15
+ };
+
+private:
+ void init();
+
+ virtual void OnExLeftSideOnly( wxCommandEvent& event);
+ virtual void OnExRightSideOnly( wxCommandEvent& event);
+ virtual void OnLeftNewer( wxCommandEvent& event);
+ virtual void OnRightNewer( wxCommandEvent& event);
+ virtual void OnDifferent( wxCommandEvent& event);
+ virtual void OnConflict( wxCommandEvent& event);
+
+ virtual void OnCheckAutomatic( wxCommandEvent& event);
+ virtual void OnCheckFilter( wxCommandEvent& event);
+ virtual void OnCheckSilent( wxCommandEvent& event);
+ virtual void OnChangeCompareVar( wxCommandEvent& event);
+ virtual void OnClose( wxCloseEvent& event);
+ virtual void OnCancel( wxCommandEvent& event);
+ virtual void OnSaveBatchJob( wxCommandEvent& event);
+ virtual void OnLoadBatchJob( wxCommandEvent& event);
+ virtual void OnAddFolderPair( wxCommandEvent& event);
+ virtual void OnRemoveFolderPair( wxCommandEvent& event);
+ virtual void OnRemoveTopFolderPair(wxCommandEvent& event);
+
+ void addFolderPair(const std::vector<FreeFileSync::FolderPairEnh>& newPairs, bool addFront = false);
+ void removeAddFolderPair(const int pos);
+ void clearAddFolderPairs();
+
+ FreeFileSync::CompareVariant getCurrentCompareVar() const;
+
+ void updateConfigIcons(const FreeFileSync::CompareVariant cmpVar, const FreeFileSync::SyncConfiguration& syncConfig);
+
+ void updateVisibleTabs();
+ void showNotebookpage(wxWindow* page, const wxString& pageName, bool show);
+
+ //error handling
+ xmlAccess::OnError getSelectionHandleError() const;
+ void setSelectionHandleError(const xmlAccess::OnError value);
+ void OnChangeErrorHandling(wxCommandEvent& event);
+
+ //set tooltip
+ void updateToolTipErrorHandling(const xmlAccess::OnError value);
+
+ //deletion handling
+ FreeFileSync::DeletionPolicy getDeletionHandling() const;
+ void setDeletionHandling(FreeFileSync::DeletionPolicy newValue);
+ void OnChangeDeletionHandling(wxCommandEvent& event);
+
+
+ bool saveBatchFile(const wxString& filename);
+ void loadBatchFile(const wxString& filename);
+ void loadBatchCfg(const xmlAccess::XmlBatchConfig& batchCfg);
+
+ xmlAccess::XmlBatchConfig getCurrentConfiguration() const;
+
+ FreeFileSync::SyncConfiguration localSyncConfiguration;
+ std::vector<BatchFolderPairPanel*> additionalFolderPairs;
+
+ //used when saving batch file
+ wxString proposedBatchFileName;
+
+ //add drag & drop support when selecting logfile directory
+ std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnLogfileDir;
+
+ //support for drag and drop on main pair
+ std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnLeft;
+ std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropOnRight;
+
+ std::auto_ptr<FreeFileSync::DragDropOnDlg> dragDropCustomDelFolder;
+};
+
+#endif // SYNCDIALOG_H_INCLUDED
bgstack15