class KWriteDoc

The text document. More...

Definition#include <kwrite_doc.h>
InheritsQObject [private]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Slots

Protected Members


Detailed Description

The text document. It contains the textlines, controls the document changing operations and does undo/redo. WARNING: do not change the text contents directly in methods where this is not explicitly permitted. All changes have to be made with some basic operations, which are recorded by the undo/redo system.

void  incRefCount ()

Increments the reference counter

void  decRefCount ()

Deletes itself if the reference counter becomes zero

void  registerView (KWriteView *)

Registers a view and increments the reference counter

void  removeView (KWriteView *)

Removes a view and decrements the reference counter. Deletes itself if the reference counter becomes zero

bool  ownedView (KWriteView *)

Do we own the given view?

bool  isLastView (int numViews)

Checks if the doc has the given number of views

int  numLines ()

[const]

gets the number of lines

int  lastLine ()

[const]

gets the last line number(numLines() -1)

TextLinetextLine (int line)

gets the given line

Returns: the TextLine object at the given line

int  textLength (int line)

get the length in pixels of the given line