diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 15:24:15 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 15:24:15 -0500 |
commit | bd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch) | |
tree | 7a520322212d48ebcb9fbe1087e7fca28b76185c /doc/html/qmultilineedit.html | |
download | qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip |
Add Qt3 development HEAD version
Diffstat (limited to 'doc/html/qmultilineedit.html')
-rw-r--r-- | doc/html/qmultilineedit.html | 343 |
1 files changed, 343 insertions, 0 deletions
diff --git a/doc/html/qmultilineedit.html b/doc/html/qmultilineedit.html new file mode 100644 index 0000000..ef45cbb --- /dev/null +++ b/doc/html/qmultilineedit.html @@ -0,0 +1,343 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qmultilineedit.cpp:54 --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>QMultiLineEdit Class</title> +<style type="text/css"><!-- +fn { margin-left: 1cm; text-indent: -1cm; } +a:link { color: #004faf; text-decoration: none } +a:visited { color: #672967; text-decoration: none } +body { background: #ffffff; color: black; } +--></style> +</head> +<body> + +<table border="0" cellpadding="0" cellspacing="0" width="100%"> +<tr bgcolor="#E5E5E5"> +<td valign=center> + <a href="index.html"> +<font color="#004faf">Home</font></a> + | <a href="classes.html"> +<font color="#004faf">All Classes</font></a> + | <a href="mainclasses.html"> +<font color="#004faf">Main Classes</font></a> + | <a href="annotated.html"> +<font color="#004faf">Annotated</font></a> + | <a href="groups.html"> +<font color="#004faf">Grouped Classes</font></a> + | <a href="functions.html"> +<font color="#004faf">Functions</font></a> +</td> +<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QMultiLineEdit Class Reference<br><small>[obsolete]</small></h1> + +<p>The QMultiLineEdit widget is a simple editor for inputting text. +<a href="#details">More...</a> +<p><tt>#include <<a href="qmultilineedit-h.html">qmultilineedit.h</a>></tt> +<p>Inherits <a href="qtextedit.html">QTextEdit</a>. +<p><a href="qmultilineedit-members.html">List of all member functions.</a> +<h2>Public Members</h2> +<ul> +<li class=fn><a href="#QMultiLineEdit"><b>QMultiLineEdit</b></a> ( QWidget * parent = 0, const char * name = 0 )</li> +<li class=fn>QString <a href="#textLine"><b>textLine</b></a> ( int line ) const</li> +<li class=fn>int <a href="#numLines"><b>numLines</b></a> () const</li> +<li class=fn>virtual void <a href="#insertLine"><b>insertLine</b></a> ( const QString & txt, int line = -1 )</li> +<li class=fn>virtual void <a href="#insertAt"><b>insertAt</b></a> ( const QString & s, int line, int col, bool mark )</li> +<li class=fn>virtual void <a href="#removeLine"><b>removeLine</b></a> ( int paragraph )</li> +<li class=fn>virtual void <a href="#setCursorPosition"><b>setCursorPosition</b></a> ( int line, int col, bool mark )</li> +<li class=fn>bool <a href="#atBeginning"><b>atBeginning</b></a> () const</li> +<li class=fn>bool <a href="#atEnd"><b>atEnd</b></a> () const</li> +<li class=fn>virtual void <a href="#setAlignment"><b>setAlignment</b></a> ( int flags )</li> +<li class=fn>int <a href="#alignment"><b>alignment</b></a> () const</li> +<li class=fn>void <a href="#setEdited"><b>setEdited</b></a> ( bool )</li> +<li class=fn>bool <a href="#edited"><b>edited</b></a> () const</li> +<li class=fn>bool <a href="#hasMarkedText"><b>hasMarkedText</b></a> () const</li> +<li class=fn>QString <a href="#markedText"><b>markedText</b></a> () const</li> +<li class=fn>void <a href="#cursorWordForward"><b>cursorWordForward</b></a> ( bool mark )</li> +<li class=fn>void <a href="#cursorWordBackward"><b>cursorWordBackward</b></a> ( bool mark )</li> +<li class=fn>bool autoUpdate () const <em>(obsolete)</em></li> +<li class=fn>virtual void setAutoUpdate ( bool ) <em>(obsolete)</em></li> +<li class=fn>int totalWidth () const <em>(obsolete)</em></li> +<li class=fn>int totalHeight () const <em>(obsolete)</em></li> +<li class=fn>int maxLines () const <em>(obsolete)</em></li> +<li class=fn>void setMaxLines ( int ) <em>(obsolete)</em></li> +</ul> +<h2>Public Slots</h2> +<ul> +<li class=fn>void deselect () <em>(obsolete)</em></li> +</ul> +<h2>Properties</h2> +<ul> +<li class=fn>Alignment <a href="#alignment-prop"><b>alignment</b></a> - the editor's paragraph alignment</li> +<li class=fn>bool <a href="#atBeginning-prop"><b>atBeginning</b></a> - whether the cursor is placed at the beginning of the text <em>(read only)</em></li> +<li class=fn>bool <a href="#atEnd-prop"><b>atEnd</b></a> - whether the cursor is placed at the end of the text <em>(read only)</em></li> +<li class=fn>bool <a href="#edited-prop"><b>edited</b></a> - whether the document has been edited by the user</li> +<li class=fn>int <a href="#numLines-prop"><b>numLines</b></a> - the number of paragraphs in the editor <em>(read only)</em></li> +</ul> +<h2>Protected Members</h2> +<ul> +<li class=fn>QPoint <a href="#cursorPoint"><b>cursorPoint</b></a> () const</li> +<li class=fn>virtual void <a href="#insertAndMark"><b>insertAndMark</b></a> ( const QString & str, bool mark )</li> +<li class=fn>virtual void <a href="#newLine"><b>newLine</b></a> ()</li> +<li class=fn>virtual void <a href="#killLine"><b>killLine</b></a> ()</li> +<li class=fn>virtual void <a href="#pageUp"><b>pageUp</b></a> ( bool mark = FALSE )</li> +<li class=fn>virtual void <a href="#pageDown"><b>pageDown</b></a> ( bool mark = FALSE )</li> +<li class=fn>virtual void <a href="#cursorLeft"><b>cursorLeft</b></a> ( bool mark = FALSE, bool wrap = TRUE )</li> +<li class=fn>virtual void <a href="#cursorRight"><b>cursorRight</b></a> ( bool mark = FALSE, bool wrap = TRUE )</li> +<li class=fn>virtual void <a href="#cursorUp"><b>cursorUp</b></a> ( bool mark = FALSE )</li> +<li class=fn>virtual void <a href="#cursorDown"><b>cursorDown</b></a> ( bool mark = FALSE )</li> +<li class=fn>virtual void <a href="#backspace"><b>backspace</b></a> ()</li> +<li class=fn>virtual void <a href="#home"><b>home</b></a> ( bool mark = FALSE )</li> +<li class=fn>virtual void <a href="#end"><b>end</b></a> ( bool mark = FALSE )</li> +<li class=fn>bool <a href="#getMarkedRegion"><b>getMarkedRegion</b></a> ( int * line1, int * col1, int * line2, int * col2 ) const</li> +<li class=fn>int <a href="#lineLength"><b>lineLength</b></a> ( int row ) const</li> +</ul> +<hr><a name="details"></a><h2>Detailed Description</h2> + + +<b>This class is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> The QMultiLineEdit widget is a simple editor for inputting text. +<p> +<p> The QMultiLineEdit was a simple editor widget in former Qt versions. Qt +3.0 includes a new richtext engine which obsoletes QMultiLineEdit. It is +still included for compatibility reasons. It is now a subclass of +<a href="qtextedit.html">QTextEdit</a>, and provides enough of the old QMultiLineEdit API to keep old +applications working. +<p> If you implement something new with QMultiLineEdit, we suggest using +<a href="qtextedit.html">QTextEdit</a> instead and call <a href="qtextedit.html#setTextFormat">QTextEdit::setTextFormat</a>(Qt::PlainText). +<p> Although most of the old QMultiLineEdit API is still available, there is +a few difference. The old QMultiLineEdit operated on lines, not on +paragraphs. As lines change all the time during wordwrap, the new +richtext engine uses paragraphs as basic elements in the data structure. +All functions (<a href="#numLines">numLines</a>(), <a href="#textLine">textLine</a>(), etc.) that operated on lines, now +operate on paragraphs. Further, getString() has been removed completely. +It revealed too much of the internal data structure. +<p> Applications which made normal and reasonable use of QMultiLineEdit +should still work without problems. Some odd usage will require some +porting. In these cases, it may be better to use <a href="qtextedit.html">QTextEdit</a> now. +<p> <img src=qmlined-m.png> <img src=qmlined-w.png> +<p> <p>See also <a href="qtextedit.html">QTextEdit</a> and <a href="advanced.html">Advanced Widgets</a>. + +<hr><h2>Member Function Documentation</h2> +<h3 class=fn><a name="QMultiLineEdit"></a>QMultiLineEdit::QMultiLineEdit ( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 ) +</h3> +Constructs a new, empty, QMultiLineEdit with parent <em>parent</em> called +<em>name</em>. + +<h3 class=fn>int <a name="alignment"></a>QMultiLineEdit::alignment () const +</h3><p>Returns the editor's paragraph alignment. +See the <a href="qmultilineedit.html#alignment-prop">"alignment"</a> property for details. +<h3 class=fn>bool <a name="atBeginning"></a>QMultiLineEdit::atBeginning () const +</h3><p>Returns TRUE if the cursor is placed at the beginning of the text; otherwise returns FALSE. +See the <a href="qmultilineedit.html#atBeginning-prop">"atBeginning"</a> property for details. +<h3 class=fn>bool <a name="atEnd"></a>QMultiLineEdit::atEnd () const +</h3><p>Returns TRUE if the cursor is placed at the end of the text; otherwise returns FALSE. +See the <a href="qmultilineedit.html#atEnd-prop">"atEnd"</a> property for details. +<h3 class=fn>bool <a name="autoUpdate"></a>QMultiLineEdit::autoUpdate () const +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<h3 class=fn>void <a name="backspace"></a>QMultiLineEdit::backspace ()<tt> [virtual protected]</tt> +</h3> 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. +<a href="qtextedit.html#del">del</a>() + +<h3 class=fn>void <a name="cursorDown"></a>QMultiLineEdit::cursorDown ( bool mark = FALSE )<tt> [virtual protected]</tt> +</h3> +Moves the cursor one line down. If <em>mark</em> is TRUE, the text +is selected. +<p>See also <a href="#cursorUp">cursorUp</a>(), <a href="#cursorLeft">cursorLeft</a>(), and <a href="#cursorRight">cursorRight</a>(). + +<h3 class=fn>void <a name="cursorLeft"></a>QMultiLineEdit::cursorLeft ( bool mark = FALSE, bool wrap = TRUE )<tt> [virtual protected]</tt> +</h3> Moves the cursor one character to the left. If <em>mark</em> is TRUE, +the text is selected. +The <em>wrap</em> parameter is currently ignored. +<p> <p>See also <a href="#cursorRight">cursorRight</a>(), <a href="#cursorUp">cursorUp</a>(), and <a href="#cursorDown">cursorDown</a>(). + +<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="cursorPoint"></a>QMultiLineEdit::cursorPoint () const<tt> [protected]</tt> +</h3> Returns the top center point where the cursor is drawn. + +<h3 class=fn>void <a name="cursorRight"></a>QMultiLineEdit::cursorRight ( bool mark = FALSE, bool wrap = TRUE )<tt> [virtual protected]</tt> +</h3> Moves the cursor one character to the right. If <em>mark</em> is TRUE, +the text is selected. +The <em>wrap</em> parameter is currently ignored. +<p> <p>See also <a href="#cursorLeft">cursorLeft</a>(), <a href="#cursorUp">cursorUp</a>(), and <a href="#cursorDown">cursorDown</a>(). + +<h3 class=fn>void <a name="cursorUp"></a>QMultiLineEdit::cursorUp ( bool mark = FALSE )<tt> [virtual protected]</tt> +</h3> Moves the cursor up one line. If <em>mark</em> is TRUE, the text is +selected. +<p> <p>See also <a href="#cursorDown">cursorDown</a>(), <a href="#cursorLeft">cursorLeft</a>(), and <a href="#cursorRight">cursorRight</a>(). + +<h3 class=fn>void <a name="cursorWordBackward"></a>QMultiLineEdit::cursorWordBackward ( bool mark ) +</h3> Moves the cursor one word to the left. If <em>mark</em> is TRUE, the +text is selected. +<p> <p>See also <a href="#cursorWordForward">cursorWordForward</a>(). + +<h3 class=fn>void <a name="cursorWordForward"></a>QMultiLineEdit::cursorWordForward ( bool mark ) +</h3> Moves the cursor one word to the right. If <em>mark</em> is TRUE, the text +is selected. +<p> <p>See also <a href="#cursorWordBackward">cursorWordBackward</a>(). + +<h3 class=fn>void <a name="deselect"></a>QMultiLineEdit::deselect ()<tt> [slot]</tt> +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<h3 class=fn>bool <a name="edited"></a>QMultiLineEdit::edited () const +</h3><p>Returns TRUE if the document has been edited by the user; otherwise returns FALSE. +See the <a href="qmultilineedit.html#edited-prop">"edited"</a> property for details. +<h3 class=fn>void <a name="end"></a>QMultiLineEdit::end ( bool mark = FALSE )<tt> [virtual protected]</tt> +</h3> Moves the text cursor to the right end of the line. If <em>mark</em> is +TRUE, text is selected toward the last position. If it is FALSE and the +cursor is moved, all selected text is unselected. +<p> <p>See also <a href="#home">home</a>(). + +<h3 class=fn>bool <a name="getMarkedRegion"></a>QMultiLineEdit::getMarkedRegion ( int * line1, int * col1, int * line2, int * col2 ) const<tt> [protected]</tt> +</h3> +If there is selected text, sets <em>line1</em>, <em>col1</em>, <em>line2</em> and <em>col2</em> +to the start and end of the selected region and returns TRUE. Returns +FALSE if there is no selected text. + +<h3 class=fn>bool <a name="hasMarkedText"></a>QMultiLineEdit::hasMarkedText () const +</h3> +Returns TRUE if there is selected text. + +<h3 class=fn>void <a name="home"></a>QMultiLineEdit::home ( bool mark = FALSE )<tt> [virtual protected]</tt> +</h3> Moves the text cursor to the left end of the line. If <em>mark</em> is +TRUE, text is selected toward the first position. If it is FALSE and the +cursor is moved, all selected text is unselected. +<p> <p>See also <a href="#end">end</a>(). + +<h3 class=fn>void <a name="insertAndMark"></a>QMultiLineEdit::insertAndMark ( const <a href="qstring.html">QString</a> & str, bool mark )<tt> [virtual protected]</tt> +</h3> Inserts <em>str</em> at the current cursor position and selects the +text if <em>mark</em> is TRUE. + +<h3 class=fn>void <a name="insertAt"></a>QMultiLineEdit::insertAt ( const <a href="qstring.html">QString</a> & s, int line, int col, bool mark )<tt> [virtual]</tt> +</h3> Inserts string <em>s</em> at paragraph number <em>line</em>, after character +number <em>col</em> in the paragraph. If <em>s</em> contains newline +characters, new lines are inserted. +If <em>mark</em> is TRUE the inserted string will be selected. +<p> The cursor position is adjusted. + +<h3 class=fn>void <a name="insertLine"></a>QMultiLineEdit::insertLine ( const <a href="qstring.html">QString</a> & txt, int line = -1 )<tt> [virtual]</tt> +</h3> Inserts <em>txt</em> at paragraph number <em>line</em>. If <em>line</em> is less +than zero, or larger than the number of paragraphs, the new text is +put at the end. If <em>txt</em> contains newline characters, several +paragraphs are inserted. +<p> The cursor position is not changed. + +<h3 class=fn>void <a name="killLine"></a>QMultiLineEdit::killLine ()<tt> [virtual protected]</tt> +</h3> Deletes text from the current cursor position to the end of the +line. (Note that this function still operates on lines, not paragraphs.) + +<h3 class=fn>int <a name="lineLength"></a>QMultiLineEdit::lineLength ( int row ) const<tt> [protected]</tt> +</h3> Returns the number of characters at paragraph number <em>row</em>. If +<em>row</em> is out of range, -1 is returned. + +<h3 class=fn><a href="qstring.html">QString</a> <a name="markedText"></a>QMultiLineEdit::markedText () const +</h3> +Returns a copy of the selected text. + +<h3 class=fn>int <a name="maxLines"></a>QMultiLineEdit::maxLines () const +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<h3 class=fn>void <a name="newLine"></a>QMultiLineEdit::newLine ()<tt> [virtual protected]</tt> +</h3> Splits the paragraph at the current cursor position. + +<h3 class=fn>int <a name="numLines"></a>QMultiLineEdit::numLines () const +</h3><p>Returns the number of paragraphs in the editor. +See the <a href="qmultilineedit.html#numLines-prop">"numLines"</a> property for details. +<h3 class=fn>void <a name="pageDown"></a>QMultiLineEdit::pageDown ( bool mark = FALSE )<tt> [virtual protected]</tt> +</h3> +Moves the cursor one page down. If <em>mark</em> is TRUE, the text +is selected. + +<h3 class=fn>void <a name="pageUp"></a>QMultiLineEdit::pageUp ( bool mark = FALSE )<tt> [virtual protected]</tt> +</h3> +Moves the cursor one page up. If <em>mark</em> is TRUE, the text +is selected. + +<h3 class=fn>void <a name="removeLine"></a>QMultiLineEdit::removeLine ( int paragraph )<tt> [virtual]</tt> +</h3> Deletes the paragraph at paragraph number <em>paragraph</em>. If <em>paragraph</em> is less than zero or larger than the number of paragraphs, +nothing is deleted. + +<h3 class=fn>void <a name="setAlignment"></a>QMultiLineEdit::setAlignment ( int flags )<tt> [virtual]</tt> +</h3><p>Sets the editor's paragraph alignment to <em>flags</em>. +See the <a href="qmultilineedit.html#alignment-prop">"alignment"</a> property for details. +<p>Reimplemented from <a href="qtextedit.html#setAlignment">QTextEdit</a>. +<h3 class=fn>void <a name="setAutoUpdate"></a>QMultiLineEdit::setAutoUpdate ( bool )<tt> [virtual]</tt> +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<p>Example: <a href="qwerty-example.html#x376">qwerty/qwerty.cpp</a>. +<h3 class=fn>void <a name="setCursorPosition"></a>QMultiLineEdit::setCursorPosition ( int line, int col, bool mark )<tt> [virtual]</tt> +</h3> Sets the cursor position to character number <em>col</em> in paragraph +number <em>line</em>. The parameters are adjusted to lie within the legal +range. +<p> If <em>mark</em> is FALSE, the selection is cleared. otherwise it is extended. +<p> +<h3 class=fn>void <a name="setEdited"></a>QMultiLineEdit::setEdited ( bool ) +</h3><p>Sets whether the document has been edited by the user. +See the <a href="qmultilineedit.html#edited-prop">"edited"</a> property for details. +<h3 class=fn>void <a name="setMaxLines"></a>QMultiLineEdit::setMaxLines ( int ) +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<h3 class=fn><a href="qstring.html">QString</a> <a name="textLine"></a>QMultiLineEdit::textLine ( int line ) const +</h3> Returns the text at line number <em>line</em> (possibly the empty +string), or a <a href="qstring.html#operator!">null string</a> if <em>line</em> is invalid. + +<p>Example: <a href="qwerty-example.html#x377">qwerty/qwerty.cpp</a>. +<h3 class=fn>int <a name="totalHeight"></a>QMultiLineEdit::totalHeight () const +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<h3 class=fn>int <a name="totalWidth"></a>QMultiLineEdit::totalWidth () const +</h3> + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<hr><h2>Property Documentation</h2> +<h3 class=fn>Alignment <a name="alignment-prop"></a>alignment</h3> <p>This property holds the editor's paragraph alignment. +<p>Sets the alignment to flag, which must be <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>, <a href="qt.html#AlignmentFlags-enum">AlignHCenter</a> or <a href="qt.html#AlignmentFlags-enum">AlignRight</a>. +<p> If flag is an illegal flag nothing happens. +<p> <p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>. + +<p>Set this property's value with <a href="#setAlignment">setAlignment</a>() and get this property's value with <a href="#alignment">alignment</a>(). +<h3 class=fn>bool <a name="atBeginning-prop"></a>atBeginning</h3> <p>This property holds whether the cursor is placed at the beginning of the text. +<p>Get this property's value with <a href="#atBeginning">atBeginning</a>(). +<p><p>See also <a href="#atEnd-prop">atEnd</a>. + +<h3 class=fn>bool <a name="atEnd-prop"></a>atEnd</h3> <p>This property holds whether the cursor is placed at the end of the text. +<p>Get this property's value with <a href="#atEnd">atEnd</a>(). +<p><p>See also <a href="#atBeginning-prop">atBeginning</a>. + +<h3 class=fn>bool <a name="edited-prop"></a>edited</h3> <p>This property holds whether the document has been edited by the user. +<p>This is the same as <a href="qtextedit.html">QTextEdit</a>'s "modifed" property. +<p> <p>See also <a href="qtextedit.html#modified-prop">QTextEdit::modified</a>. + +<p>Set this property's value with <a href="#setEdited">setEdited</a>() and get this property's value with <a href="#edited">edited</a>(). +<h3 class=fn>int <a name="numLines-prop"></a>numLines</h3> <p>This property holds the number of paragraphs in the editor. +<p>The count includes any empty paragraph at top and bottom, so for an +empty editor this method returns 1. + +<p>Get this property's value with <a href="#numLines">numLines</a>(). +<!-- eof --> +<hr><p> +This file is part of the <a href="index.html">Qt toolkit</a>. +Copyright © 1995-2007 +<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center> +<table width=100% cellspacing=0 border=0><tr> +<td>Copyright © 2007 +<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a> +<td align=right><div align=right>Qt 3.3.8</div> +</table></div></address></body> +</html> |