• 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.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  *
3  * Copyright 2007 Andreas Pakulat <[email protected]>
4  * Copyright 2007 Matthew Woehlke <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #ifndef KDEVPLATFORM_VCSEVENT_H
23 #define KDEVPLATFORM_VCSEVENT_H
24 
25 #include <QMetaType>
26 #include <QSharedDataPointer>
27 
28 #include "vcsexport.h"
29 
30 class QString;
31 class QDateTime;
32 template <typename T> class QList;
33 
34 namespace KDevelop
35 {
36 class VcsRevision;
37 
42 class KDEVPLATFORMVCS_EXPORT VcsItemEvent
43 {
44 public:
52  enum Action
53  {
54  Added = 1<<0 ,
55  Deleted = 1<<1 ,
56  Modified = 1<<2 ,
57  Copied = 1<<3 ,
58  Merged = 1<<4 ,
59  ContentsModified = 1<<5 ,
60  Replaced = 1<<6
61  };
62  Q_DECLARE_FLAGS( Actions, Action )
63 
64  VcsItemEvent();
65  virtual ~VcsItemEvent();
66  VcsItemEvent(const VcsItemEvent& );
67 
68  QString repositoryLocation() const;
69  QString repositoryCopySourceLocation() const; // may be empty
70  VcsRevision repositoryCopySourceRevision() const; // may be invalid, even if rCSL is not
71  Actions actions() const;
72 
73  void setRepositoryLocation( const QString& );
74  void setRepositoryCopySourceLocation( const QString& );
75  void setRepositoryCopySourceRevision( const KDevelop::VcsRevision& );
76  void setActions( Actions );
77 
78  VcsItemEvent& operator=( const VcsItemEvent& rhs);
79 
80 private:
81  QSharedDataPointer<class VcsItemEventPrivate> d;
82 };
83 
84 #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
85 Q_DECLARE_OPERATORS_FOR_FLAGS(VcsItemEvent::Actions)
86 #endif
87 
96 class KDEVPLATFORMVCS_EXPORT VcsEvent
97 {
98 public:
99  VcsEvent();
100  virtual ~VcsEvent();
101  VcsEvent( const VcsEvent& );
102 
103  VcsRevision revision() const;
104  QString author() const;
105  QDateTime date() const;
106  QString message() const;
107  QList<VcsItemEvent> items() const;
108 
109  void setRevision( const VcsRevision& );
110  void setAuthor( const QString& );
111  void setDate( const QDateTime& );
112  void setMessage(const QString& );
113  void setItems( const QList<VcsItemEvent>& );
114  void addItem(const VcsItemEvent& item);
115  VcsEvent& operator=( const VcsEvent& rhs);
116 
117 private:
118  QSharedDataPointer<class VcsEventPrivate> d;
119 };
120 
121 }
122 
123 #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
124 Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsItemEvent::Actions )
125 #endif
126 Q_DECLARE_METATYPE( KDevelop::VcsEvent )
127 Q_DECLARE_TYPEINFO( KDevelop::VcsEvent, Q_MOVABLE_TYPE );
128 Q_DECLARE_METATYPE( KDevelop::VcsItemEvent )
129 Q_DECLARE_TYPEINFO( KDevelop::VcsItemEvent, Q_MOVABLE_TYPE );
130 
131 #endif
KDevelop::VcsItemEvent
Small container class that contains information about a history event of a single repository item.
Definition: vcsevent.h:42
QSharedDataPointer< class VcsItemEventPrivate >
KDevelop::VcsRevision
Encapsulates a vcs revision number, date or range of revisions.
Definition: vcsrevision.h:66
QList
Definition: vcsannotationmodel.h:31
KDevelop::VcsEvent
Small container class that contains information about a single revision.
Definition: vcsevent.h:96
QString
KDevelop
Definition: dvcsevent.h:33
QDateTime
KDevelop::VcsItemEvent::Action
Action
Class that tells you what happened to a given repository location in a specific revision.
Definition: vcsevent.h:52
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(KDevelop::VcsEvent, Q_MOVABLE_TYPE)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 09:41:52 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