1 /* 2 * Copyright (C) by Kevin Ottens <kevin.ottens@nextcloud.com> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * for more details. 13 */ 14 15 #ifndef CONFLICTDIALOG_H 16 #define CONFLICTDIALOG_H 17 18 #include <QDialog> 19 20 namespace OCC { 21 22 class ConflictSolver; 23 24 namespace Ui { 25 class ConflictDialog; 26 } 27 28 class ConflictDialog : public QDialog 29 { 30 Q_OBJECT 31 public: 32 explicit ConflictDialog(QWidget *parent = nullptr); 33 ~ConflictDialog() override; 34 35 QString baseFilename() const; 36 QString localVersionFilename() const; 37 QString remoteVersionFilename() const; 38 39 public slots: 40 void setBaseFilename(const QString &baseFilename); 41 void setLocalVersionFilename(const QString &localVersionFilename); 42 void setRemoteVersionFilename(const QString &remoteVersionFilename); 43 44 void accept() override; 45 46 private: 47 void updateWidgets(); 48 void updateButtonStates(); 49 50 QString _baseFilename; 51 QScopedPointer<Ui::ConflictDialog> _ui; 52 ConflictSolver *_solver; 53 }; 54 55 } // namespace OCC 56 57 #endif // CONFLICTDIALOG_H 58