File indexing completed on 2025-01-05 05:14:49
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 "appdialog.h" 0010 #include "libkommitwidgets_export.h" 0011 #include "ui_filehistorydialog.h" 0012 0013 namespace Git 0014 { 0015 class Manager; 0016 class File; 0017 } 0018 0019 class LIBKOMMITWIDGETS_EXPORT FileHistoryDialog : public AppDialog, private Ui::FileHistoryDialog 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 explicit FileHistoryDialog(Git::Manager *git, const QString &fileName, QWidget *parent = nullptr); 0025 explicit FileHistoryDialog(Git::Manager *git, const Git::File &file, QWidget *parent = nullptr); 0026 0027 private: 0028 static constexpr int dataRole{Qt::UserRole + 1}; 0029 0030 void slotListWidgetItemClicked(QListWidgetItem *item); 0031 void slotTreeViewItemClicked(QTreeWidgetItem *item, int column); 0032 void slotRadioButtonRegularViewToggled(bool toggle); 0033 void slotRadioButtonDifferentialViewToggled(bool toggle); 0034 void compareFiles(); 0035 0036 const QString mFileName; 0037 QTreeWidgetItem *mLeftFile{nullptr}; 0038 QTreeWidgetItem *mRightFile{nullptr}; 0039 };