class KTextEditor.SmartCursor


abstract class

Table of contents
Modules
ktexteditor Classes
All Classes
Module ktexteditor
Namespace ktexteditor
Class KTextEditor.SmartCursor
Inherits KTextEditor.Cursor

A Cursor which is bound to a specific Document, and maintains its position.

A SmartCursor is an extension of the basic Cursor class. It maintains its position in the document and provides a number of convenience methods, including those for accessing and manipulating the content of the associated Document. As a result of this, SmartCursor%s may not be copied, as they need to maintain a connection to the associated Document.

To receive notifications when the position of the cursor changes, or other similar notifications, see either SmartCursorNotifier for QObject signal notification via notifier(), or SmartCursorWatcher for virtual inheritance notification via setWatcher().

Create a new SmartCursor like this:

// Retrieve the SmartInterface
KTextEditor.SmartInterface* smart =
qobject_cast( yourDocument );

if ( smart ) { KTextEditor.SmartCursor* cursor = smart->newSmartCursor(); }

When finished with a SmartCursor, simply delete it.

See also Cursor, SmartCursorNotifier, SmartCursorWatcher, and SmartInterface.

Author Hamish Rodda \



enums

enum details

methods