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 Member Functions | |
KTextEdit (const QString &text, const QString &context=QString::null, QWidget *parent=0, const char *name=0) | |
Constructs a KTextEdit object. | |
KTextEdit (QWidget *parent=0L, const char *name=0) | |
Constructs a KTextEdit object. | |
~KTextEdit () | |
Destroys the KTextEdit object. | |
virtual void | setReadOnly (bool readOnly) |
Reimplemented to set a proper "deactivated" background color. | |
virtual void | setPalette (const QPalette &palette) |
Reimplemented for tracking custom palettes. | |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *) |
Reimplemented to catch "delete word" key events. | |
virtual void | contentsWheelEvent (QWheelEvent *) |
Reimplemented to allow fast-wheelscrolling with Ctrl-Wheel or zoom. | |
virtual void | deleteWordBack () |
Deletes a word backwards from the current cursor position, if available. | |
virtual void | deleteWordForward () |
Deletes a word forwards from the current cursor position, if available. | |
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 38 of file ktextedit.h.
Constructor & Destructor Documentation
|
Constructs a KTextEdit object. See QTextEdit::QTextEdit for details. Definition at line 39 of file ktextedit.cpp. References KStdAccel::name(), and KCursor::setAutoHideCursor(). |
|
Constructs a KTextEdit object. See QTextEdit::QTextEdit for details. Definition at line 47 of file ktextedit.cpp. References KStdAccel::name(), and KCursor::setAutoHideCursor(). |
|
Destroys the KTextEdit object.
Definition at line 54 of file ktextedit.cpp. |
Member Function Documentation
|
Reimplemented to set a proper "deactivated" background color.
Reimplemented from QTextEdit. Definition at line 153 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 145 of file ktextedit.cpp. Referenced by setReadOnly(). |
|
Reimplemented to catch "delete word" key events.
Reimplemented from QTextEdit. Definition at line 59 of file ktextedit.cpp. References QKeyEvent::accept(), QApplication::clipboard(), 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 allow fast-wheelscrolling with Ctrl-Wheel or zoom.
Definition at line 137 of file ktextedit.cpp. References QScrollView::contentsWheelEvent(), and KGlobalSettings::wheelMouseZooms(). |
|
Deletes a word backwards from the current cursor position, if available.
Definition at line 123 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 130 of file ktextedit.cpp. References QTextEdit::moveCursor(), QTextEdit::removeSelectedText(), and QTextEdit::removeSelection(). Referenced by keyPressEvent(). |
The documentation for this class was generated from the following files: