File indexing completed on 2025-01-05 05:14:40
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 "ui_historyviewwidget.h" 0010 #include "widgetbase.h" 0011 0012 namespace Git 0013 { 0014 class LogsModel; 0015 }; 0016 0017 class GraphPainter; 0018 class CommitActions; 0019 class HistoryViewWidget : public WidgetBase, private Ui::HistoryViewWidget 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 explicit HistoryViewWidget(Git::Manager *git, AppWindow *parent = nullptr); 0025 void setBranch(const QString &branchName); 0026 0027 void saveState(QSettings &settings) const override; 0028 void restoreState(QSettings &settings) override; 0029 0030 private: 0031 void slotTreeViewHistoryItemActivated(const QModelIndex &index); 0032 void slotTextBrowserHashClicked(const QString &hash); 0033 void slotTextBrowserFileClicked(const QString &file); 0034 void slotTreeViewHistoryCustomContextMenuRequested(const QPoint &pos); 0035 CommitActions *const mActions; 0036 Git::LogsModel *const mHistoryModel; 0037 GraphPainter *mGraphPainter{nullptr}; 0038 };