• 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
vcsrevision.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  *
3  * Copyright 2007 Andreas Pakulat <[email protected]e>
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_VCSREVISION_H
23 #define KDEVPLATFORM_VCSREVISION_H
24 
25 #include "vcsexport.h"
26 #include <QVariant>
27 #include <QSharedDataPointer>
28 class QStringList;
29 class QString;
30 
31 namespace KDevelop
32 {
33 
66 class KDEVPLATFORMVCS_EXPORT VcsRevision
67 {
68 public:
69 
76  enum RevisionType
77  {
78  Special = 0 ,
79  GlobalNumber = 1 ,
80  FileNumber = 2 ,
81  Date = 3,
82  Invalid = 4 ,
83  UserType = 1000
84  };
85  enum RevisionSpecialType
86  {
87  Head = 0 ,
88  Working = 1 ,
89  Base = 2 ,
90  Previous = 3 ,
91  Start = 4,
92  UserSpecialType = 1000
93  };
94 
98  VcsRevision();
99  virtual ~VcsRevision();
100 
101  VcsRevision( const VcsRevision& );
102 
103  VcsRevision& operator=( const VcsRevision& );
104 
108  void setRevisionValue( const QVariant& rev, RevisionType type );
109 
113  RevisionType revisionType() const;
114 
115  RevisionSpecialType specialType() const;
116 
122  QVariant revisionValue() const;
123 
130  QString prettyValue() const;
131 
132  bool operator==( const KDevelop::VcsRevision&) const;
133 
137  static VcsRevision createSpecialRevision( KDevelop::VcsRevision::RevisionSpecialType type );
138 protected:
142  QStringList keys() const;
147  QVariant value(const QString& key) const;
151  void setValue( const QString& key, const QVariant& value );
152 
156  void setType( RevisionType t);
157  void setSpecialType( RevisionSpecialType t);
158  void setValue( const QVariant& );
159 
160 
161 private:
162  QSharedDataPointer<class VcsRevisionPrivate> d;
163 };
164 
165 KDEVPLATFORMVCS_EXPORT uint qHash( const KDevelop::VcsRevision& rev);
166 
167 }
168 
169 Q_DECLARE_METATYPE(KDevelop::VcsRevision)
170 Q_DECLARE_TYPEINFO(KDevelop::VcsRevision, Q_MOVABLE_TYPE);
171 Q_DECLARE_METATYPE(KDevelop::VcsRevision::RevisionSpecialType)
172 
173 
174 
175 #endif
176 
QSharedDataPointer< class VcsRevisionPrivate >
KDevelop::VcsRevision
Encapsulates a vcs revision number, date or range of revisions.
Definition: vcsrevision.h:66
KDevelop::VcsRevision::RevisionType
RevisionType
Definition: vcsrevision.h:76
KDevelop::qHash
uint qHash(const KDevelop::VcsLocation &loc)
Definition: vcslocation.h:141
KDevelop::VcsRevision::RevisionSpecialType
RevisionSpecialType
Definition: vcsrevision.h:85
QString
KDevelop::operator==
bool operator==(const KDevelop::VcsLocation &lhs, const KDevelop::VcsLocation &rhs)
Definition: vcslocation.h:152
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(KDevelop::VcsRevision, Q_MOVABLE_TYPE)
KDevelop
Definition: dvcsevent.h:33
QVariant
QStringList
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Mar 7 2021 23:30:30 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