PatchView Class Reference

#include <patchview.h>

Inheritance diagram for PatchView:

Domain

List of all members.

Public Slots

void on_lineEditDiff_returnPressed ()
void on_buttonGroupDiff_clicked (int)
void on_buttonFilterPatch_clicked ()
void on_procDataReady (const QByteArray &)
void on_eof ()
void on_highlightPatch (const QString &, bool)
void on_updateRevDesc ()
void on_closeAllTabs ()

Signals

void diffTo (const QString &)
void diffViewerDocked ()
void updateRequested (StateInfo newSt)
void cancelDomainProcesses ()

Public Member Functions

 PatchView ()
 PatchView (MainImpl *mi, Git *g)
 ~PatchView ()
void clear (bool complete=true)
virtual TabPatch * tab ()
void deleteWhenDone ()
void setThrowOnDelete (bool b)
bool isThrowOnDeleteRaised (int excpId, SCRef curContext)
MainImplm () const
const QString dragHostName () const
bool isReadyToDrag () const
bool setReadyToDrag (bool b)
bool isDragging () const
bool setDragging (bool b)
bool isDropping () const
void setDropping (bool b)
bool isLinked () const
int tabPos () const

Public Attributes

StateInfo st

Protected Slots

virtual void on_contextMenu (const QString &, int)
void on_tabClosed (int)
void on_updateRequested (StateInfo newSt)
void on_deleteWhenDone ()

Protected Member Functions

virtual bool doUpdate (bool force)
virtual void customEvent (QCustomEvent *e)
void linkDomain (Domain *d)
void unlinkDomain (Domain *d)

Protected Attributes

Gitgit
bool busy
int tabPosition

Private Types

enum  ButtonId { DIFF_TO_PARENT = 0, DIFF_TO_HEAD = 1, DIFF_TO_SHA = 2 }
enum  PatchFilter { VIEW_ALL, VIEW_ADDED, VIEW_REMOVED }
typedef QValueVector
< MatchSelection
Matches

Private Member Functions

void updatePatch ()
void centerOnFileHeader (const QString &fileName)
void centerTarget ()
void saveRestoreSizes (bool startup=false)
int doSearch (const QString &txt, int pos)
void computeMatches ()
bool getMatch (int para, int *indexFrom, int *indexTo)
void centerMatch (uint id=0)
const QString processData (const QByteArray &fileChunk, int *prevLineNum=NULL)

Private Attributes

TabPatch * patchTab
DiffHighlighterdiffHighlighter
ListBoxFileslistBoxFiles
QGuardedPtr< MyProcessproc
QByteArray patchRowData
QString target
QString partialParagraphs
QString normalizedSha
bool seekTarget
bool diffLoaded
bool isRegExp
QRegExp pickAxeRE
PatchFilter curFilter
PatchFilter prevFilter
Matches matches

Friends

class DiffHighlighter

Classes

struct  MatchSelection


Detailed Description

Definition at line 30 of file patchview.h.


Member Typedef Documentation

typedef QValueVector<MatchSelection> Matches [private]

Definition at line 103 of file patchview.h.


Member Enumeration Documentation

enum ButtonId [private]

Enumerator:
DIFF_TO_PARENT 
DIFF_TO_HEAD 
DIFF_TO_SHA 

Definition at line 84 of file patchview.h.

enum PatchFilter [private]

Enumerator:
VIEW_ALL 
VIEW_ADDED 
VIEW_REMOVED 

Definition at line 90 of file patchview.h.


Constructor & Destructor Documentation

PatchView (  )  [inline]

Definition at line 33 of file patchview.h.

PatchView ( MainImpl mi,
Git g 
)

Definition at line 97 of file patchview.cpp.

~PatchView (  ) 

Definition at line 131 of file patchview.cpp.


Member Function Documentation

void clear ( bool  complete = true  ) 

Definition at line 145 of file patchview.cpp.

Referenced by updatePatch().

virtual TabPatch* tab (  )  [inline, virtual]

Implements Domain.

Definition at line 37 of file patchview.h.

Referenced by MainImpl::ActSplitView_activated().

void diffTo ( const QString &   )  [signal]

void diffViewerDocked (  )  [signal]

void on_lineEditDiff_returnPressed (  )  [slot]

Definition at line 398 of file patchview.cpp.

Referenced by PatchView(), and updatePatch().

void on_buttonGroupDiff_clicked ( int  diffType  )  [slot]

Definition at line 407 of file patchview.cpp.

Referenced by on_lineEditDiff_returnPressed(), and PatchView().

void on_buttonFilterPatch_clicked (  )  [slot]

Definition at line 160 of file patchview.cpp.

Referenced by PatchView().

void on_procDataReady ( const QByteArray &  data  )  [slot]

Definition at line 230 of file patchview.cpp.

void on_eof (  )  [slot]

Definition at line 326 of file patchview.cpp.

Referenced by on_highlightPatch().

void on_highlightPatch ( const QString &  exp,
bool  re 
) [slot]

Definition at line 390 of file patchview.cpp.

void on_updateRevDesc (  )  [slot]

Definition at line 432 of file patchview.cpp.

Referenced by doUpdate().

void on_contextMenu ( const QString &  data,
int  type 
) [protected, virtual, slot]

Reimplemented from Domain.

Definition at line 200 of file patchview.cpp.

Referenced by PatchView().

bool doUpdate ( bool  force  )  [protected, virtual]

Implements Domain.

Definition at line 469 of file patchview.cpp.

void updatePatch (  )  [private]

Definition at line 440 of file patchview.cpp.

Referenced by doUpdate().

void centerOnFileHeader ( const QString &  fileName  )  [private]

Definition at line 187 of file patchview.cpp.

Referenced by doUpdate().

void centerTarget (  )  [private]

Definition at line 206 of file patchview.cpp.

Referenced by centerOnFileHeader(), and on_procDataReady().

void saveRestoreSizes ( bool  startup = false  )  [private]

int doSearch ( const QString &  txt,
int  pos 
) [private]

Definition at line 338 of file patchview.cpp.

Referenced by computeMatches().

void computeMatches (  )  [private]

Definition at line 346 of file patchview.cpp.

Referenced by on_eof().

bool getMatch ( int  para,
int *  indexFrom,
int *  indexTo 
) [private]

Definition at line 378 of file patchview.cpp.

Referenced by DiffHighlighter::highlightParagraph().

void centerMatch ( uint  id = 0  )  [private]

Definition at line 221 of file patchview.cpp.

Referenced by on_eof().

const QString processData ( const QByteArray &  fileChunk,
int *  prevLineNum = NULL 
) [private]

Definition at line 256 of file patchview.cpp.

Referenced by on_buttonFilterPatch_clicked(), on_eof(), and on_procDataReady().

void deleteWhenDone (  )  [inherited]

Definition at line 111 of file domain.cpp.

Referenced by MainImpl::pushButtonCloseTab_clicked().

void setThrowOnDelete ( bool  b  )  [inherited]

Definition at line 135 of file domain.cpp.

Referenced by FileContent::lookupAnnotation(), FileContent::rangeFilter(), and Domain::update().

bool isThrowOnDeleteRaised ( int  excpId,
SCRef  curContext 
) [inherited]

Definition at line 143 of file domain.cpp.

Referenced by FileContent::lookupAnnotation(), FileContent::rangeFilter(), and Domain::update().

MainImpl * m (  )  const [inherited]

Definition at line 148 of file domain.cpp.

Referenced by FileView::clear(), Domain::customEvent(), RevsView::doUpdate(), doUpdate(), FileView::doUpdate(), Domain::dragHostName(), FileView::FileView(), FileView::filterOnRange(), TreeView::initMimePix(), FileContent::on_annotateReady(), RevsView::on_droppedRevisions(), FileView::on_loadCompleted(), FileView::on_toolButtonRangeFilter_toggled(), RevsView::on_updateRevDesc(), on_updateRevDesc(), PatchView(), RevsView::RevsView(), Domain::sendPopupEvent(), Domain::update(), RevsView::updateLineEditSHA(), FileView::updateProgressBar(), RevsView::viewPatch(), FileView::~FileView(), and ~PatchView().

const QString dragHostName (  )  const [inherited]

Definition at line 153 of file domain.cpp.

Referenced by ListView::on_onItem().

bool isReadyToDrag (  )  const [inline, inherited]

Definition at line 109 of file domain.h.

Referenced by ListBoxFiles::mouseMoved(), and ListView::on_onItem().

bool setReadyToDrag ( bool  b  )  [inherited]

Definition at line 158 of file domain.cpp.

Referenced by ListView::on_clicked(), ListBoxFiles::on_clicked(), ListView::on_mouseButtonPressed(), ListBoxFiles::on_mouseButtonPressed(), and Domain::update().

bool isDragging (  )  const [inline, inherited]

Definition at line 111 of file domain.h.

bool setDragging ( bool  b  )  [inherited]

Definition at line 164 of file domain.cpp.

Referenced by ListBoxFiles::mouseMoved(), and ListView::on_onItem().

bool isDropping (  )  const [inline, inherited]

Definition at line 113 of file domain.h.

Referenced by RevsView::on_droppedRevisions().

void setDropping ( bool  b  )  [inline, inherited]

Definition at line 114 of file domain.h.

Referenced by RevsView::on_droppedRevisions().

bool isLinked (  )  const [inline, inherited]

Definition at line 115 of file domain.h.

Referenced by doUpdate(), and on_contextMenu().

int tabPos (  )  const [inline, inherited]

Definition at line 116 of file domain.h.

Referenced by MainImpl::accelActivated(), MainImpl::ActViewRev_activated(), MainImpl::currentTabType(), MainImpl::openFileTab(), and RevsView::viewPatch().

void updateRequested ( StateInfo  newSt  )  [signal, inherited]

Referenced by Domain::linkDomain(), Domain::unlinkDomain(), and Domain::update().

void cancelDomainProcesses (  )  [signal, inherited]

Referenced by Domain::deleteWhenDone(), and Domain::update().

void on_closeAllTabs (  )  [slot, inherited]

Definition at line 106 of file domain.cpp.

Referenced by RevsView::viewPatch().

void on_tabClosed ( int  tabPos  )  [protected, slot, inherited]

Definition at line 129 of file domain.cpp.

Referenced by Domain::Domain().

void on_updateRequested ( StateInfo  newSt  )  [protected, slot, inherited]

Definition at line 194 of file domain.cpp.

Referenced by Domain::linkDomain().

void on_deleteWhenDone (  )  [protected, slot, inherited]

Definition at line 121 of file domain.cpp.

Referenced by Domain::deleteWhenDone().

void customEvent ( QCustomEvent *  e  )  [protected, virtual, inherited]

Reimplemented in FileView.

Definition at line 210 of file domain.cpp.

Referenced by FileView::customEvent(), and RevsView::doUpdate().

void linkDomain ( Domain d  )  [protected, inherited]

Definition at line 187 of file domain.cpp.

Referenced by RevsView::viewPatch().

void unlinkDomain ( Domain d  )  [protected, inherited]

Definition at line 179 of file domain.cpp.

Referenced by Domain::linkDomain().


Friends And Related Function Documentation

friend class DiffHighlighter [friend]

Definition at line 59 of file patchview.h.

Referenced by PatchView().


Member Data Documentation

TabPatch* patchTab [private]

Definition at line 71 of file patchview.h.

Referenced by centerMatch(), centerTarget(), clear(), computeMatches(), doUpdate(), on_buttonFilterPatch_clicked(), on_buttonGroupDiff_clicked(), on_eof(), on_lineEditDiff_returnPressed(), on_procDataReady(), on_updateRevDesc(), PatchView(), tab(), updatePatch(), and ~PatchView().

DiffHighlighter* diffHighlighter [private]

Definition at line 72 of file patchview.h.

Referenced by on_eof(), PatchView(), updatePatch(), and ~PatchView().

ListBoxFiles* listBoxFiles [private]

Definition at line 73 of file patchview.h.

Referenced by clear(), doUpdate(), PatchView(), and ~PatchView().

QGuardedPtr<MyProcess> proc [private]

Definition at line 74 of file patchview.h.

Referenced by updatePatch(), and ~PatchView().

QByteArray patchRowData [private]

Definition at line 75 of file patchview.h.

Referenced by clear(), on_buttonFilterPatch_clicked(), on_eof(), and on_procDataReady().

QString target [private]

Definition at line 76 of file patchview.h.

Referenced by centerOnFileHeader(), centerTarget(), clear(), and on_procDataReady().

QString partialParagraphs [private]

Definition at line 77 of file patchview.h.

Referenced by clear(), on_buttonFilterPatch_clicked(), and processData().

QString normalizedSha [private]

Definition at line 78 of file patchview.h.

Referenced by on_buttonGroupDiff_clicked(), and updatePatch().

bool seekTarget [private]

Definition at line 79 of file patchview.h.

Referenced by centerOnFileHeader(), centerTarget(), clear(), on_procDataReady(), and PatchView().

bool diffLoaded [private]

Definition at line 80 of file patchview.h.

Referenced by clear(), on_eof(), on_highlightPatch(), and PatchView().

bool isRegExp [private]

Definition at line 81 of file patchview.h.

Referenced by computeMatches(), doSearch(), and on_highlightPatch().

QRegExp pickAxeRE [private]

Definition at line 82 of file patchview.h.

Referenced by computeMatches(), doSearch(), on_highlightPatch(), and PatchView().

PatchFilter curFilter [private]

Definition at line 95 of file patchview.h.

Referenced by on_buttonFilterPatch_clicked(), PatchView(), and processData().

PatchFilter prevFilter [private]

Definition at line 95 of file patchview.h.

Referenced by on_buttonFilterPatch_clicked(), PatchView(), and processData().

Matches matches [private]

Definition at line 104 of file patchview.h.

Referenced by centerMatch(), clear(), computeMatches(), getMatch(), and DiffHighlighter::highlightParagraph().

StateInfo st [inherited]

Definition at line 119 of file domain.h.

Referenced by MainImpl::ActCheckWorkDir_toggled(), MainImpl::ActSaveFile_activated(), MainImpl::ActViewDiff_activated(), MainImpl::ActViewRev_activated(), centerOnFileHeader(), RevsView::clear(), clear(), FileView::clear(), Domain::customEvent(), Domain::Domain(), RevsView::doUpdate(), doUpdate(), FileView::doUpdate(), FileContent::FileContent(), MainImpl::filterList(), Domain::flushQueue(), MainImpl::getExternalDiffArgs(), MainImpl::lineEditSHA_returnPressed(), ListBoxFiles::ListBoxFiles(), ListView::ListView(), on_buttonGroupDiff_clicked(), Domain::on_contextMenu(), MainImpl::on_fileList_doubleClicked(), MainImpl::on_goRef_activated(), RevsView::on_lanesContextMenuRequested(), RevDesc::on_linkClicked(), RevsView::on_loadCompleted(), FileView::on_spinBoxRevision_valueChanged(), Domain::on_updateRequested(), RevsView::on_updateRevDesc(), on_updateRevDesc(), MainImpl::openFileTab(), Domain::populateState(), TreeView::TreeView(), Domain::update(), RevsView::updateLineEditSHA(), updatePatch(), FileView::updateProgressBar(), and RevsView::viewPatch().

Git* git [protected, inherited]

Definition at line 140 of file domain.h.

Referenced by centerOnFileHeader(), RevsView::doUpdate(), doUpdate(), FileView::doUpdate(), FileView::FileView(), on_buttonGroupDiff_clicked(), RevsView::on_droppedRevisions(), RevsView::on_lanesContextMenuRequested(), RevsView::on_loadCompleted(), RevsView::on_updateRevDesc(), on_updateRevDesc(), PatchView(), Domain::populateState(), RevsView::RevsView(), Domain::update(), FileView::updateEnabledButtons(), updatePatch(), RevsView::viewPatch(), and ~PatchView().

bool busy [protected, inherited]

Definition at line 141 of file domain.h.

Referenced by Domain::customEvent(), Domain::Domain(), Domain::flushQueue(), Domain::on_contextMenu(), Domain::setReadyToDrag(), and Domain::update().

int tabPosition [protected, inherited]

Definition at line 142 of file domain.h.

Referenced by Domain::Domain(), FileView::FileView(), Domain::on_tabClosed(), PatchView(), RevsView::RevsView(), and Domain::tabPos().


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