Annotate Class Reference

#include <annotate.h>

List of all members.

Public Member Functions

 Annotate (Git *parent, QObject *guiObj)
void deleteWhenDone ()
const FileAnnotationlookupAnnotation (SCRef sha, SCRef fileName)
bool start (const FileHistory *fh)
bool isValid ()
bool isCanceled ()
int count ()
int elapsed ()
const QString file ()
const QString getAncestor (SCRef sha, SCRef fileName, int *shaIdx)
bool getRange (SCRef sha, RangeInfo *r)
bool seekPosition (int *rangeStart, int *rangeEnd, SCRef fromSha, SCRef toSha)
const QString computeRanges (SCRef sha, int rStart, int rEnd, SCRef target="")

Private Types

typedef QMap
< QString,
FileAnnotation
AnnotateHistory
typedef QPair
< QString, uint > 
Key

Private Slots

void on_patchProc_readFromStdout ()
void on_patchProc_processExited ()
void on_progressTimer_timeout ()
void on_deleteWhenDone ()
void slotComputeDiffs ()

Private Member Functions

void annotateFileHistory (SCRef fileName, bool buildPatchScript)
void doAnnotate (SCRef fileName, SCRef sha, bool buildPatchScript)
FileAnnotationgetFileAnnotation (SCRef sha)
void setInitialAnnotation (SCRef fileName, SCRef sha, FileAnnotation *fa)
const QString setupAuthor (SCRef origAuthor, int annId)
void setAnnotation (SCRef diff, SCRef aut, SCList pAnn, QStringList &nAnn, int ofs=0)
bool getNextLine (SCRef d, int &idx, QString &line)
void updatePatchScript (SCRef sha, SCRef par)
bool startPatchProc (SCRef buf, SCRef fileName)
const QString getNextPatch (QString &patchFile, SCRef fileName, SCRef sha)
bool getNextSection (SCRef d, int &idx, QString &sec, SCRef target)
void updateRange (RangeInfo *r, SCRef diff, bool reverse)
void updateCrossRanges (SCRef cnk, bool rev, int oStart, int oLineCnt, RangeInfo *r)
bool isDescendant (SCRef sha, SCRef target)
 EM_DECLARE (exAnnCanceled)

Static Private Member Functions

static void unify (SList dst, SCList src)

Private Attributes

Gitgit
QObject * gui
const FileHistoryfh
AnnotateHistory ah
bool cancelingAnnotate
bool annotateRunning
bool annotateActivity
bool isError
int annNumLen
int annId
int annFilesNum
QString patchScript
QString fileName
StrVect histRevOrder
QProcess patchProc
QString patchProcBuf
QString nextFileSha
bool valid
bool canceled
QTime processingTime
QTimer progressTimer
QMap< Key, QString > diffMap
QMap< QString,
RangeInfo
rangeMap


Detailed Description

Definition at line 39 of file annotate.h.


Member Typedef Documentation

typedef QMap<QString, FileAnnotation> AnnotateHistory [private]

Definition at line 64 of file annotate.h.

typedef QPair<QString, uint> Key [private]

Definition at line 106 of file annotate.h.


Constructor & Destructor Documentation

Annotate ( Git parent,
QObject *  guiObj 
)

Definition at line 15 of file annotate.cpp.


Member Function Documentation

void deleteWhenDone (  ) 

Definition at line 72 of file annotate.cpp.

Referenced by Git::cancelAnnotate(), and slotComputeDiffs().

const FileAnnotation * lookupAnnotation ( SCRef  sha,
SCRef  fileName 
)

Definition at line 32 of file annotate.cpp.

Referenced by Git::lookupAnnotation().

bool start ( const FileHistory fh  ) 

Definition at line 102 of file annotate.cpp.

Referenced by getNextPatch(), Git::startAnnotate(), and updateRange().

bool isValid (  )  [inline]

Definition at line 46 of file annotate.h.

Referenced by Git::annotateExited().

bool isCanceled (  )  [inline]

Definition at line 47 of file annotate.h.

int count (  )  [inline]

Definition at line 48 of file annotate.h.

Referenced by Git::annotateExited().

int elapsed (  )  [inline]

Definition at line 49 of file annotate.h.

Referenced by Git::annotateExited().

const QString file (  )  [inline]

Definition at line 50 of file annotate.h.

Referenced by Git::annotateExited().

const QString getAncestor ( SCRef  sha,
SCRef  fileName,
int *  shaIdx 
)

Definition at line 699 of file annotate.cpp.

Referenced by computeRanges(), and lookupAnnotation().

bool getRange ( SCRef  sha,
RangeInfo r 
)

Definition at line 473 of file annotate.cpp.

bool seekPosition ( int *  rangeStart,
int *  rangeEnd,
SCRef  fromSha,
SCRef  toSha 
)

Definition at line 891 of file annotate.cpp.

const QString computeRanges ( SCRef  sha,
int  rStart,
int  rEnd,
SCRef  target = "" 
)

Definition at line 779 of file annotate.cpp.

Referenced by seekPosition().

void on_patchProc_readFromStdout (  )  [private, slot]

Definition at line 63 of file annotate.cpp.

Referenced by Annotate().

void on_patchProc_processExited (  )  [private, slot]

Definition at line 141 of file annotate.cpp.

Referenced by Annotate().

void on_progressTimer_timeout (  )  [private, slot]

Definition at line 94 of file annotate.cpp.

Referenced by start().

void on_deleteWhenDone (  )  [private, slot]

Definition at line 86 of file annotate.cpp.

Referenced by deleteWhenDone().

void slotComputeDiffs (  )  [private, slot]

Definition at line 148 of file annotate.cpp.

Referenced by on_patchProc_processExited(), and start().

void annotateFileHistory ( SCRef  fileName,
bool  buildPatchScript 
) [private]

Definition at line 182 of file annotate.cpp.

Referenced by slotComputeDiffs(), and start().

void doAnnotate ( SCRef  fileName,
SCRef  sha,
bool  buildPatchScript 
) [private]

Definition at line 193 of file annotate.cpp.

Referenced by annotateFileHistory().

FileAnnotation * getFileAnnotation ( SCRef  sha  )  [private]

Definition at line 260 of file annotate.cpp.

Referenced by doAnnotate().

void setInitialAnnotation ( SCRef  fileName,
SCRef  sha,
FileAnnotation fa 
) [private]

Definition at line 271 of file annotate.cpp.

Referenced by doAnnotate().

const QString setupAuthor ( SCRef  origAuthor,
int  annId 
) [private]

Definition at line 293 of file annotate.cpp.

Referenced by doAnnotate().

void setAnnotation ( SCRef  diff,
SCRef  aut,
SCList  pAnn,
QStringList &  nAnn,
int  ofs = 0 
) [private]

Definition at line 324 of file annotate.cpp.

Referenced by doAnnotate(), and updateCrossRanges().

bool getNextLine ( SCRef  d,
int &  idx,
QString &  line 
) [private]

void unify ( SList  dst,
SCList  src 
) [static, private]

Definition at line 315 of file annotate.cpp.

Referenced by doAnnotate().

void updatePatchScript ( SCRef  sha,
SCRef  par 
) [private]

Definition at line 397 of file annotate.cpp.

Referenced by doAnnotate().

bool startPatchProc ( SCRef  buf,
SCRef  fileName 
) [private]

Definition at line 52 of file annotate.cpp.

Referenced by start().

const QString getNextPatch ( QString &  patchFile,
SCRef  fileName,
SCRef  sha 
) [private]

Definition at line 406 of file annotate.cpp.

Referenced by doAnnotate().

bool getNextSection ( SCRef  d,
int &  idx,
QString &  sec,
SCRef  target 
) [private]

Definition at line 454 of file annotate.cpp.

Referenced by setAnnotation(), and updateRange().

void updateRange ( RangeInfo r,
SCRef  diff,
bool  reverse 
) [private]

Definition at line 605 of file annotate.cpp.

Referenced by computeRanges().

void updateCrossRanges ( SCRef  cnk,
bool  rev,
int  oStart,
int  oLineCnt,
RangeInfo r 
) [private]

Definition at line 483 of file annotate.cpp.

Referenced by updateRange().

bool isDescendant ( SCRef  sha,
SCRef  target 
) [private]

Definition at line 750 of file annotate.cpp.

Referenced by computeRanges().

EM_DECLARE ( exAnnCanceled   )  [private]


Member Data Documentation

Git* git [private]

Definition at line 84 of file annotate.h.

Referenced by Annotate(), computeRanges(), doAnnotate(), getAncestor(), getNextPatch(), isDescendant(), setInitialAnnotation(), slotComputeDiffs(), and startPatchProc().

QObject* gui [private]

Definition at line 85 of file annotate.h.

Referenced by Annotate(), and on_progressTimer_timeout().

const FileHistory* fh [private]

Definition at line 86 of file annotate.h.

Referenced by computeRanges(), doAnnotate(), isDescendant(), and start().

AnnotateHistory ah [private]

Definition at line 87 of file annotate.h.

Referenced by count(), getAncestor(), getFileAnnotation(), getNextPatch(), lookupAnnotation(), setInitialAnnotation(), slotComputeDiffs(), and start().

bool cancelingAnnotate [private]

Definition at line 88 of file annotate.h.

Referenced by Annotate(), annotateFileHistory(), deleteWhenDone(), doAnnotate(), getNextPatch(), on_progressTimer_timeout(), setInitialAnnotation(), slotComputeDiffs(), and start().

bool annotateRunning [private]

Definition at line 89 of file annotate.h.

Referenced by Annotate(), deleteWhenDone(), on_deleteWhenDone(), slotComputeDiffs(), and start().

bool annotateActivity [private]

Definition at line 90 of file annotate.h.

Referenced by Annotate(), and getAncestor().

bool isError [private]

Definition at line 91 of file annotate.h.

Referenced by annotateFileHistory(), doAnnotate(), getFileAnnotation(), on_progressTimer_timeout(), setAnnotation(), setInitialAnnotation(), slotComputeDiffs(), and start().

int annNumLen [private]

Definition at line 92 of file annotate.h.

Referenced by setupAuthor(), and start().

int annId [private]

Definition at line 93 of file annotate.h.

Referenced by start().

int annFilesNum [private]

Definition at line 94 of file annotate.h.

Referenced by on_patchProc_readFromStdout(), on_progressTimer_timeout(), and start().

QString patchScript [private]

Definition at line 95 of file annotate.h.

Referenced by start(), and updatePatchScript().

QString fileName [private]

Definition at line 96 of file annotate.h.

Referenced by computeRanges(), lookupAnnotation(), slotComputeDiffs(), and start().

StrVect histRevOrder [private]

Definition at line 97 of file annotate.h.

Referenced by annotateFileHistory(), computeRanges(), getAncestor(), on_patchProc_readFromStdout(), and start().

QProcess patchProc [private]

Definition at line 98 of file annotate.h.

Referenced by Annotate(), deleteWhenDone(), on_patchProc_readFromStdout(), and startPatchProc().

QString patchProcBuf [private]

Definition at line 99 of file annotate.h.

Referenced by Annotate(), doAnnotate(), on_patchProc_readFromStdout(), slotComputeDiffs(), and startPatchProc().

QString nextFileSha [private]

Definition at line 100 of file annotate.h.

Referenced by getNextPatch(), and slotComputeDiffs().

bool valid [private]

Definition at line 101 of file annotate.h.

Referenced by Annotate(), computeRanges(), getRange(), isValid(), lookupAnnotation(), slotComputeDiffs(), and start().

bool canceled [private]

Definition at line 102 of file annotate.h.

Referenced by Annotate(), computeRanges(), getRange(), isCanceled(), and slotComputeDiffs().

QTime processingTime [private]

Definition at line 103 of file annotate.h.

Referenced by Annotate(), and elapsed().

QTimer progressTimer [private]

Definition at line 104 of file annotate.h.

Referenced by on_patchProc_processExited(), and start().

QMap<Key, QString> diffMap [private]

Definition at line 107 of file annotate.h.

Referenced by computeRanges(), getNextPatch(), and slotComputeDiffs().

QMap<QString, RangeInfo> rangeMap [private]

Definition at line 108 of file annotate.h.

Referenced by computeRanges(), getRange(), and seekPosition().


The documentation for this class was generated from the following files:
Generated on Fri Dec 7 21:57:39 2007 for QGit by  doxygen 1.5.3