| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef SVNCLIENTWIDGET_H |
| 6 | #define SVNCLIENTWIDGET_H |
| 7 | |
| 8 | #include <QMainWindow> |
| 9 | #include <QToolBar> |
| 10 | #include <QSet> |
| 11 | |
| 12 | class ReposWidget; |
| 13 | class QPinnableTabWidget; |
| 14 | class SvnClientWidget : public QMainWindow |
| 15 | { |
| 16 | Q_OBJECT |
| 17 | public: |
| 18 | explicit SvnClientWidget(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); |
| 19 | bool isSvnDir(const QString &repoPath); |
| 20 | |
| 21 | public slots: |
| 22 | void addRepoTab(const QString &repoPath, |
| 23 | const QString &user = "" , const QString &passwd = "" ); |
| 24 | void addNewRepoTab(const QString &repoPathArg, |
| 25 | const QString &user = "" , const QString &passwd = "" ); |
| 26 | void showCheckoutDialog(); |
| 27 | void showOpenLocalRepos(); |
| 28 | |
| 29 | private slots: |
| 30 | void doCheckoutRepos(const QString &remote, const QString &local, |
| 31 | const QString &user, const QString &passwd); |
| 32 | |
| 33 | protected: |
| 34 | bool eventFilter(QObject *obj, QEvent *event); |
| 35 | |
| 36 | private: |
| 37 | QSet<QString> mCurrentRepos; |
| 38 | QPinnableTabWidget *mRepos{nullptr}; |
| 39 | }; |
| 40 | |
| 41 | #endif // SVNCLIENTWIDGET_H |
| 42 | |