KEdit Class Reference
A simple text editor for the KDE project. More...
#include <keditcl.h>
Inheritance diagram for KEdit:

Public Types | |
enum | |
Search directions. More... | |
Signals | |
void | gotUrlDrop (QDropEvent *e) |
This signal is emitted if the user dropped a URL over the text editor QMultiLineEdit widget. | |
void | CursorPositionChanged () |
This signal is emitted whenever the cursor position changes. | |
void | toggle_overwrite_signal () |
This signal is emitted if the user toggles from insert to overwrite mode or vice versa. | |
Public Methods | |
KEdit (QWidget *_parent=NULL, const char *name=NULL) | |
The usual constructor. | |
void | insertText (QTextStream *) |
Insert text from the text stream into the edit widget. | |
void | saveText (QTextStream *, bool softWrap) |
Save text from the edit widget to a text stream. | |
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. | |
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. | |
void | installRBPopup (QPopupMenu *) |
Install a context menu for KEdit. | |
int | currentLine () |
Retrieve the current line number. | |
int | currentColumn () |
Retrieve the actual column number the cursor is on. | |
void | spellcheck_start () |
Start spellchecking mode. | |
void | spellcheck_stop () |
Exit spellchecking mode. | |
void | setOverwriteEnabled (bool b) |
Allow the user to toggle between insert mode and overwrite mode with the "Insert" key. | |
Protected Methods | |
void | posToRowCol (unsigned int pos, unsigned int &line, unsigned int &col) |
Sets line and col to the position pos, considering word wrap. | |
virtual void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
Reimplemented for internal reasons, the API is not affected. |
Detailed Description
A simple text editor for the KDE project.
- Deprecated:
- . Use KTextEditor::Editor or KTextEdit instead.
- Author:
- Bernd Johannes Wuebben <wuebben@math.cornell.edu>, Waldo Bastian <bastian@kde.org>
Definition at line 171 of file keditcl.h.
Member Enumeration Documentation
|
Search directions.
|
Constructor & Destructor Documentation
|
The usual constructor.
Definition at line 47 of file keditcl1.cpp. References KCursor::setAutoHideCursor(). |
Member Function Documentation
|
Insert text from the text stream into the edit widget.
Definition at line 78 of file keditcl1.cpp. References QTextStream::device(), QMultiLineEdit::insertAt(), QString::isNull(), QTextStream::read(), QTextStream::readLine(), QMultiLineEdit::setCursorPosition(), QIODevice::size(), and QMultiLineEdit::textLine(). |
|
Save text from the edit widget to a text stream.
If
Definition at line 233 of file keditcl1.cpp. References QString::mid(), QMultiLineEdit::numLines(), and QMultiLineEdit::textLine(). |
|
Let the user select a font and set the font of the textwidget to that selected font.
Definition at line 507 of file keditcl1.cpp. References KFontDialog::getFont(). |
|
Present a search dialog to the user.
Definition at line 50 of file keditcl2.cpp. References KStdAction::deselect(), QString::isEmpty(), QDialog::result(), and QDialog::show(). |
|
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.
Definition at line 224 of file keditcl2.cpp. References QString::isEmpty(). |
|
Present a Search and Replace Dialog to the user.
Definition at line 247 of file keditcl2.cpp. References KStdAction::deselect(), QString::isEmpty(), QDialog::result(), and QDialog::show(). |
|
Present a "Goto Line" dialog to the user.
Definition at line 515 of file keditcl1.cpp. References QDialog::exec(), QDialog::result(), and QMultiLineEdit::setCursorPosition(). |
|
Clean up redundant whitespace from selected text.
Definition at line 139 of file keditcl1.cpp. References KStdAction::deselect(), QString::fromLatin1(), QMultiLineEdit::hasMarkedText(), KStdAccel::insert(), QString::isEmpty(), QChar::isSpace(), QMultiLineEdit::markedText(), QMultiLineEdit::numLines(), QMultiLineEdit::QMultiLineEdit(), QString::right(), QStringList::split(), and QMultiLineEdit::textLine(). |
|
Install a context menu for KEdit. The Popup Menu will be activated on a right mouse button press event. Definition at line 503 of file keditcl1.cpp. References KContextMenuManager::insert(). |
|
Retrieve the current line number. The current line is the line the cursor is on. Definition at line 281 of file keditcl1.cpp. |
|
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. Definition at line 288 of file keditcl1.cpp. |
|
Start spellchecking mode.
Definition at line 955 of file keditcl2.cpp. |
|
Exit spellchecking mode.
Definition at line 1013 of file keditcl2.cpp. References KStdAction::deselect(). |
|
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. Definition at line 586 of file keditcl1.cpp. |
|
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. |
|
This signal is emitted whenever the cursor position changes. Use this in conjunction with currentLine(), currentColumn() if you need to know the cursor position. |
|
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. |
|
Sets line and col to the position pos, considering word wrap.
Definition at line 1003 of file keditcl2.cpp. References QMultiLineEdit::lineLength(), and QMultiLineEdit::numLines(). |
|
Reimplemented for internal reasons, the API is not affected.
Definition at line 592 of file keditcl1.cpp. References KCursor::setAutoHideCursor(). |
The documentation for this class was generated from the following files: