Kate::TextHistory

Kate::TextHistory Class Reference

#include <katetexthistory.h>

Public Member Functions

qint64 lastSavedRevision () const
 
void lockRevision (qint64 revision)
 
qint64 revision () const
 
void transformCursor (int &line, int &column, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)
 
void transformRange (KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors, KTextEditor::MovingRange::EmptyBehavior emptyBehavior, qint64 fromRevision, qint64 toRevision=-1)
 
void unlockRevision (qint64 revision)
 

Detailed Description

Class representing the editing history of a TextBuffer.

Definition at line 38 of file katetexthistory.h.

Member Function Documentation

qint64 Kate::TextHistory::lastSavedRevision ( ) const
inline

Last revision the buffer got successful saved.

Returns
last revision buffer got saved, -1 if none

Definition at line 54 of file katetexthistory.h.

void Kate::TextHistory::lockRevision ( qint64  revision)

Lock a revision, this will keep it around until released again.

But all revisions will always be cleared on buffer clear() (and therefor load())

Parameters
revisionrevision to lock

some invariants must hold

increment revision reference counter

Definition at line 143 of file katetexthistory.cpp.

qint64 Kate::TextHistory::revision ( ) const

Current revision, just relay the revision of the buffer.

Returns
current revision

Definition at line 39 of file katetexthistory.cpp.

void Kate::TextHistory::transformCursor ( int &  line,
int &  column,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)

Transform a cursor from one revision to an other.

Parameters
lineline number of the cursor to transform
columncolumn number of the cursor to transform
insertBehaviorbehavior of this cursor on insert of text at its position
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision

-1 special meaning for from/toRevision

shortcut, same revision

some invariants must hold

transform cursor

forward or reverse transform?

Definition at line 457 of file katetexthistory.cpp.

void Kate::TextHistory::transformRange ( KTextEditor::Range range,
KTextEditor::MovingRange::InsertBehaviors  insertBehaviors,
KTextEditor::MovingRange::EmptyBehavior  emptyBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)

Transform a range from one revision to an other.

Parameters
rangerange to transform
insertBehaviorsbehavior of this range on insert of text at its position
emptyBehaviorbehavior on becoming empty
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision

invalidate on empty?

-1 special meaning for from/toRevision

shortcut, same revision

some invariants must hold

transform cursors

forward or reverse transform?

Definition at line 508 of file katetexthistory.cpp.

void Kate::TextHistory::unlockRevision ( qint64  revision)

Release a revision.

Parameters
revisionrevision to release

some invariants must hold

decrement revision reference counter

clean up no longer used revisions...

search for now unused stuff

remove unreferred from the list now

Definition at line 159 of file katetexthistory.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Aug 8 2020 22:56:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.