vcs
vcsannotation.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 VCSANNOTATION_H 00023 #define VCSANNOTATION_H 00024 00025 #include "vcsexport.h" 00026 #include <QtCore/QVariant> 00027 00028 class QString; 00029 class QDateTime; 00030 class KUrl; 00031 00032 namespace KDevelop 00033 { 00034 class VcsRevision; 00035 00039 class KDEVPLATFORMVCS_EXPORT VcsAnnotationLine 00040 { 00041 public: 00042 VcsAnnotationLine(); 00043 VcsAnnotationLine( const VcsAnnotationLine& ); 00044 virtual ~VcsAnnotationLine(); 00048 int lineNumber() const; 00052 QString text() const; 00056 QString author() const; 00060 VcsRevision revision() const; 00064 QDateTime date() const; 00069 void setLineNumber( int ); 00074 void setText( const QString& ); 00079 void setAuthor( const QString& ); 00084 void setRevision( const VcsRevision& ); 00089 void setDate( const QDateTime& ); 00090 VcsAnnotationLine& operator=( const VcsAnnotationLine& rhs); 00091 private: 00092 class VcsAnnotationLinePrivate* d; 00093 }; 00094 00102 class KDEVPLATFORMVCS_EXPORT VcsAnnotation 00103 { 00104 public: 00105 VcsAnnotation(); 00106 VcsAnnotation(const VcsAnnotation&); 00107 virtual ~VcsAnnotation(); 00111 KUrl location() const; 00115 int lineCount() const; 00116 00120 VcsAnnotationLine line( int linenumber ) const; 00121 00130 void insertLine( int lineno, const VcsAnnotationLine& ); 00131 00135 void setLocation( const KUrl& ); 00136 00137 VcsAnnotation& operator=( const VcsAnnotation& rhs); 00138 private: 00139 class VcsAnnotationPrivate* const d; 00140 }; 00141 00142 } 00143 00144 Q_DECLARE_METATYPE( KDevelop::VcsAnnotation ) 00145 Q_DECLARE_METATYPE( KDevelop::VcsAnnotationLine ) 00146 00147 #endif 00148
KDE 4.2 API Reference