The QMultiLineEdit widget is a simple editor for inputting text. More...
#include <qmultilineedit.h>
Inherits QTableView.
The QMultiLineEdit widget provides multiple line text input and display. It is intended for moderate amounts of text. There are no arbitrary limitations, but if you try to handle megabytes of data, performance will suffer.
This widget can be used to display text by calling setReadOnly(TRUE)
The default key bindings are described in keyPressEvent(); they cannot be customized except by inheriting the class.
Examples: mainlyQt/editor.cpp layout/layout.cpp mainlyXt/editor.cpp mainlyMotif/editor.cpp rot13/rot13.cpp scrollview/scrollview.cpp customlayout/main.cpp
[slot]
Appends s to the text.
[virtual protected]
Deletes the character on the left side of the text cursor and moves the cursor one position to the left. If a text has been marked by the user (e.g. by clicking and dragging) the cursor is put at the beginning of the marked text and the marked text is removed.
See also: del().
[slot]
Removes all text.
[slot]
Copies the marked text to the clipboard. Will only copy if echoMode() is Normal.
[virtual protected]
Moves the cursor one line down. If mark is TRUE, the text is marked.
See also: cursorDown(), cursorLeft() and cursorRight().
[virtual protected]
Moves the cursor one character to the left. If mark is TRUE, the text is marked. If wrap is TRUE, the cursor moves to the end of the previous line if it is placed at the beginning of the current line.
See also: cursorRight(), cursorUp() and cursorDown().
[protected]
Returns the top center point where the cursor is drawn.
[virtual protected]
Moves the cursor one character to the right. If mark is TRUE, the text is marked. If wrap is TRUE, the cursor moves to the beginning of the next line if it is placed at the end of the current line.
See also: cursorLeft(), cursorUp() and cursorDown().
[virtual protected]
Moves the cursor up one line. If mark is TRUE, the text is marked.
See also: cursorDown(), cursorLeft() and cursorRight().
[slot]
Copies the selected text to the clipboard and deletes the selected text.
[virtual protected]
Deletes the character on the right side of the text cursor. If a text has been marked by the user (e.g. by clicking and dragging) the cursor is put at the beginning of the marked text and the marked text is removed.
See also: backspace().
[slot]
Deselects all text (i.e. removes marking) and leaves the cursor at the current position.
[virtual protected]
Handles drag leave events, cancelling any auto-scrolling.
Reimplemented from QWidget.
[virtual protected]
Handles drag motion events, accepting text and positioning the cursor.
Reimplemented from QWidget.
[virtual protected]
Handles drop events, pasting text.
Reimplemented from QWidget.
[virtual protected]
Moves the text cursor to the right end of the line. If mark is TRUE text is marked towards the last position. If it is FALSE and the cursor is moved, all marked text is unmarked.
See also: home().
[virtual protected]
Starts the cursor blinking.
Reimplemented from QWidget.
[virtual protected]
stops the cursor blinking.
Reimplemented from QWidget.
[protected]
If there is marked text, sets line1, col1, line2 and col2 to the start and end of the marked region and returns TRUE. Returns FALSE if there is no marked text.
[protected]
Returns a pointer to the text at line line.
[protected]
Returns TRUE if there is marked text.
[virtual protected]
Moves the text cursor to the left end of the line. If mark is TRUE, text is marked towards the first position. If it is FALSE and the cursor is moved, all marked text is unmarked.
See also: end().
[slot]
Inserts s at the current cursor position.
[virtual protected]
Inserts c at the current cursor position.
[protected]
Inserts c at the current cursor position. (this function is provided for backward compatibility - it simply calls insert()).
[virtual protected]
The key press event handler converts a key press to some line editor action.
Here are the default key bindings when isReadOnly() is FALSE:
Here are the default key bindings when isReadOnly() is TRUE:
Reimplemented from QWidget.
[virtual protected]
Deletes text from the current cursor position to the end of the line.
[virtual protected]
Handles auto-copy of selection (X11 only).
Reimplemented from QWidget.
[protected]
Returns the number of characters at line number line.
[protected]
Returns a copy of the marked text.
[virtual protected]
Handles double click events.
Reimplemented from QWidget.
[virtual protected]
Handles mouse move events.
Reimplemented from QWidget.
[virtual protected]
Handles mouse press events.
Reimplemented from QWidget.
[virtual protected]
Handles mouse release events.
Reimplemented from QWidget.
[virtual protected]
Makes a line break at the current cursor position.
[virtual protected]
Moves the cursor one page down. If mark is TRUE, the text is marked.
[virtual protected]
Moves the cursor one page up. If mark is TRUE, the text is marked.
[virtual protected]
Implements the basic drawing logic.
Reimplemented from QTableView.
[slot]
Copies text from the clipboard onto the current cursor position. Any marked text is first deleted.
[virtual protected]
Reimplemented for internal purposes.
Reimplemented from QWidget.
[signal]
This signal is emitted when the user presses the return or enter key. It is not emitted if isReadOnly() is TRUE.
See also: textChanged().
[slot]
Selects all text without moving the cursor.
[virtual slot]
Sets overwrite mode if on is TRUE. Overwrite mode means that characters typed replace characters in the editor.
See also: isOverwriteMode().
[virtual slot]
If on is FALSE, this multi line edit accepts text input. Scrolling and cursor movements are accepted in any case.
See also: inputEnabled() and QWidget::setEnabled().
[virtual slot]
Sets the text to s, removing old text, if any.
Examples: mainlyQt/editor.cpp layout/layout.cpp mainlyXt/editor.cpp mainlyMotif/editor.cpp scrollview/scrollview.cpp customlayout/main.cpp
[protected]
Returns the string shown at line row, including processing of the echo mode
[signal]
This signal is emitted when the text is changed by an event or by a slot. Note that the signal is not emitted when you call a non-slot function such as insertLine().
See also: returnPressed().
[protected]
Returns the width in pixels of the string s. NOTE: only appropriate for whole lines.
[protected]
Returns the width in pixels of the text at line line.
[virtual protected]
Cursor blinking, drag scrolling.
Reimplemented from QObject.
[virtual protected]
An override - pass wheel events to the vertical scrollbar.
Reimplemented from QWidget.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.
Copyright © 1999 Troll Tech | Trademarks | Qt version 2.00
|