Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/vcs/vcsrevisioncontext.h
- This file was added.
1 | /* This file is part of KDevelop | ||||
---|---|---|---|---|---|
2 | * | ||||
3 | * Copyright 2017 Friedrich W. H. Kossebau <kossebau@kde.org> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or | ||||
6 | * modify it under the terms of the GNU General Public License | ||||
7 | * as published by the Free Software Foundation; either version 2 | ||||
8 | * of the License, or (at your option) any later version. | ||||
9 | * | ||||
10 | * This program is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | * GNU General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU General Public License | ||||
16 | * along with this program; if not, write to the Free Software | ||||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||||
18 | * 02110-1301, USA. | ||||
19 | */ | ||||
20 | | ||||
21 | #ifndef KDEVPLATFORM_VCSREVISIONCONTEXT_H | ||||
22 | #define KDEVPLATFORM_VCSREVISIONCONTEXT_H | ||||
23 | | ||||
24 | #include <vcsexport.h> | ||||
25 | | ||||
26 | #include <context.h> | ||||
27 | | ||||
28 | namespace KDevelop | ||||
29 | { | ||||
30 | class VcsRevision; | ||||
31 | class IProject; | ||||
32 | | ||||
33 | /** | ||||
34 | * A context for a VcsRevision. | ||||
35 | */ | ||||
36 | class KDEVPLATFORMVCS_EXPORT VcsRevisionContext : public Context | ||||
37 | { | ||||
38 | public: | ||||
39 | /**Builds the context. | ||||
40 | @param revision The items to build the context from.*/ | ||||
41 | explicit VcsRevisionContext(IProject* project, const VcsRevision& revision, const QUrl& url = {}); | ||||
42 | | ||||
43 | /**Destructor.*/ | ||||
44 | ~VcsRevisionContext() override; | ||||
45 | | ||||
46 | int type() const override; | ||||
47 | | ||||
48 | QList<QUrl> urls() const override; | ||||
49 | | ||||
50 | IProject* project() const; | ||||
51 | | ||||
52 | /** | ||||
53 | * @return the revisipon. | ||||
54 | */ | ||||
55 | VcsRevision revision() const; | ||||
56 | | ||||
57 | private: | ||||
58 | const QScopedPointer<class VcsRevisionContextPrivate> d; | ||||
59 | Q_DISABLE_COPY(VcsRevisionContext) | ||||
60 | }; | ||||
61 | | ||||
62 | } | ||||
63 | | ||||
64 | #endif |