• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

vcs

vcsrevision.h

00001 /* This file is part of KDevelop
00002  *
00003  * Copyright 2007 Andreas Pakulat <apaku@gmx.de>
00004  * Copyright 2007 Matthew Woehlke <mw_triad@users.sourceforge.net>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301, USA.
00020  */
00021 
00022 #ifndef VCSREVISION_H
00023 #define VCSREVISION_H
00024 
00025 #include "vcsexport.h"
00026 #include <QtCore/QVariant>
00027 class QStringList;
00028 class QString;
00029 
00030 namespace KDevelop
00031 {
00032 
00065 class KDEVPLATFORMVCS_EXPORT VcsRevision
00066 {
00067 public:
00068 
00075     enum RevisionType
00076     {
00077         Special = 0         ,
00078         GlobalNumber = 1    ,
00079         FileNumber = 2      ,
00080         Date = 3,           
00081         Invalid = 4         ,
00082         UserType = 1000     
00083     };
00084     enum RevisionSpecialType
00085     {
00086         Head = 0                   ,
00087         Working = 1                ,
00088         Base = 2                   ,
00089         Previous = 3               ,
00090         Start = 4,                 
00091         UserSpecialType = 1000     
00092     };
00093 
00094     VcsRevision();
00095     virtual ~VcsRevision();
00096 
00097     VcsRevision( const VcsRevision& );
00098 
00099     VcsRevision& operator=( const VcsRevision& );
00100 
00104     void setRevisionValue( const QVariant& rev, RevisionType type );
00105 
00109     RevisionType revisionType() const;
00110 
00121     QVariant revisionValue() const;
00122 
00129     QString prettyValue() const;
00130 
00131     bool operator==( const KDevelop::VcsRevision&) const;
00132 
00136     static VcsRevision createSpecialRevision( VcsRevision::RevisionSpecialType type );
00137 protected:
00141     QStringList keys() const;
00146     QVariant getValue( const QString& key ) const;
00150     void setValue( const QString& key, const QVariant& value );
00151 
00155     void setType( RevisionType t);
00156     void setSpecialType( RevisionSpecialType t);
00157     void setValue( const QVariant& );
00158 
00159 
00160 private:
00161     class VcsRevisionPrivate* const d;
00162 };
00163 
00164 KDEVPLATFORMVCS_EXPORT uint qHash( const KDevelop::VcsRevision& rev);
00165 
00166 }
00167 
00168 Q_DECLARE_METATYPE(KDevelop::VcsRevision)
00169 Q_DECLARE_METATYPE(KDevelop::VcsRevision::RevisionSpecialType)
00170 
00171 
00172 
00173 #endif
00174 

vcs

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal