|
|
The KWrite text editor widget. It has many options, document/view architecture and syntax highlight.
|
The document can be used by more than one KWrite objects. HandleOwnURIDrops should be set to false for a container that can handle URI drops better than KWriteView does.
~ |
[virtual]
Decrements the reference count of the document and deletes it if zero
KWriteWidget * |
returns the editor widget
KWriteView * |
returns the view widget
KWriteDoc * |
returns the document
void |
Sets the current cursor position
int |
Returns the current line number, that is the line the cursor is on. For the first line it returns 0. Signal newCurPos() is emitted on cursor position changes.
int |
Returns the current column number. It handles tab's correctly. For the first column it returns 0.
int |
Returns the number of the character, that the cursor is on (cursor x)
void |
Sets the config flags
int |
Returns the config flags. See the cfXXX constants in the .h file.
void |
[virtual]
Sets Read/Write mode, which is a doc-property. ReadWritePart::m_bReadWrite is therefore not used.
Reimplemented from ReadWritePart
bool |
[virtual]
Returns true if the document is in read/write mode.
Reimplemented from ReadWritePart
void |
[virtual]
Sets the modification status of the document. ReadWritePart::m_bModified is not used.
Reimplemented from ReadWritePart
bool |
[virtual]
Returns true if the document has been modified.
Reimplemented from ReadWritePart
bool |
Returns true if this editor is the only owner of its document
int |
Bit 0 : undo possible, Bit 1 : redo possible. Used to enable/disable undo/redo menu items and toolbar buttons
int |
Returns the type of the next undo group.
int |
Returns the type of the next redo group.
void |
Returns a list of all available undo types, in undo order.
void |
Returns a list of all available redo types, in redo order.
QString |
Returns a short text description of the given undo type, which is obtained with nextUndoType(), nextRedoType(), undoTypeList(), and redoTypeList(), suitable for display in a menu entry. It is not translated; use i18n() before displaying this string.
void |
[virtual]
enables or disables cut, copy and other edit commands and emits the newStatus signal
void |
[virtual]
enables or disables undo and redo and emits the newUndo signal
void |
[slot]
Presents a options dialog to the user
void |
[slot]
Executes state command cmdNum
void |
[slot]
Toggles Insert mode
void |
[slot]
Toggles "Vertical Selections" option
void |
[signal]
The cursor position has changed. Use currentLine() and currentColumn to get the position
void |
[signal]
The configuration has changed. This is used to update the status bar
void |
[signal]
isReadWrite(), isModified() or hasMarkedText() have changed. This is used to enbable/disable cut, copy and other edit commands.
void |
[signal]
The undo/redo enable status has changed
void |
[signal]
The file name has changed. The main window can use this to change its caption
void |
[signal]
Emits messages for the status bar
int |
Gets the number of text lines;
QString |
Gets the complete document content as string
QString |
Gets the text line where the cursor is on
QString |
Gets a text line
QString |
Gets the word where the cursor is on
QString |
Gets the word at position x, y. Can be used to find the word under the mouse cursor
void |
Discard old text without warning and set new text
void |
Insert text at the current cursor position. If length is a positive number, it restricts the number of inserted characters
bool |
Queries if there is marked text
QString |
Gets the marked text as string
void |
Loads a file from the given QIODevice. For insert = false the old contents will be lost.
void |
Writes the document into the given QIODevice
bool |
Loads the file given in name into the editor
bool |
Saves the file as given in name
void |
Loads the file given in url into the editor. See the lfXXX constants in the .h file.
void |
Saves the file as given in url
void |
[protected slot]
Gets signals from iojob
bool |
Returns true if the document has a filename(not counting the path).
const QString |
Returns the URL of the currnet file
void |
Set the file name. This starts the automatic highlight selection.
bool |
Mainly for internal use. Returns true if the current document can be discarded. If the document is modified, the user is asked if he wants to save it. On "cancel" the function returns false.
void |
[slot]
Opens a new untitled document in the text widget. The user is given a chance to save the current document if the current document has been modified.
bool |
[virtual slot]
open file for KParts
bool |
[virtual slot]
save file for KParts
Reimplemented from ReadWritePart
void |
[slot]
Does cursor command cmdNum
void |
[slot]
Does edit command cmdNum
void |
[slot]
Does bookmark command cmdNum
void |
Clears the document without any warnings or requesters.
void |
[slot]
Moves the marked text into the clipboard
void |
[slot]
Copies the marked text into the clipboard
void |
[slot]
Inserts text from the clipboard at the actual cursor position
void |
[slot]
Undoes the last operation. The number of undo steps is configurable
void |
[slot]
Repeats an operation which has been undone before.
void |
[slot]
Undoes <count> operations. Called by slot undo().
void |
[slot]
Repeats <count> operation which have been undone before. Called by slot redo().
void |
[slot]
Displays the undo history dialog
void |
[slot]
Moves the current line or the selection one position to the right
void |
[slot]
Moves the current line or the selection one position to the left
void |
[slot]
Optimizes the selected indentation, replacing tabs and spaces as needed
void |
[slot]
Selects all text
void |
[slot]
Deselects all text
void |
[slot]
Inverts the current selection
void |
[slot]
Presents a search dialog to the user
void |
[slot]
Presents a replace dialog to the user
void |
[slot]
Repeasts the last search or replace operation. On replace, the user is prompted even if the "Prompt On Replace" option was off.
void |
[slot]
Presents a "Goto Line" dialog to the user
void |
Install a Popup Menu. The Popup Menu will be activated on a right mouse button press event.
void |
[slot]
Shows a popup that lets the user choose the bookmark number
void |
[slot]
Adds the actual edit position to the end of the bookmark list
void |
[slot]
Clears all bookmarks
void |
[slot]
Sets the actual edit position as bookmark number n
void |
[slot]
Sets the cursor to the bookmark n
void |
[protected slot]
Updates the bookmark popup menu when it emit aboutToShow()
void |
Reads config entries out of the KConfig object
void |
Writes config entries into the KConfig object
void |
Reads session config out of the KConfig object. This also includes the actual cursor position and the bookmarks.
void |
Writes session config into the KConfig object
int |
Gets the current highlight number
void |
[slot]
Sets the highlight number n
void |
[slot]
Presents the highlight defaults dialog to the user
void |
[slot]
Presents the highlight setup dialog to the user
int |
Get the end of line mode (Unix, Macintosh or Dos)
void |
[slot]
Set the end of line mode (Unix, Macintosh or Dos)
KSpellConfig * |
Returns the KSpellConfig object
void |
Sets the KSpellConfig object. (The object is copied internally.)
void |
[signal]
This says spellchecking is <i>percent</i> done.
void |
[signal]
Emitted when spellcheck is complete.