Q3MultiLineEdit Class | Qt 4.8 (original) (raw)

Member Function Documentation

Q3MultiLineEdit::Q3MultiLineEdit(QWidget * parent = 0, const char * name = 0)

Constructs a new, empty, Q3MultiLineEdit with parent parent called name.

Q3MultiLineEdit::~Q3MultiLineEdit()

Destructor.

bool Q3MultiLineEdit::autoUpdate() const

This function is a noop that always returns true.

[virtual protected] void Q3MultiLineEdit::backspace()

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 selected by the user (e.g. by clicking and dragging) the cursor is put at the beginning of the selected text and the selected text is removed.

del()

[virtual protected] void Q3MultiLineEdit::cursorDown(bool mark = false)

Moves the cursor one line down. If mark is true, the text is selected.

See also cursorUp(), cursorLeft(), and cursorRight().

[virtual protected] void Q3MultiLineEdit::cursorLeft(bool mark = false, bool wrap = true)

Moves the cursor one character to the left. If mark is true, the text is selected. The wrap parameter is currently ignored.

See also cursorRight(), cursorUp(), and cursorDown().

[protected] QPoint Q3MultiLineEdit::cursorPoint() const

Returns the top center point where the cursor is drawn.

[virtual protected] void Q3MultiLineEdit::cursorRight(bool mark = false, bool wrap = true)

Moves the cursor one character to the right. If mark is true, the text is selected. The wrap parameter is currently ignored.

See also cursorLeft(), cursorUp(), and cursorDown().

[virtual protected] void Q3MultiLineEdit::cursorUp(bool mark = false)

Moves the cursor up one line. If mark is true, the text is selected.

See also cursorDown(), cursorLeft(), and cursorRight().

void Q3MultiLineEdit::cursorWordBackward(bool mark)

Moves the cursor one word to the left. If mark is true, the text is selected.

See also cursorWordForward().

void Q3MultiLineEdit::cursorWordForward(bool mark)

Moves the cursor one word to the right. If mark is true, the text is selected.

See also cursorWordBackward().

[slot] void Q3MultiLineEdit::deselect()

[virtual protected] void Q3MultiLineEdit::end(bool mark = false)

Moves the text cursor to the right end of the line. If mark is true, text is selected toward the last position. If it is false and the cursor is moved, all selected text is unselected.

See also home().

[protected] bool Q3MultiLineEdit::getMarkedRegion(int * line1, int * col1, int * line2, int * col2) const

If there is selected text, sets line1, col1, line2 and col2 to the start and end of the selected region and returns true. Returns false if there is no selected text.

bool Q3MultiLineEdit::hasMarkedText() const

Returns true if there is selected text.

[virtual protected] void Q3MultiLineEdit::home(bool mark = false)

Moves the text cursor to the left end of the line. If mark is true, text is selected toward the first position. If it is false and the cursor is moved, all selected text is unselected.

See also end().

[virtual protected] void Q3MultiLineEdit::insertAndMark(const QString & str, bool mark)

Inserts str at the current cursor position and selects the text if mark is true.

[virtual] void Q3MultiLineEdit::insertAt(const QString & s, int line, int col)

Reimplemented from Q3TextEdit::insertAt().

[virtual] void Q3MultiLineEdit::insertAt(const QString & s, int line, int col, bool mark)

Inserts string s at paragraph number line, after character number col in the paragraph. If s contains newline characters, new lines are inserted. If mark is true the inserted string will be selected.

The cursor position is adjusted.

[virtual] void Q3MultiLineEdit::insertLine(const QString & txt, int line = -1)

Inserts txt at paragraph number line. If line is less than zero, or larger than the number of paragraphs, the new text is put at the end. If txt contains newline characters, several paragraphs are inserted.

The cursor position is not changed.

[virtual protected] void Q3MultiLineEdit::killLine()

Deletes text from the current cursor position to the end of the line. (Note that this function still operates on lines, not paragraphs.)

[protected] int Q3MultiLineEdit::lineLength(int row) const

Returns the number of characters at paragraph number row. If row is out of range, -1 is returned.

QString Q3MultiLineEdit::markedText() const

Returns a copy of the selected text.

int Q3MultiLineEdit::maxLines() const

See also setMaxLines().

[virtual protected] void Q3MultiLineEdit::newLine()

Splits the paragraph at the current cursor position.

[virtual protected] void Q3MultiLineEdit::pageDown(bool mark = false)

Moves the cursor one page down. If mark is true, the text is selected.

[virtual protected] void Q3MultiLineEdit::pageUp(bool mark = false)

Moves the cursor one page up. If mark is true, the text is selected.

[virtual] void Q3MultiLineEdit::removeLine(int paragraph)

Deletes the paragraph at paragraph number paragraph. If paragraph is less than zero or larger than the number of paragraphs, nothing is deleted.

[virtual] void Q3MultiLineEdit::setCursorPosition(int line, int col)

Reimplemented from Q3TextEdit::setCursorPosition().

[virtual] void Q3MultiLineEdit::setCursorPosition(int line, int col, bool mark)

Sets the cursor position to character number col in paragraph number line. The parameters are adjusted to lie within the legal range.

If mark is false, the selection is cleared. otherwise it is extended.

void Q3MultiLineEdit::setMaxLines(int max)

Sets the maximum number of lines this Q3MultiLineEdit will hold to max.

See also maxLines().

QString Q3MultiLineEdit::textLine(int line) const

Returns the text at line number line (possibly the empty string), or a null if line is invalid.

int Q3MultiLineEdit::totalHeight() const

int Q3MultiLineEdit::totalWidth() const