# class KEdit | A simple text editor for the KDE project. More...
Definition | `#include <keditcl.h>`
Inherits | QMultiLineEdit (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum { NONE, FORWARD, BACKWARD }

#### Public Methods

- KEdit (QWidget *_parent=NULL, const char *name=NULL)
- ~KEdit ()
- void insertText (QTextStream *)
- void saveText (QTextStream *)
- QString markedText ()
- void selectFont ()
- void search ()
- bool repeatSearch ()
- void replace ()
- void doGotoLine ()
- void cleanWhiteSpace ()
- bool isModified ()
- void setModified ( bool = true)
- void installRBPopup ( QPopupMenu* )
- int currentLine ()
- int currentColumn ()
- void spellcheck_start ()
- void spellcheck_stop ()
- void setOverwriteEnabled (bool b)

#### Signals

- void gotUrlDrop (QDropEvent* e)
- void CursorPositionChanged ()
- void toggle_overwrite_signal ()

#### Protected Methods

- int doSearch (QString s_pattern, bool case_sensitive, bool regex, bool forward,int line, int col)
- int doReplace (QString s_pattern, bool case_sensitive, bool regex, bool forward,int line, int col,bool replace)
- void posToRowCol (unsigned int pos, unsigned int &line, unsigned int &col)
- bool eventFilter ( QObject *, QEvent * )
- void keyPressEvent ( QKeyEvent * )
- void mousePressEvent ( QMouseEvent* )
- void mouseReleaseEvent ( QMouseEvent* )
- void mouseMoveEvent ( QMouseEvent* )
- void dragMoveEvent (QDragMoveEvent* e)
- void dragEnterEvent (QDragEnterEvent* e)
- void dropEvent (QDropEvent* e)

## Detailed Description

A simple text editor for the KDE project.

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

The usual constructor.

~KEdit () | ### ~KEdit

enum { NONE, FORWARD, BACKWARD } | ###

Search directions.

void insertText (QTextStream *) | ### insertText

Insert text from the text stream into the edit widget.

void saveText (QTextStream *) | ### saveText

Save text from the edit widget to a text stream.

QString markedText () | ### markedText

Retrieve the currently marked text.

Reimplemented from QMultiLineEdit.

void selectFont () | ### selectFont

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

void search () | ### search

Present a search dialog to the user

bool repeatSearch () | ### 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 () | ### replace

Present a Search and Replace Dialog to the user.

void doGotoLine () | ### doGotoLine

Present a "Goto Line" dialog to the user.

void cleanWhiteSpace () | ### cleanWhiteSpace

Clean up redundant whitespace from selected text.

bool isModified () | ### isModified

Returns: `true` if the document has been modified.

void setModified ( bool = true) | ### setModified

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* ) | ### installRBPopup

Install a context menu for KEdit.

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

int currentLine () | ### currentLine

Retrieve the current line number.

The current line is the line the cursor is on.

int currentColumn () | ### 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 () | ### spellcheck_start

Start spellchecking mode.

void spellcheck_stop () | ### spellcheck_stop

Exit spellchecking mode.

void setOverwriteEnabled (bool b) | ### setOverwriteEnabled

Allow the user to toggle between insert mode and overwrite mode with the "Insert" key. See also toggle_overwrite_signal();

The default is false: the user can not toggle.

void gotUrlDrop (QDropEvent* e) | ### gotUrlDrop

[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 () | ### 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 () | ### toggle_overwrite_signal

[signal]

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

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

This feature must be activated by calling setOverwriteEnabled(true) first.

int doSearch (QString s_pattern, bool case_sensitive, bool regex, bool forward,int line, int col) | ### doSearch

[protected]

int doReplace (QString s_pattern, bool case_sensitive, bool regex, bool forward,int line, int col,bool replace) | ### doReplace

[protected]

void posToRowCol (unsigned int pos, unsigned int &line, unsigned int &col) | ### posToRowCol

[protected]

Sets line and col to the position pos, considering word wrap.

bool eventFilter ( QObject *, QEvent * ) | ### eventFilter

[protected]

void keyPressEvent ( QKeyEvent * ) | ### keyPressEvent

[protected]

Reimplemented from QMultiLineEdit.

void mousePressEvent ( QMouseEvent* ) | ### mousePressEvent

[protected]

Reimplemented from QMultiLineEdit.

void mouseReleaseEvent ( QMouseEvent* ) | ### mouseReleaseEvent

[protected]

Reimplemented from QMultiLineEdit.

void mouseMoveEvent ( QMouseEvent* ) | ### mouseMoveEvent

[protected]

Reimplemented from QMultiLineEdit.

void dragMoveEvent (QDragMoveEvent* e) | ### dragMoveEvent

[protected]

Reimplemented from QMultiLineEdit.

void dragEnterEvent (QDragEnterEvent* e) | ### dragEnterEvent

[protected]

Reimplemented from QMultiLineEdit.

void dropEvent (QDropEvent* e) | ### dropEvent

[protected]

Reimplemented from QMultiLineEdit.

- Author: Bernd Johannes Wuebben <wuebben@math.cornell.edu>, Waldo Bastian <bastian@kde.org>
- Generated: root@sparc.ports.openbsd.org on Wed May 2 09:37:45 2001, using kdoc 2.0a53.