vcs
vcsdiff.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef VCSDIFF_H
00023 #define VCSDIFF_H
00024
00025
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