File indexing completed on 2025-01-05 05:14:47
0001 /* 0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "abstractactions.h" 0010 #include "libkommitwidgets_export.h" 0011 0012 class LIBKOMMITWIDGETS_EXPORT ChangedFileActions : public AbstractActions 0013 { 0014 Q_OBJECT 0015 0016 public: 0017 explicit ChangedFileActions(Git::Manager *git, QWidget *parent = nullptr); 0018 0019 Q_REQUIRED_RESULT const QString &filePath() const; 0020 void setFilePath(const QString &newFilePath); 0021 void setFilePaths(const QString &originalFilePath, const QString &renamedFilePath); 0022 void diff(); 0023 0024 private: 0025 void revert(); 0026 0027 Q_SIGNALS: 0028 void reloadNeeded(); 0029 0030 private: 0031 QString mOriginalFilePath; 0032 QString mFilePath; 0033 0034 DEFINE_ACTION(actionDiff) 0035 DEFINE_ACTION(actionRevert) 0036 };