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