File indexing completed on 2025-01-05 05:14:48
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 Stash; 0015 }; 0016 0017 class LIBKOMMITWIDGETS_EXPORT StashActions : public AbstractActions 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 explicit StashActions(Git::Manager *git, QWidget *parent = nullptr); 0023 0024 Q_REQUIRED_RESULT QSharedPointer<Git::Stash> stash() const; 0025 void setStash(QSharedPointer<Git::Stash> stash); 0026 0027 public Q_SLOTS: 0028 void apply(); 0029 void drop(); 0030 void pop(); 0031 void diff(); 0032 void create(); 0033 0034 private: 0035 QSharedPointer<Git::Stash> mStash; 0036 0037 DEFINE_ACTION(actionPop) 0038 DEFINE_ACTION(actionApply) 0039 DEFINE_ACTION(actionDrop) 0040 DEFINE_ACTION(actionDiff) 0041 DEFINE_ACTION(actionNew) 0042 };