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