• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/vcs

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • vcs
vcsevent.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of KDevelop *
3  * Copyright 2007 Andreas Pakulat <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU Library General Public License as *
7  * published by the Free Software Foundation; either version 2 of the *
8  * 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 Library General Public *
16  * License along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 
21 #include "vcsevent.h"
22 #include <QString>
23 #include <QList>
24 #include <QDateTime>
25 #include <QVariant>
26 #include <QSharedData>
27 
28 #include "vcsrevision.h"
29 namespace KDevelop
30 {
31 
32 class VcsItemEventPrivate : public QSharedData
33 {
34 public:
35  QString location;
36  QString sourceLocation;
37  VcsRevision sourceRevision;
38  VcsItemEvent::Actions actions;
39 };
40 
41 VcsItemEvent::VcsItemEvent()
42  : d(new VcsItemEventPrivate)
43 {
44 }
45 
46 VcsItemEvent::~VcsItemEvent() = default;
47 
48 VcsItemEvent::VcsItemEvent(const VcsItemEvent& rhs )
49  : d(rhs.d)
50 {
51 }
52 
53 QString VcsItemEvent::repositoryLocation() const
54 {
55  return d->location;
56 }
57 
58 QString VcsItemEvent::repositoryCopySourceLocation() const
59 {
60  return d->sourceLocation;
61 }
62 
63 VcsRevision VcsItemEvent::repositoryCopySourceRevision() const
64 {
65  return d->sourceRevision;
66 }
67 
68 VcsItemEvent::Actions VcsItemEvent::actions() const
69 {
70  return d->actions;
71 }
72 
73 void VcsItemEvent::setRepositoryLocation( const QString& l )
74 {
75  d->location = l;
76 }
77 
78 void VcsItemEvent::setRepositoryCopySourceLocation( const QString& l )
79 {
80  d->sourceLocation = l;
81 }
82 
83 void VcsItemEvent::setRepositoryCopySourceRevision( const KDevelop::VcsRevision& rev )
84 {
85  d->sourceRevision = rev;
86 }
87 
88 void VcsItemEvent::setActions( VcsItemEvent::Actions a )
89 {
90  d->actions = a;
91 }
92 
93 VcsItemEvent& VcsItemEvent::operator=( const VcsItemEvent& rhs)
94 {
95  d = rhs.d;
96  return *this;
97 }
98 
99 class VcsEventPrivate : public QSharedData
100 {
101 public:
102  VcsRevision revision;
103  QString author;
104  QString message;
105  QDateTime date;
106  QList<VcsItemEvent> items;
107 };
108 
109 VcsEvent::VcsEvent()
110  : d(new VcsEventPrivate)
111 {
112 }
113 
114 VcsEvent::~VcsEvent() = default;
115 
116 VcsEvent::VcsEvent( const VcsEvent& rhs )
117  : d(rhs.d)
118 {
119 }
120 
121 VcsRevision VcsEvent::revision() const
122 {
123  return d->revision;
124 }
125 
126 QString VcsEvent::author() const
127 {
128  return d->author;
129 }
130 
131 QDateTime VcsEvent::date() const
132 {
133  return d->date;
134 }
135 
136 QString VcsEvent::message() const
137 {
138  return d->message;
139 }
140 
141 QList<VcsItemEvent> VcsEvent::items() const
142 {
143  return d->items;
144 }
145 
146 void VcsEvent::setRevision( const VcsRevision& rev )
147 {
148  d->revision = rev;
149 }
150 
151 void VcsEvent::setAuthor( const QString& a )
152 {
153  d->author = a;
154 }
155 
156 void VcsEvent::setDate( const QDateTime& date )
157 {
158  d->date = date;
159 }
160 
161 void VcsEvent::setMessage(const QString& m )
162 {
163  d->message = m;
164 }
165 
166 void VcsEvent::setItems( const QList<VcsItemEvent>& l )
167 {
168  d->items = l;
169 }
170 
171 void VcsEvent::addItem(const VcsItemEvent& item)
172 {
173  d->items.append(item);
174 }
175 
176 VcsEvent& VcsEvent::operator=( const VcsEvent& rhs)
177 {
178  d = rhs.d;
179  return *this;
180 }
181 
182 
183 }
184 
KDevelop::VcsItemEvent::actions
Actions actions() const
Definition: vcsevent.cpp:84
QSharedData
KDevelop::VcsItemEvent
Small container class that contains information about a history event of a single repository item.
Definition: vcsevent.h:42
KDevelop::VcsItemEvent::setRepositoryCopySourceRevision
void setRepositoryCopySourceRevision(const KDevelop::VcsRevision &)
Definition: vcsevent.cpp:99
KDevelop::VcsItemEvent::VcsItemEvent
VcsItemEvent()
Definition: vcsevent.cpp:57
KDevelop::VcsEvent::revision
VcsRevision revision() const
Definition: vcsevent.cpp:137
KDevelop::VcsEvent::setItems
void setItems(const QList< VcsItemEvent > &)
Definition: vcsevent.cpp:182
KDevelop::VcsRevision
Encapsulates a vcs revision number, date or range of revisions.
Definition: vcsrevision.h:66
KDevelop::VcsEvent::addItem
void addItem(const VcsItemEvent &item)
Definition: vcsevent.cpp:187
QList
Definition: vcsannotationmodel.h:31
KDevelop::VcsItemEvent::repositoryCopySourceLocation
QString repositoryCopySourceLocation() const
Definition: vcsevent.cpp:74
KDevelop::VcsItemEvent::~VcsItemEvent
virtual ~VcsItemEvent()
KDevelop::VcsItemEvent::repositoryLocation
QString repositoryLocation() const
Definition: vcsevent.cpp:69
KDevelop::VcsEvent
Small container class that contains information about a single revision.
Definition: vcsevent.h:96
KDevelop::VcsEvent::author
QString author() const
Definition: vcsevent.cpp:142
KDevelop::VcsEvent::setDate
void setDate(const QDateTime &)
Definition: vcsevent.cpp:172
KDevelop::VcsEvent::setRevision
void setRevision(const VcsRevision &)
Definition: vcsevent.cpp:162
QString
KDevelop::VcsItemEvent::setActions
void setActions(Actions)
Definition: vcsevent.cpp:104
KDevelop::VcsItemEvent::operator=
VcsItemEvent & operator=(const VcsItemEvent &rhs)
Definition: vcsevent.cpp:109
KDevelop::VcsItemEvent::repositoryCopySourceRevision
VcsRevision repositoryCopySourceRevision() const
Definition: vcsevent.cpp:79
KDevelop::VcsItemEvent::setRepositoryLocation
void setRepositoryLocation(const QString &)
Definition: vcsevent.cpp:89
KDevelop::VcsEvent::items
QList< VcsItemEvent > items() const
Definition: vcsevent.cpp:157
KDevelop::VcsEvent::message
QString message() const
Definition: vcsevent.cpp:152
KDevelop::VcsEvent::setAuthor
void setAuthor(const QString &)
Definition: vcsevent.cpp:167
vcsevent.h
KDevelop::VcsEvent::date
QDateTime date() const
Definition: vcsevent.cpp:147
KDevelop
Definition: dvcsevent.h:33
QDateTime
KDevelop::VcsItemEvent::setRepositoryCopySourceLocation
void setRepositoryCopySourceLocation(const QString &)
Definition: vcsevent.cpp:94
KDevelop::VcsEvent::setMessage
void setMessage(const QString &)
Definition: vcsevent.cpp:177
KDevelop::VcsEvent::~VcsEvent
virtual ~VcsEvent()
vcsrevision.h
KDevelop::VcsEvent::VcsEvent
VcsEvent()
Definition: vcsevent.cpp:125
KDevelop::VcsEvent::operator=
VcsEvent & operator=(const VcsEvent &rhs)
Definition: vcsevent.cpp:192
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Mar 2 2021 05:51:57 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/vcs

Skip menu "kdevplatform/vcs"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal