Kate::TextHistory

Search for usage in LXR

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 23 of file katetexthistory.h.

Member Function Documentation

◆ lastSavedRevision()

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 39 of file katetexthistory.h.

◆ lockRevision()

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

Definition at line 115 of file katetexthistory.cpp.

◆ revision()

qint64 Kate::TextHistory::revision ( ) const

Current revision, just relay the revision of the buffer.

Returns
current revision

Definition at line 23 of file katetexthistory.cpp.

◆ transformCursor()

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

Definition at line 353 of file katetexthistory.cpp.

◆ transformRange()

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

Definition at line 394 of file katetexthistory.cpp.

◆ unlockRevision()

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

Release a revision.

Parameters
revisionrevision to release

Definition at line 127 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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.