kdeui
KEdit Class Reference
A simple text editor for the KDE project. More...
#include <keditcl.h>
Public Types | |
enum | { NONE, FORWARD, BACKWARD } |
Public Slots | |
void | corrected (const QString &originalword, const QString &newword, unsigned int pos) |
void | misspelling (const QString &word, const QStringList &, unsigned int pos) |
Signals | |
void | CursorPositionChanged () |
void | gotUrlDrop (QDropEvent *e) |
void | toggle_overwrite_signal () |
Public Member Functions | |
void | cleanWhiteSpace () |
QPopupMenu * | createPopupMenu (const QPoint &pos) |
int | currentColumn () |
int | currentLine () |
void | doGotoLine () |
void | insertText (QTextStream *) |
void | installRBPopup (QPopupMenu *) |
KEdit (QWidget *_parent=NULL, const char *name=NULL) | |
bool | repeatSearch () |
void | replace () |
void | saveText (QTextStream *) |
void | saveText (QTextStream *, bool softWrap) |
void | search () |
void | selectFont () |
QString | selectWordUnderCursor () |
void | setAutoUpdate (bool b) |
void | setOverwriteEnabled (bool b) |
void | spellcheck_start () |
void | spellcheck_stop () |
~KEdit () | |
Protected Member Functions | |
void | computePosition () |
void | contentsDragEnterEvent (QDragEnterEvent *e) |
void | contentsDragMoveEvent (QDragMoveEvent *e) |
void | contentsDropEvent (QDropEvent *e) |
virtual void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
int | doReplace (QString s_pattern, bool case_sensitive, bool regex, bool forward, int line, int col, bool replace) |
int | doSearch (QString s_pattern, bool case_sensitive, bool regex, bool forward, int line, int col) |
void | dragEnterEvent (QDragEnterEvent *e) |
void | dragMoveEvent (QDragMoveEvent *e) |
void | dropEvent (QDropEvent *e) |
virtual void | ensureCursorVisible () |
void | keyPressEvent (QKeyEvent *) |
void | posToRowCol (unsigned int pos, unsigned int &line, unsigned int &col) |
virtual void | setCursor (const QCursor &) |
virtual void | viewportPaintEvent (QPaintEvent *) |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
A simple text editor for the KDE project.
- Deprecated:
- Use KTextEditor::Editor or KTextEdit instead.
Definition at line 171 of file keditcl.h.
Member Enumeration Documentation
anonymous enum |
Constructor & Destructor Documentation
KEdit::KEdit | ( | QWidget * | _parent = NULL , |
|
const char * | name = NULL | |||
) |
KEdit::~KEdit | ( | ) |
Definition at line 75 of file keditcl1.cpp.
Member Function Documentation
void KEdit::cleanWhiteSpace | ( | ) |
void KEdit::computePosition | ( | ) | [protected] |
Definition at line 309 of file keditcl1.cpp.
void KEdit::contentsDragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected] |
Definition at line 641 of file keditcl1.cpp.
void KEdit::contentsDragMoveEvent | ( | QDragMoveEvent * | e | ) | [protected] |
Definition at line 627 of file keditcl1.cpp.
void KEdit::contentsDropEvent | ( | QDropEvent * | e | ) | [protected] |
Definition at line 659 of file keditcl1.cpp.
void KEdit::create | ( | WId | id = 0 , |
|
bool | initializeWindow = true , |
|||
bool | destroyOldWindow = true | |||
) | [protected, virtual] |
Reimplemented for internal reasons, the API is not affected.
Definition at line 676 of file keditcl1.cpp.
QPopupMenu * KEdit::createPopupMenu | ( | const QPoint & | pos | ) |
int KEdit::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.
Definition at line 297 of file keditcl1.cpp.
int KEdit::currentLine | ( | ) |
Retrieve the current line number.
The current line is the line the cursor is on.
Definition at line 290 of file keditcl1.cpp.
void KEdit::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 KEdit::doGotoLine | ( | ) |
int KEdit::doReplace | ( | QString | s_pattern, | |
bool | case_sensitive, | |||
bool | regex, | |||
bool | forward, | |||
int | line, | |||
int | col, | |||
bool | replace | |||
) | [protected] |
Definition at line 505 of file keditcl2.cpp.
int KEdit::doSearch | ( | QString | s_pattern, | |
bool | case_sensitive, | |||
bool | regex, | |||
bool | forward, | |||
int | line, | |||
int | col | |||
) | [protected] |
Definition at line 148 of file keditcl2.cpp.
void KEdit::dragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected] |
Definition at line 635 of file keditcl1.cpp.
void KEdit::dragMoveEvent | ( | QDragMoveEvent * | e | ) | [protected] |
Definition at line 619 of file keditcl1.cpp.
void KEdit::dropEvent | ( | QDropEvent * | e | ) | [protected] |
Definition at line 648 of file keditcl1.cpp.
void KEdit::ensureCursorVisible | ( | ) | [protected, virtual] |
Reimplemented for internal reasons, the API is not affected.
Definition at line 682 of file keditcl1.cpp.
void KEdit::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 KEdit::insertText | ( | QTextStream * | stream | ) |
void KEdit::installRBPopup | ( | QPopupMenu * | p | ) |
Install a context menu for KEdit.
The Popup Menu will be activated on a right mouse button press event.
Definition at line 563 of file keditcl1.cpp.
void KEdit::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Definition at line 383 of file keditcl1.cpp.
void KEdit::misspelling | ( | const QString & | word, | |
const QStringList & | , | |||
unsigned int | pos | |||
) | [slot] |
void KEdit::posToRowCol | ( | unsigned int | pos, | |
unsigned int & | line, | |||
unsigned int & | col | |||
) | [protected] |
Sets line and col to the position pos, considering word wrap.
Definition at line 1058 of file keditcl2.cpp.
bool KEdit::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.
Definition at line 225 of file keditcl2.cpp.
void KEdit::replace | ( | ) |
void KEdit::saveText | ( | QTextStream * | stream | ) |
Definition at line 236 of file keditcl1.cpp.
void KEdit::saveText | ( | QTextStream * | stream, | |
bool | softWrap | |||
) |
Save text from the edit widget to a text stream.
If softWrap
is false soft line wrappings are replaced with line-feeds If softWrap
is true soft line wrappings are ignored.
- Since:
- 3.1
Definition at line 242 of file keditcl1.cpp.
void KEdit::search | ( | ) |
void KEdit::selectFont | ( | ) |
Let the user select a font and set the font of the textwidget to that selected font.
Definition at line 567 of file keditcl1.cpp.
QString KEdit::selectWordUnderCursor | ( | ) |
Definition at line 1075 of file keditcl2.cpp.
void KEdit::setAutoUpdate | ( | bool | b | ) |
Definition at line 81 of file keditcl1.cpp.
void KEdit::setCursor | ( | const QCursor & | c | ) | [protected, virtual] |
Definition at line 690 of file keditcl1.cpp.
void KEdit::setOverwriteEnabled | ( | bool | b | ) |
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 670 of file keditcl1.cpp.
void KEdit::spellcheck_start | ( | ) |
void KEdit::spellcheck_stop | ( | ) |
void KEdit::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.
void KEdit::viewportPaintEvent | ( | QPaintEvent * | pe | ) | [protected, virtual] |
Definition at line 698 of file keditcl1.cpp.
void KEdit::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Definition at line 716 of file keditcl1.cpp.
The documentation for this class was generated from the following files: