Marble

ConflictDialog.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Utku Aydın <[email protected]>
4 //
5 
6 #ifndef CONFLICTDIALOG_H
7 #define CONFLICTDIALOG_H
8 
9 #include "marble_export.h"
10 
11 #include <QDialog>
12 
13 class QDialogButtonBox;
14 class QAbstractButton;
15 
16 namespace Marble
17 {
18 
19 class MergeItem;
20 
21 class MARBLE_EXPORT ConflictDialog : public QDialog
22 {
23  Q_OBJECT
24 
25 public:
26  enum Button {
27  Local = 1,
28  Cloud,
29  AllLocal,
30  AllCloud
31  };
32 
33  enum ResolveAction {
34  AskUser,
35  PreferLocal,
36  PreferCloud
37  };
38 
39  explicit ConflictDialog( QWidget *parent = nullptr );
40  void setMergeItem( MergeItem *item );
41 
42 public Q_SLOTS:
43  void open() override;
44  void stopAutoResolve();
45 
46 Q_SIGNALS:
47  void resolveConflict( MergeItem *mergeItem );
48 
49 private Q_SLOTS:
50  void resolveConflict( QAbstractButton *button );
51 
52 private:
53  void prepareLayout();
54 
55  MergeItem *m_mergeItem;
56  QDialogButtonBox *m_box;
57  ConflictDialog::ResolveAction m_resolveAction;
58 };
59 
60 }
61 
62 #endif // CONFLICTDIALOG_H
QAction * open(const QObject *recvr, const char *slot, QObject *parent)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.