File indexing completed on 2025-01-05 05:14:47
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 "abstractactions.h" 0010 #include "libkommitwidgets_export.h" 0011 0012 namespace Git 0013 { 0014 class Branch; 0015 } 0016 class LIBKOMMITWIDGETS_EXPORT BranchActions : public AbstractActions 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit BranchActions(Git::Manager *git, QWidget *parent = nullptr); 0022 0023 void setBranchName(const QSharedPointer<Git::Branch> &newBranchName); 0024 void setOtherBranch(const QSharedPointer<Git::Branch> &newOtherBranch); 0025 0026 private: 0027 void fetch(); 0028 void create(); 0029 void browse(); 0030 void checkout(); 0031 void diff(); 0032 void remove(); 0033 void merge(); 0034 void note(); 0035 0036 QSharedPointer<Git::Branch> mBranchName; 0037 QSharedPointer<Git::Branch> mOtherBranch; 0038 0039 DEFINE_ACTION(actionFetch) 0040 DEFINE_ACTION(actionBrowse) 0041 DEFINE_ACTION(actionCheckout) 0042 DEFINE_ACTION(actionDiff) 0043 DEFINE_ACTION(actionMerge) 0044 DEFINE_ACTION(actionCreate) 0045 DEFINE_ACTION(actionRemove) 0046 DEFINE_ACTION(actionNote) 0047 };