KTextEditor::MovingInterface

Search for usage in LXR

#include <KTextEditor/MovingInterface>

Inheritance diagram for KTextEditor::MovingInterface:

Public Member Functions

 MovingInterface ()
 
virtual ~MovingInterface ()
 
void aboutToDeleteMovingInterfaceContent (KTextEditor::Document *document)
 
void aboutToInvalidateMovingInterfaceContent (KTextEditor::Document *document)
 
virtual qint64 lastSavedRevision () const =0
 
virtual void lockRevision (qint64 revision)=0
 
virtual MovingCursornewMovingCursor (const Cursor &position, MovingCursor::InsertBehavior insertBehavior=MovingCursor::MoveOnInsert)=0
 
virtual MovingRangenewMovingRange (const Range &range, MovingRange::InsertBehaviors insertBehaviors=MovingRange::DoNotExpand, MovingRange::EmptyBehavior emptyBehavior=MovingRange::AllowEmpty)=0
 
virtual qint64 revision () const =0
 
virtual void transformCursor (int &line, int &column, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)=0
 
virtual void transformCursor (KTextEditor::Cursor &cursor, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)=0
 
virtual void transformRange (KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors, MovingRange::EmptyBehavior emptyBehavior, qint64 fromRevision, qint64 toRevision=-1)=0
 
virtual void unlockRevision (qint64 revision)=0
 

Detailed Description

Document interface for MovingCursors and MovingRanges.

This class provides the interface for KTextEditor::Documents to create MovingCursors/Ranges.

Author
Christoph Cullmann <cullm[email protected][email protected][email protected]kde.o[email protected]rg>
Since
4.5

Definition at line 34 of file movinginterface.h.

Constructor & Destructor Documentation

◆ MovingInterface()

MovingInterface::MovingInterface ( )
default

Default constructor.

◆ ~MovingInterface()

MovingInterface::~MovingInterface ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ aboutToDeleteMovingInterfaceContent()

void KTextEditor::MovingInterface::aboutToDeleteMovingInterfaceContent ( KTextEditor::Document document)

This signal is emitted before the cursors/ranges/revisions of a document are destroyed as the document is deleted.

Parameters
documentthe document which the interface belongs to which is in the process of being deleted

◆ aboutToInvalidateMovingInterfaceContent()

void KTextEditor::MovingInterface::aboutToInvalidateMovingInterfaceContent ( KTextEditor::Document document)

This signal is emitted before the ranges of a document are invalidated and the revisions are deleted as the document is cleared (for example on load/reload).

While this signal is emitted, the old document content is still valid and accessible before the clear.

Parameters
documentthe document which the interface belongs to which will invalidate its data

◆ lastSavedRevision()

virtual qint64 KTextEditor::MovingInterface::lastSavedRevision ( ) const
pure virtual

Last revision the buffer got successful saved.

Returns
last revision buffer got saved, -1 if none

Implemented in KTextEditor.

◆ lockRevision()

virtual void KTextEditor::MovingInterface::lockRevision ( qint64  revision)
pure virtual

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

Implemented in KTextEditor.

◆ newMovingCursor()

virtual MovingCursor* KTextEditor::MovingInterface::newMovingCursor ( const Cursor position,
MovingCursor::InsertBehavior  insertBehavior = MovingCursor::MoveOnInsert 
)
pure virtual

Create a new moving cursor for this document.

Parameters
positionposition of the moving cursor to create
insertBehaviorinsertion behavior
Returns
new moving cursor for the document

Implemented in KTextEditor.

◆ newMovingRange()

virtual MovingRange* KTextEditor::MovingInterface::newMovingRange ( const Range range,
MovingRange::InsertBehaviors  insertBehaviors = MovingRange::DoNotExpand,
MovingRange::EmptyBehavior  emptyBehavior = MovingRange::AllowEmpty 
)
pure virtual

Create a new moving range for this document.

Parameters
rangerange of the moving range to create
insertBehaviorsinsertion behaviors
emptyBehaviorbehavior on becoming empty
Returns
new moving range for the document

Implemented in KTextEditor.

◆ revision()

virtual qint64 KTextEditor::MovingInterface::revision ( ) const
pure virtual

Current revision.

Returns
current revision

Implemented in KTextEditor.

◆ transformCursor() [1/2]

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

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

Implemented in KTextEditor.

◆ transformCursor() [2/2]

virtual void KTextEditor::MovingInterface::transformCursor ( KTextEditor::Cursor cursor,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
pure virtual

Transform a cursor from one revision to an other.

Parameters
cursorcursor 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

Implemented in KTextEditor.

◆ transformRange()

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

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

Implemented in KTextEditor.

◆ unlockRevision()

virtual void KTextEditor::MovingInterface::unlockRevision ( qint64  revision)
pure virtual

Release a revision.

Parameters
revisionrevision to release

Implemented in KTextEditor.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:50:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.