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
12class ReposWidget;
13class QPinnableTabWidget;
14class SvnClientWidget : public QMainWindow
15{
16 Q_OBJECT
17public:
18 explicit SvnClientWidget(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
19 bool isSvnDir(const QString &repoPath);
20
21public 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
29private slots:
30 void doCheckoutRepos(const QString &remote, const QString &local,
31 const QString &user, const QString &passwd);
32
33protected:
34 bool eventFilter(QObject *obj, QEvent *event);
35
36private:
37 QSet<QString> mCurrentRepos;
38 QPinnableTabWidget *mRepos{nullptr};
39};
40
41#endif // SVNCLIENTWIDGET_H
42