File indexing completed on 2024-05-19 07:37:36
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Utku Aydın <utkuaydin34@gmail.com> 0004 // 0005 0006 #ifndef CONFLICTDIALOG_H 0007 #define CONFLICTDIALOG_H 0008 0009 #include "marble_export.h" 0010 0011 #include <QDialog> 0012 0013 class QDialogButtonBox; 0014 class QAbstractButton; 0015 0016 namespace Marble 0017 { 0018 0019 class MergeItem; 0020 0021 class MARBLE_EXPORT ConflictDialog : public QDialog 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 enum Button { 0027 Local = 1, 0028 Cloud, 0029 AllLocal, 0030 AllCloud 0031 }; 0032 0033 enum ResolveAction { 0034 AskUser, 0035 PreferLocal, 0036 PreferCloud 0037 }; 0038 0039 explicit ConflictDialog( QWidget *parent = nullptr ); 0040 void setMergeItem( MergeItem *item ); 0041 0042 public Q_SLOTS: 0043 void open() override; 0044 void stopAutoResolve(); 0045 0046 Q_SIGNALS: 0047 void resolveConflict( MergeItem *mergeItem ); 0048 0049 private Q_SLOTS: 0050 void resolveConflict( QAbstractButton *button ); 0051 0052 private: 0053 void prepareLayout(); 0054 0055 MergeItem *m_mergeItem; 0056 QDialogButtonBox *m_box; 0057 ConflictDialog::ResolveAction m_resolveAction; 0058 }; 0059 0060 } 0061 0062 #endif // CONFLICTDIALOG_H