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

vcs

vcsevent.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 VCSEVENT_H
00023 #define VCSEVENT_H
00024 
00025 #include <QtCore/QVariant>
00026 
00027 #include "vcsexport.h"
00028 
00029 class QString;
00030 class QDateTime;
00031 template <typename T> class QList;
00032 
00033 namespace KDevelop
00034 {
00035 class VcsRevision;
00036 
00041 class KDEVPLATFORMVCS_EXPORT VcsItemEvent
00042 {
00043 public:
00051     enum Action
00052     {
00053         Added            = 1<<0 ,
00054         Deleted          = 1<<1 ,
00055         Modified         = 1<<2 ,
00056         Copied           = 1<<3 ,
00057         Merged           = 1<<4 ,
00058         ContentsModified = 1<<5 ,
00059         Replaced         = 1<<6 
00060     };
00061     Q_DECLARE_FLAGS( Actions, Action )
00062 
00063     VcsItemEvent();
00064     virtual ~VcsItemEvent();
00065     VcsItemEvent(const VcsItemEvent& );
00066 
00067     QString repositoryLocation() const;
00068     QString repositoryCopySourceLocation() const; // may be empty
00069     VcsRevision repositoryCopySourceRevision() const; // may be invalid, even if rCSL is not
00070     VcsRevision revision() const; // the FileNumber revision, may be the same as the GlobalNumber
00071     Actions actions() const;
00072 
00073     void setRepositoryLocation( const QString& );
00074     void setRepositoryCopySourceLocation( const QString& );
00075     void setRevision( const KDevelop::VcsRevision& );
00076     void setRepositoryCopySourceRevision( const KDevelop::VcsRevision& );
00077     void setActions( Actions );
00078 
00079     VcsItemEvent& operator=( const VcsItemEvent& rhs);
00080 private:
00081     class VcsItemEventPrivate* const d;
00082 };
00083 
00092 class KDEVPLATFORMVCS_EXPORT VcsEvent
00093 {
00094 public:
00095     VcsEvent();
00096     virtual ~VcsEvent();
00097     VcsEvent( const VcsEvent& );
00098     VcsRevision revision();
00099     QString author();
00100     QDateTime date();
00101     QString message();
00102     VcsItemEvent::Actions actions();
00103     QList<VcsItemEvent> items();
00104 
00105     void setRevision( const VcsRevision& );
00106     void setAuthor( const QString& );
00107     void setDate( const QDateTime& );
00108     void setMessage(const QString& );
00109     void setActions( VcsItemEvent::Actions );
00110     void setItems( const QList<VcsItemEvent>& );
00111     VcsEvent& operator=( const VcsEvent& rhs);
00112 private:
00113     class VcsEventPrivate* const d;
00114 };
00115 
00116 }
00117 
00118 Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsItemEvent::Actions )
00119 Q_DECLARE_METATYPE( KDevelop::VcsEvent )
00120 Q_DECLARE_METATYPE( KDevelop::VcsItemEvent )
00121 #endif
00122 

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