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

vcs

vcsdiff.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 VCSDIFF_H
00023 #define VCSDIFF_H
00024 
00025 //Needed first as it provides a hash-function for QHash
00026 #include "vcslocation.h"
00027 
00028 #include <QtCore/QHash>
00029 
00030 #include "vcsexport.h"
00031 
00032 class QString;
00033 class QByteArray;
00034 
00035 namespace KDevelop
00036 {
00037 
00038 class KDEVPLATFORMVCS_EXPORT VcsDiff
00039 {
00040 public:
00046     enum Type
00047     {
00048         DiffRaw         ,
00049         DiffUnified     ,
00050         DiffDontCare    
00051     };
00052 
00053     enum Content
00054     {
00055         Binary          ,
00056         Text            
00057     };
00058 
00059     VcsDiff();
00060     virtual ~VcsDiff();
00061     VcsDiff( const VcsDiff& );
00062 
00066     Type type() const;
00067 
00071     Content contentType() const;
00072 
00077     QHash<KDevelop::VcsLocation, QByteArray> leftBinaries() const;
00078 
00083     QHash<KDevelop::VcsLocation, QByteArray> rightBinaries() const;
00084 
00089     QHash<KDevelop::VcsLocation, QString> leftTexts() const;
00090 
00095     QHash<KDevelop::VcsLocation, QString> rightTexts() const;
00096 
00102     QString diff() const;
00103 
00104     void setDiff( const QString& );
00105     void addLeftBinary( const KDevelop::VcsLocation&, const QByteArray& );
00106     void removeLeftBinary( const KDevelop::VcsLocation& );
00107     void addRightBinary( const KDevelop::VcsLocation&, const QByteArray& );
00108     void removeRightBinary( const KDevelop::VcsLocation& );
00109 
00110     void addLeftText( const KDevelop::VcsLocation&, const QString& );
00111     void removeLeftText( const KDevelop::VcsLocation& );
00112     void addRightText( const KDevelop::VcsLocation&, const QString& );
00113     void removeRightText( const KDevelop::VcsLocation& );
00114 
00115     void setType( Type );
00116     void setContentType( Content );
00117     VcsDiff& operator=( const VcsDiff& rhs);
00118 private:
00119     class VcsDiffPrivate* const d;
00120 };
00121 
00122 }
00123 
00124 Q_DECLARE_METATYPE( KDevelop::VcsDiff )
00125 
00126 #endif
00127 

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