KTextEdit Class Reference
This is just a little subclass of QTextEdit, implementing some standard KDE features, like Cursor auto-hiding, configurable wheelscrolling (fast-scroll or zoom) and deleting of entire words with Ctrl-Backspace or Ctrl-Delete. A KDE'ified QTextEdit. More...
#include <ktextedit.h>
Inheritance diagram for KTextEdit:

Public Slots | |
void | checkSpelling () |
Public Methods | |
KTextEdit (const QString &text, const QString &context=QString::null, QWidget *parent=0, const char *name=0) | |
KTextEdit (QWidget *parent=0L, const char *name=0) | |
~KTextEdit () | |
virtual void | setReadOnly (bool readOnly) |
virtual void | setPalette (const QPalette &palette) |
void | setCheckSpellingEnabled (bool check) |
bool | checkSpellingEnabled () const |
void | highLightWord (unsigned int length, unsigned int pos) |
Protected Methods | |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | focusInEvent (QFocusEvent *) |
virtual void | contentsWheelEvent (QWheelEvent *) |
virtual void | deleteWordBack () |
virtual void | deleteWordForward () |
virtual QPopupMenu * | createPopupMenu (const QPoint &pos) |
virtual QPopupMenu * | createPopupMenu () |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
This is just a little subclass of QTextEdit, implementing some standard KDE features, like Cursor auto-hiding, configurable wheelscrolling (fast-scroll or zoom) and deleting of entire words with Ctrl-Backspace or Ctrl-Delete. A KDE'ified QTextEdit.Basic rule: whenever you want to use QTextEdit, use KTextEdit!
- See also:
- QTextEdit
- Author:
- Carsten Pfeiffer <pfeiffer@kde.org>
- Since:
- 3.1
Definition at line 40 of file ktextedit.h.
Constructor & Destructor Documentation
|
Constructs a KTextEdit object. See QTextEdit::QTextEdit for details. Definition at line 54 of file ktextedit.cpp. References KCursor::setAutoHideCursor(). |
|
Constructs a KTextEdit object. See QTextEdit::QTextEdit for details. Definition at line 62 of file ktextedit.cpp. References KCursor::setAutoHideCursor(). |
|
Destroys the KTextEdit object.
Definition at line 69 of file ktextedit.cpp. |
Member Function Documentation
|
Reimplemented to set a proper "deactivated" background color.
Reimplemented from QTextEdit. Definition at line 221 of file ktextedit.cpp. References QPalette::color(), QTextEdit::color(), QTextEdit::isReadOnly(), QPalette::setColor(), setPalette(), and QTextEdit::setReadOnly(). |
|
Reimplemented for tracking custom palettes.
Definition at line 182 of file ktextedit.cpp. Referenced by setReadOnly(). |
|
Turns spell checking for this text edit on or off.
Definition at line 190 of file ktextedit.cpp. |
|
Returns true if spell checking is enabled for this text edit. @ see setCheckSpellingEnabled()
Definition at line 216 of file ktextedit.cpp. Referenced by createPopupMenu(). |
|
Create a modal dialog to check the spelling. This slot will not return until spell checking has been completed.
Definition at line 256 of file ktextedit.cpp. Referenced by createPopupMenu(). |
|
Reimplemented to catch "delete word" key events.
Reimplemented from QTextEdit. Definition at line 74 of file ktextedit.cpp. References QKeyEvent::accept(), QApplication::clipboard(), KShortcut::contains(), QTextEdit::copy(), KStdAccel::copy(), QTextEdit::cut(), KStdAccel::cut(), deleteWordBack(), KStdAccel::deleteWordBack(), deleteWordForward(), KStdAccel::deleteWordForward(), QKeyEvent::ignore(), QTextEdit::insert(), QString::isEmpty(), QKeyEvent::key(), KStdAccel::key(), QTextEdit::keyPressEvent(), QTextEdit::paste(), KStdAccel::paste(), QTextEdit::redo(), KStdAccel::redo(), QKeyEvent::state(), QTextEdit::text(), QTextEdit::undo(), and KStdAccel::undo(). |
|
Reimplemented to instantiate a KDictSpellingHighlighter, if spellchecking is enabled.
Definition at line 208 of file ktextedit.cpp. |
|
Reimplemented to allow fast-wheelscrolling with Ctrl-Wheel or zoom.
Definition at line 174 of file ktextedit.cpp. References QScrollView::contentsWheelEvent(), and KGlobalSettings::wheelMouseZooms(). |
|
Deletes a word backwards from the current cursor position, if available.
Definition at line 138 of file ktextedit.cpp. References QTextEdit::moveCursor(), QTextEdit::removeSelectedText(), and QTextEdit::removeSelection(). Referenced by keyPressEvent(). |
|
Deletes a word forwards from the current cursor position, if available.
Definition at line 145 of file ktextedit.cpp. References QTextEdit::moveCursor(), QTextEdit::removeSelectedText(), and QTextEdit::removeSelection(). Referenced by keyPressEvent(). |
|
Reimplemented from QTextEdit to add spelling related items when appropriate.
Reimplemented from QTextEdit. Definition at line 152 of file ktextedit.cpp. References checkSpelling(), checkSpellingEnabled(), QTextEdit::createPopupMenu(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), QTextEdit::isReadOnly(), QPopupMenu::setItemEnabled(), and QTextEdit::text(). |
|
This is just a reimplementation of a deprecated method from QTextEdit and is just here to keep source compatibility. This should not be used in new code. Specifically reimplementing this method will probably not do what you expect. See the method above.
Definition at line 169 of file ktextedit.cpp. References QTextEdit::createPopupMenu(). |
The documentation for this class was generated from the following files: