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_branchesstatuswidget.h"
0010 #include "widgetbase.h"
0011 
0012 namespace Git
0013 {
0014 class Manager;
0015 class BranchesModel;
0016 }
0017 class BranchActions;
0018 class BranchesStatusWidget : public WidgetBase, private Ui::BranchesStatusWidget
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit BranchesStatusWidget(Git::Manager *git, AppWindow *parent = nullptr);
0024 
0025     void saveState(QSettings &settings) const override;
0026     void restoreState(QSettings &settings) override;
0027 
0028     void init(Git::Manager *git);
0029 
0030 private:
0031     void slotTreeViewCustomContextMenuRequested(const QPoint &pos);
0032     void slotPushButtonRemoveSelectedClicked();
0033     void slotComboBoxReferenceBranchCurrentIndexChanged(int selectedBranch);
0034     BranchActions *mActions = nullptr;
0035     Git::BranchesModel *mModel = nullptr;
0036 };