class KEdit

A simple text editor for the KDE project. More...

Definition#include <keditcl.h>
InheritsQMultiLineEdit
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Slots

Signals

Protected Methods

Protected Members


Detailed Description

A simple text editor for the KDE project.

 KEdit (QWidget *_parent=NULL, const char *name=NULL)

The usual constructor.

enum {NONE, FORWARD, BACKWARD }

Search directions.

void  insertText (QTextStream *)

Insert text from the text stream into the edit widget.

void  saveText (QTextStream *)

Save text from the edit widget to a text stream.

QString  markedText ()

Retrieve the currently marked text.

void  selectFont ()

Let the user select a font and set the font of the textwidget to that selected font.

void  search ()

Present a search dialog to the user

bool  repeatSearch ()

Repeat the last search specified on the search dialog.

If the user hasn't searched for anything until now, this method will simply return without doing anything.

Returns: true if a search was done. false if no search was done.

void  replace ()

Present a Search and Replace Dialog to the user.

void  doGotoLine ()

Present a "Goto Line" dialog to the user.

void  cleanWhiteSpace ()

Clean up redundant whitespace from selected text.

bool  isModified ()

Returns: true if the document has been modified.

void  setModified ( bool = true)

Set the modification status of the document.

@true = Modified, @false = UNMODIFIED. This can be used to test whether the document needs to be saved.

void  installRBPopup ( QPopupMenu* )

Install a context menu for KEdit.

The Popup Menu will be activated on a right mouse button press event.

int  currentLine ()

Retrieve the current line number.

The current line is the line the cursor is on.

int  currentColumn ()

Retrieve the actual column number the cursor is on.

This call differs from QMultiLineEdit::getCursorPosition() in that it returns the actual cursor position and not the character position. Use currentLine() and currentColumn() if you want to display the current line or column in the status bar for example.

void  spellcheck_start ()

Start spellchecking mode.

void  spellcheck_stop ()

Exit spellchecking mode.

void  gotUrlDrop (QDropEvent* e)

[signal]

This signal is emitted if the user dropped a URL over the text editor QMultiLineEdit widget.

Note that the user can drop also Text on it, but this is already handled internally by QMultiLineEdit.

void  CursorPositionChanged ()

[signal]

This signal is emitted whenever the cursor position changes.

Use this in conjunction with currentLine(), currentColumn() if you need to know the cursor position.

void  toggle_overwrite_signal ()

[signal]

This signal is emitted if the user toggles from overwrite to insert mode.

The user can do so by pressing the "Insert" button on a PC keyboard.

void  corrected (QString originalword, QString newword, unsigned pos)

[slot]

void  misspelling (QString word, QStringList *, unsigned pos)

[slot]

void  search_slot ()

[slot]

Called from search dialog.

void  searchdone_slot ()

[slot]

void  replace_slot ()

[slot]

void  replace_all_slot ()

[slot]

void  replace_search_slot ()

[slot]

void  replacedone_slot ()

[slot]

void  repaintAll ()

[slot]

Repaint the widget.