File indexing completed on 2025-01-19 04:22:43
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 #include "abstractcommand.h" 0009 #include "libkommit_export.h" 0010 0011 namespace Git 0012 { 0013 0014 class LIBKOMMIT_EXPORT CommandAddRemote : public AbstractCommand 0015 { 0016 public: 0017 explicit CommandAddRemote(QObject *parent = nullptr); 0018 0019 Q_REQUIRED_RESULT QStringList generateArgs() const override; 0020 0021 Q_REQUIRED_RESULT const QString &remoteName() const; 0022 void setRemoteName(const QString &newRemoteName); 0023 Q_REQUIRED_RESULT OptionalBool tags() const; 0024 void setTags(OptionalBool newTags); 0025 void setTags(Qt::CheckState newTags); 0026 Q_REQUIRED_RESULT bool mirror() const; 0027 void setMirror(bool newMirror); 0028 Q_REQUIRED_RESULT const QString &master() const; 0029 void setMaster(const QString &newMaster); 0030 Q_REQUIRED_RESULT bool fetch() const; 0031 void setFetch(bool newFetch); 0032 0033 Q_REQUIRED_RESULT const QString &url() const; 0034 void setUrl(const QString &newUrl); 0035 0036 private: 0037 QString mRemoteName; 0038 OptionalBool mTags{OptionalBool::False}; 0039 bool mMirror{false}; 0040 QString mMaster; 0041 bool mFetch{false}; 0042 QString mUrl; 0043 }; 0044 0045 }