1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #include "cvskeeper.h" |
6 | |
7 | #include "git/gitqlientwidget.h" |
8 | #include "svn/svnclientwidget.h" |
9 | |
10 | CVSkeeper::CVSkeeper(QObject *parent) |
11 | : QObject(parent) |
12 | , svnReposWidget(new SvnClientWidget) |
13 | , gitReposWidget(new GitQlientWidget) |
14 | { |
15 | |
16 | } |
17 | |
18 | CVSkeeper *CVSkeeper::instance(){ |
19 | static CVSkeeper ins; |
20 | return &ins; |
21 | } |
22 | |
23 | void CVSkeeper::openRepos(const QString &repoPath) |
24 | { |
25 | if (svnReposWidget->isSvnDir(repoPath)) |
26 | svnReposWidget->addNewRepoTab(repoPath); |
27 | } |
28 | |
29 | SvnClientWidget *CVSkeeper::svnMainWidget() |
30 | { |
31 | return svnReposWidget; |
32 | } |
33 | |
34 | GitQlientWidget *CVSkeeper::gitMainWidget() |
35 | { |
36 | return gitReposWidget; |
37 | } |
38 |