<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/attic/qtmultilineedit.cpp:118 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>QtMultiLineEdit Class</title> <style type="text/css"><!-- h3.fn,span.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>QtMultiLineEdit Class Reference<br><small>[obsolete]</small></h1> <p>The QtMultiLineEdit widget is a simple editor for inputting text. <a href="#details">More...</a> <p><tt>#include <<a href="qtmultilineedit-h.html">qtmultilineedit.h</a>></tt> <p>Inherits <a href="qttableview.html">QtTableView</a>. <p><a href="qtmultilineedit-members.html">List of all member functions.</a> <h2>Public Members</h2> <ul> <li><div class=fn><a href="#QtMultiLineEdit"><b>QtMultiLineEdit</b></a> ( QWidget * parent = 0, const char * name = 0 )</div></li> <li><div class=fn><a href="#~QtMultiLineEdit"><b>~QtMultiLineEdit</b></a> ()</div></li> <li><div class=fn>QString <a href="#textLine"><b>textLine</b></a> ( int line ) const</div></li> <li><div class=fn>int <a href="#numLines"><b>numLines</b></a> () const</div></li> <li><div class=fn>virtual QSize <a href="#minimumSizeHint"><b>minimumSizeHint</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#insertLine"><b>insertLine</b></a> ( const QString & txt, int line = -1 )</div></li> <li><div class=fn>virtual void <a href="#insertAt"><b>insertAt</b></a> ( const QString & s, int line, int col, bool mark = FALSE )</div></li> <li><div class=fn>virtual void <a href="#removeLine"><b>removeLine</b></a> ( int line )</div></li> <li><div class=fn>void cursorPosition ( int * line, int * col ) const <em>(obsolete)</em></div></li> <li><div class=fn>virtual void <a href="#setCursorPosition"><b>setCursorPosition</b></a> ( int line, int col, bool mark = FALSE )</div></li> <li><div class=fn>void <a href="#getCursorPosition"><b>getCursorPosition</b></a> ( int * line, int * col ) const</div></li> <li><div class=fn>bool <a href="#atBeginning"><b>atBeginning</b></a> () const</div></li> <li><div class=fn>bool <a href="#atEnd"><b>atEnd</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setFixedVisibleLines"><b>setFixedVisibleLines</b></a> ( int lines )</div></li> <li><div class=fn>int <a href="#maxLineWidth"><b>maxLineWidth</b></a> () const</div></li> <li><div class=fn>void <a href="#setAlignment"><b>setAlignment</b></a> ( int flags )</div></li> <li><div class=fn>int <a href="#alignment"><b>alignment</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setValidator"><b>setValidator</b></a> ( const QValidator * v )</div></li> <li><div class=fn>const QValidator * <a href="#validator"><b>validator</b></a> () const</div></li> <li><div class=fn>void <a href="#setEdited"><b>setEdited</b></a> ( bool )</div></li> <li><div class=fn>bool <a href="#edited"><b>edited</b></a> () const</div></li> <li><div class=fn>void <a href="#cursorWordForward"><b>cursorWordForward</b></a> ( bool mark )</div></li> <li><div class=fn>void <a href="#cursorWordBackward"><b>cursorWordBackward</b></a> ( bool mark )</div></li> <li><div class=fn>enum <a href="#EchoMode-enum"><b>EchoMode</b></a> { Normal, NoEcho, Password }</div></li> <li><div class=fn>virtual void <a href="#setEchoMode"><b>setEchoMode</b></a> ( EchoMode )</div></li> <li><div class=fn>EchoMode <a href="#echoMode"><b>echoMode</b></a> () const</div></li> <li><div class=fn>void <a href="#setMaxLength"><b>setMaxLength</b></a> ( int )</div></li> <li><div class=fn>int <a href="#maxLength"><b>maxLength</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setMaxLineLength"><b>setMaxLineLength</b></a> ( int m )</div></li> <li><div class=fn>int <a href="#maxLineLength"><b>maxLineLength</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setMaxLines"><b>setMaxLines</b></a> ( int )</div></li> <li><div class=fn>int <a href="#maxLines"><b>maxLines</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setHMargin"><b>setHMargin</b></a> ( int )</div></li> <li><div class=fn>int <a href="#hMargin"><b>hMargin</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setSelection"><b>setSelection</b></a> ( int row_from, int col_from, int row_to, int col_to )</div></li> <li><div class=fn>enum <a href="#WordWrap-enum"><b>WordWrap</b></a> { NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth }</div></li> <li><div class=fn>void <a href="#setWordWrap"><b>setWordWrap</b></a> ( WordWrap mode )</div></li> <li><div class=fn>WordWrap <a href="#wordWrap"><b>wordWrap</b></a> () const</div></li> <li><div class=fn>void <a href="#setWrapColumnOrWidth"><b>setWrapColumnOrWidth</b></a> ( int )</div></li> <li><div class=fn>int <a href="#wrapColumnOrWidth"><b>wrapColumnOrWidth</b></a> () const</div></li> <li><div class=fn>enum <a href="#WrapPolicy-enum"><b>WrapPolicy</b></a> { AtWhiteSpace, Anywhere }</div></li> <li><div class=fn>void <a href="#setWrapPolicy"><b>setWrapPolicy</b></a> ( WrapPolicy policy )</div></li> <li><div class=fn>WrapPolicy <a href="#wrapPolicy"><b>wrapPolicy</b></a> () const</div></li> <li><div class=fn>bool <a href="#autoUpdate"><b>autoUpdate</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#setAutoUpdate"><b>setAutoUpdate</b></a> ( bool )</div></li> <li><div class=fn>void <a href="#setUndoEnabled"><b>setUndoEnabled</b></a> ( bool )</div></li> <li><div class=fn>bool <a href="#isUndoEnabled"><b>isUndoEnabled</b></a> () const</div></li> <li><div class=fn>void <a href="#setUndoDepth"><b>setUndoDepth</b></a> ( int )</div></li> <li><div class=fn>int <a href="#undoDepth"><b>undoDepth</b></a> () const</div></li> <li><div class=fn>bool <a href="#isReadOnly"><b>isReadOnly</b></a> () const</div></li> <li><div class=fn>bool <a href="#isOverwriteMode"><b>isOverwriteMode</b></a> () const</div></li> <li><div class=fn>QString <a href="#text"><b>text</b></a> () const</div></li> <li><div class=fn>int <a href="#length"><b>length</b></a> () const</div></li> </ul> <h2>Public Slots</h2> <ul> <li><div class=fn>virtual void <a href="#setText"><b>setText</b></a> ( const QString & )</div></li> <li><div class=fn>virtual void <a href="#setReadOnly"><b>setReadOnly</b></a> ( bool )</div></li> <li><div class=fn>virtual void <a href="#setOverwriteMode"><b>setOverwriteMode</b></a> ( bool )</div></li> <li><div class=fn>void <a href="#clear"><b>clear</b></a> ()</div></li> <li><div class=fn>void <a href="#append"><b>append</b></a> ( const QString & s )</div></li> <li><div class=fn>void <a href="#deselect"><b>deselect</b></a> ()</div></li> <li><div class=fn>void <a href="#selectAll"><b>selectAll</b></a> ()</div></li> <li><div class=fn>void <a href="#paste"><b>paste</b></a> ()</div></li> <li><div class=fn>void <a href="#pasteSubType"><b>pasteSubType</b></a> ( const QCString & subtype )</div></li> <li><div class=fn>void copyText () const <em>(obsolete)</em></div></li> <li><div class=fn>void <a href="#copy"><b>copy</b></a> () const</div></li> <li><div class=fn>void <a href="#cut"><b>cut</b></a> ()</div></li> <li><div class=fn>void <a href="#insert"><b>insert</b></a> ( const QString & s )</div></li> <li><div class=fn>void <a href="#undo"><b>undo</b></a> ()</div></li> <li><div class=fn>void <a href="#redo"><b>redo</b></a> ()</div></li> </ul> <h2>Signals</h2> <ul> <li><div class=fn>void <a href="#textChanged"><b>textChanged</b></a> ()</div></li> <li><div class=fn>void <a href="#returnPressed"><b>returnPressed</b></a> ()</div></li> <li><div class=fn>void <a href="#undoAvailable"><b>undoAvailable</b></a> ( bool yes )</div></li> <li><div class=fn>void <a href="#redoAvailable"><b>redoAvailable</b></a> ( bool yes )</div></li> <li><div class=fn>void <a href="#copyAvailable"><b>copyAvailable</b></a> ( bool yes )</div></li> </ul> <h2>Static Public Members</h2> <ul> <li><div class=fn>void <a href="#setDefaultTabStop"><b>setDefaultTabStop</b></a> ( int ex )</div></li> <li><div class=fn>int <a href="#defaultTabStop"><b>defaultTabStop</b></a> ()</div></li> </ul> <h2>Properties</h2> <ul> <li><div class=fn>Alignment <a href="#alignment-prop"><b>alignment</b></a> - the alignment</div></li> <li><div class=fn>bool <a href="#atBeginning-prop"><b>atBeginning</b></a> - whether the cursor is at the beginning <em>(read only)</em></div></li> <li><div class=fn>bool <a href="#atEnd-prop"><b>atEnd</b></a> - whether the cursor is at the end <em>(read only)</em></div></li> <li><div class=fn>bool <a href="#autoUpdate-prop"><b>autoUpdate</b></a> - whether auto update is enabled</div></li> <li><div class=fn>EchoMode <a href="#echoMode-prop"><b>echoMode</b></a> - the echo mode</div></li> <li><div class=fn>bool <a href="#edited-prop"><b>edited</b></a> - whether the text had been edited</div></li> <li><div class=fn>int <a href="#hMargin-prop"><b>hMargin</b></a> - the horizontal margin The horizontal margin current set. The default is 3</div></li> <li><div class=fn>int <a href="#length-prop"><b>length</b></a> - the length of the text <em>(read only)</em></div></li> <li><div class=fn>int <a href="#maxLength-prop"><b>maxLength</b></a> - the maximum length of the text</div></li> <li><div class=fn>int <a href="#maxLineWidth-prop"><b>maxLineWidth</b></a> - the maximum line width in pixels Returns the width in pixels of the longest text line in this editor <em>(read only)</em></div></li> <li><div class=fn>int <a href="#maxLines-prop"><b>maxLines</b></a> - the maximum number of lines The currently set line limit, or -1 if there is no limit (the default)</div></li> <li><div class=fn>int <a href="#numLines-prop"><b>numLines</b></a> - the number of lines in the multi-line edit <em>(read only)</em></div></li> <li><div class=fn>bool <a href="#overWriteMode-prop"><b>overWriteMode</b></a> - the overwrite mode</div></li> <li><div class=fn>bool <a href="#readOnly-prop"><b>readOnly</b></a> - whether the multi-line edit is read-only</div></li> <li><div class=fn>QString <a href="#text-prop"><b>text</b></a> - the multi-line edit's text</div></li> <li><div class=fn>int <a href="#undoDepth-prop"><b>undoDepth</b></a> - the undo depth</div></li> <li><div class=fn>bool <a href="#undoEnabled-prop"><b>undoEnabled</b></a> - whether undo is enabled</div></li> <li><div class=fn>WordWrap <a href="#wordWrap-prop"><b>wordWrap</b></a> - the word wrap mode</div></li> <li><div class=fn>int <a href="#wrapColumnOrWidth-prop"><b>wrapColumnOrWidth</b></a> - the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode</div></li> <li><div class=fn>WrapPolicy <a href="#wrapPolicy-prop"><b>wrapPolicy</b></a> - the wrap policy mode The default is \c AtWhiteSpace</div></li> </ul> <h2>Protected Members</h2> <ul> <li><div class=fn>virtual void <a href="#paintCell"><b>paintCell</b></a> ( QPainter * painter, int row, int col )</div></li> <li><div class=fn>virtual void <a href="#keyPressEvent"><b>keyPressEvent</b></a> ( QKeyEvent * e )</div></li> <li><div class=fn>virtual void <a href="#focusInEvent"><b>focusInEvent</b></a> ( QFocusEvent * )</div></li> <li><div class=fn>bool <a href="#hasMarkedText"><b>hasMarkedText</b></a> () const</div></li> <li><div class=fn>QString <a href="#markedText"><b>markedText</b></a> () const</div></li> <li><div class=fn>int <a href="#textWidth"><b>textWidth</b></a> ( int line )</div></li> <li><div class=fn>int <a href="#textWidth-2"><b>textWidth</b></a> ( const QString & s )</div></li> <li><div class=fn>QPoint <a href="#cursorPoint"><b>cursorPoint</b></a> () const</div></li> <li><div class=fn>virtual void <a href="#insert-2"><b>insert</b></a> ( const QString & str, bool mark )</div></li> <li><div class=fn>virtual void <a href="#newLine"><b>newLine</b></a> ()</div></li> <li><div class=fn>virtual void <a href="#killLine"><b>killLine</b></a> ()</div></li> <li><div class=fn>virtual void <a href="#pageUp"><b>pageUp</b></a> ( bool mark = FALSE )</div></li> <li><div class=fn>virtual void <a href="#pageDown"><b>pageDown</b></a> ( bool mark = FALSE )</div></li> <li><div class=fn>virtual void <a href="#cursorLeft"><b>cursorLeft</b></a> ( bool mark = FALSE, bool wrap = TRUE )</div></li> <li><div class=fn>virtual void <a href="#cursorRight"><b>cursorRight</b></a> ( bool mark = FALSE, bool wrap = TRUE )</div></li> <li><div class=fn>virtual void <a href="#cursorUp"><b>cursorUp</b></a> ( bool mark = FALSE )</div></li> <li><div class=fn>virtual void <a href="#cursorDown"><b>cursorDown</b></a> ( bool mark = FALSE )</div></li> <li><div class=fn>virtual void <a href="#backspace"><b>backspace</b></a> ()</div></li> <li><div class=fn>virtual void <a href="#del"><b>del</b></a> ()</div></li> <li><div class=fn>virtual void <a href="#home"><b>home</b></a> ( bool mark = FALSE )</div></li> <li><div class=fn>virtual void <a href="#end"><b>end</b></a> ( bool mark = FALSE )</div></li> <li><div class=fn>bool <a href="#getMarkedRegion"><b>getMarkedRegion</b></a> ( int * line1, int * col1, int * line2, int * col2 ) const</div></li> <li><div class=fn>int <a href="#lineLength"><b>lineLength</b></a> ( int line ) const</div></li> <li><div class=fn>QString * <a href="#getString"><b>getString</b></a> ( int line ) const</div></li> <li><div class=fn>bool <a href="#isEndOfParagraph"><b>isEndOfParagraph</b></a> ( int row ) const</div></li> <li><div class=fn>QString <a href="#stringShown"><b>stringShown</b></a> ( int row ) const</div></li> <li><div class=fn>void <a href="#insertChar"><b>insertChar</b></a> ( QChar c )</div></li> </ul> <hr><a name="details"></a><h2>Detailed Description</h2> <p> The QtMultiLineEdit widget is a simple editor for inputting text. <p> <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 QtMultiLineEdit 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. <p> Per default, the edit widget does not perform any word wrapping. This can be adjusted by calling <a href="#setWordWrap">setWordWrap</a>(). Both dynamic wrapping according to the visible width or a fixed number of character or pixels is supported. <p> The widget can be used to display text by calling <a href="#setReadOnly">setReadOnly</a>(TRUE). <p> The default key bindings are described in <a href="#keyPressEvent">keyPressEvent</a>(); they cannot be customized except by inheriting the class. <p> <img src=qmlined-m.png> <img src=qmlined-w.png> <hr><h2>Member Type Documentation</h2> <h3 class=fn><a name="EchoMode-enum"></a>QtMultiLineEdit::EchoMode</h3> <p> This enum type describes the ways in which <a href="qlineedit.html">QLineEdit</a> can display its contents. The currently defined values are: <ul> <p> <li> Normal - display characters as they are entered. This is the default. <p> <li> NoEcho - do not display anything. <p> <li> Password - display asterisks instead of the characters actually entered. <p> </ul> <p> <p>See also <a href="#echoMode-prop">echoMode</a>, <a href="#echoMode-prop">echoMode</a> and <a href="qlineedit.html#EchoMode-enum">QLineEdit::EchoMode</a>. <h3 class=fn><a name="WordWrap-enum"></a>QtMultiLineEdit::WordWrap</h3> <p> This enum describes the multiline edit's word wrap mode. <p> The following values are valid: <ul> <li> NoWrap - no word wrap at all. <li> WidgetWidth - word wrap depending on the current width of the editor widget <li> FixedPixelWidth - wrap according to a fix amount of pixels ( see <a href="#wrapColumnOrWidth">wrapColumnOrWidth</a>() ) <li> FixedColumnWidth - wrap according to a fix character column. This is useful whenever you need formatted text that can also be displayed gracefully on devices with monospaced fonts, for example a standard VT100 terminal. In that case wrapColumnOrWidth() should typically be set to 80. </ul> <p> <p>See also <a href="#wordWrap-prop">wordWrap</a>. <h3 class=fn><a name="WrapPolicy-enum"></a>QtMultiLineEdit::WrapPolicy</h3> <p> Defines where text can be wrapped in word wrap mode. <p> The following values are valid: <ul> <li> AtWhiteSpace - break only after whitespace <li> Anywhere - break anywhere </ul> <p> <p>See also <a href="#wrapPolicy-prop">wrapPolicy</a>. <hr><h2>Member Function Documentation</h2> <h3 class=fn><a name="QtMultiLineEdit"></a>QtMultiLineEdit::QtMultiLineEdit ( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 ) </h3> Constructs a new, empty, QtMultiLineEdit with parent <em>parent</em> and called <em>name</em>. <h3 class=fn><a name="~QtMultiLineEdit"></a>QtMultiLineEdit::~QtMultiLineEdit () </h3> Destroys the QtMultiLineEdit <h3 class=fn>int <a name="alignment"></a>QtMultiLineEdit::alignment () const </h3><p>Returns the alignment. See the <a href="qtmultilineedit.html#alignment-prop">"alignment"</a> property for details. <h3 class=fn>void <a name="append"></a>QtMultiLineEdit::append ( const <a href="qstring.html">QString</a> & s )<tt> [slot]</tt> </h3> Appends <em>s</em> to the text. <h3 class=fn>bool <a name="atBeginning"></a>QtMultiLineEdit::atBeginning () const </h3><p>Returns TRUE if the cursor is at the beginning; otherwise returns FALSE. See the <a href="qtmultilineedit.html#atBeginning-prop">"atBeginning"</a> property for details. <h3 class=fn>bool <a name="atEnd"></a>QtMultiLineEdit::atEnd () const </h3><p>Returns TRUE if the cursor is at the end; otherwise returns FALSE. See the <a href="qtmultilineedit.html#atEnd-prop">"atEnd"</a> property for details. <h3 class=fn>bool <a name="autoUpdate"></a>QtMultiLineEdit::autoUpdate () const </h3><p>Returns TRUE if auto update is enabled; otherwise returns FALSE. See the <a href="qtmultilineedit.html#autoUpdate-prop">"autoUpdate"</a> property for details. <h3 class=fn>void <a name="backspace"></a>QtMultiLineEdit::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 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. <p>See also <a href="#del">del</a>(). <h3 class=fn>void <a name="clear"></a>QtMultiLineEdit::clear ()<tt> [slot]</tt> </h3> Removes all text. <h3 class=fn>void <a name="copy"></a>QtMultiLineEdit::copy () const<tt> [slot]</tt> </h3> Copies the marked text to the clipboard. Will copy only if <a href="#echoMode">echoMode</a>() is Normal. <h3 class=fn>void <a name="copyAvailable"></a>QtMultiLineEdit::copyAvailable ( bool yes )<tt> [signal]</tt> </h3> <p> This signal is emitted when the availability of cut/copy changes. If <em>yes</em> is TRUE, then <a href="#cut">cut</a>() and <a href="#copy">copy</a>() will work until <a href="#copyAvailable">copyAvailable</a>( FALSE ) is next emitted. <h3 class=fn>void <a name="copyText"></a>QtMultiLineEdit::copyText () const<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> Backward compatibility. <h3 class=fn>void <a name="cursorDown"></a>QtMultiLineEdit::cursorDown ( bool mark = FALSE )<tt> [virtual protected]</tt> </h3> Moves the cursor one line down. If <em>mark</em> is TRUE, the text is marked. <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>QtMultiLineEdit::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 marked. If <em>wrap</em> is TRUE, the cursor moves to the end of the previous line if it is placed at the beginning of the current line. <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>QtMultiLineEdit::cursorPoint () const<tt> [protected]</tt> </h3> Returns the top center point where the cursor is drawn <h3 class=fn>void <a name="cursorPosition"></a>QtMultiLineEdit::cursorPosition ( int * line, int * col ) 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> Use <a href="#getCursorPosition">getCursorPosition</a>() instead. <h3 class=fn>void <a name="cursorRight"></a>QtMultiLineEdit::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 marked. If <em>wrap</em> is TRUE, the cursor moves to the beginning of the next line if it is placed at the end of the current line. <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>QtMultiLineEdit::cursorUp ( bool mark = FALSE )<tt> [virtual protected]</tt> </h3> Moves the cursor up one line. If <em>mark</em> is TRUE, the text is marked. <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>QtMultiLineEdit::cursorWordBackward ( bool mark ) </h3> Moves the cursor one word to the left. If <em>mark</em> is TRUE, the text is marked. <p>See also <a href="#cursorWordForward">cursorWordForward</a>(). <h3 class=fn>void <a name="cursorWordForward"></a>QtMultiLineEdit::cursorWordForward ( bool mark ) </h3> Moves the cursor one word to the right. If <em>mark</em> is TRUE, the text is marked. <p>See also <a href="#cursorWordBackward">cursorWordBackward</a>(). <h3 class=fn>void <a name="cut"></a>QtMultiLineEdit::cut ()<tt> [slot]</tt> </h3> Copies the selected text to the clipboard and deletes the selected text. <h3 class=fn>int <a name="defaultTabStop"></a>QtMultiLineEdit::defaultTabStop ()<tt> [static]</tt> </h3> Returns the distance between tab stops. <p> <p>See also <a href="#setDefaultTabStop">setDefaultTabStop</a>(). <h3 class=fn>void <a name="del"></a>QtMultiLineEdit::del ()<tt> [virtual protected]</tt> </h3> 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. <p>See also <a href="#backspace">backspace</a>(). <h3 class=fn>void <a name="deselect"></a>QtMultiLineEdit::deselect ()<tt> [slot]</tt> </h3> Deselects all text (i.e. removes marking) and leaves the cursor at the current position. <h3 class=fn><a href="qtmultilineedit.html#EchoMode-enum">EchoMode</a> <a name="echoMode"></a>QtMultiLineEdit::echoMode () const </h3><p>Returns the echo mode. See the <a href="qtmultilineedit.html#echoMode-prop">"echoMode"</a> property for details. <h3 class=fn>bool <a name="edited"></a>QtMultiLineEdit::edited () const </h3><p>Returns TRUE if the text had been edited; otherwise returns FALSE. See the <a href="qtmultilineedit.html#edited-prop">"edited"</a> property for details. <h3 class=fn>void <a name="end"></a>QtMultiLineEdit::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 marked towards the last position. If it is FALSE and the cursor is moved, all marked text is unmarked. <p> <p>See also <a href="#home">home</a>(). <h3 class=fn>void <a name="focusInEvent"></a>QtMultiLineEdit::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * )<tt> [virtual protected]</tt> </h3> Starts the cursor blinking. <p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget</a>. <h3 class=fn>void <a name="getCursorPosition"></a>QtMultiLineEdit::getCursorPosition ( int * line, int * col ) const </h3> Returns the current line and character position within that line, in the variables pointed to by <em>line</em> and <em>col</em> respectively. <p> <p>See also <a href="#setCursorPosition">setCursorPosition</a>(). <h3 class=fn>bool <a name="getMarkedRegion"></a>QtMultiLineEdit::getMarkedRegion ( int * line1, int * col1, int * line2, int * col2 ) const<tt> [protected]</tt> </h3> If there is marked text, sets <em>line1</em>, <em>col1</em>, <em>line2</em> and <em>col2</em> to the start and end of the marked region and returns TRUE. Returns FALSE if there is no marked text. <h3 class=fn><a href="qstring.html">QString</a> * <a name="getString"></a>QtMultiLineEdit::getString ( int line ) const<tt> [protected]</tt> </h3> <p> Returns a pointer to the text at line <em>line</em>. <h3 class=fn>int <a name="hMargin"></a>QtMultiLineEdit::hMargin () const </h3><p>Returns the horizontal margin The horizontal margin current set. The default is 3. See the <a href="qtmultilineedit.html#hMargin-prop">"hMargin"</a> property for details. <h3 class=fn>bool <a name="hasMarkedText"></a>QtMultiLineEdit::hasMarkedText () const<tt> [protected]</tt> </h3> Returns TRUE if there is marked text. <h3 class=fn>void <a name="home"></a>QtMultiLineEdit::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 marked towards the first position. If it is FALSE and the cursor is moved, all marked text is unmarked. <p> <p>See also <a href="#end">end</a>(). <h3 class=fn>void <a name="insert"></a>QtMultiLineEdit::insert ( const <a href="qstring.html">QString</a> & s )<tt> [slot]</tt> </h3> Inserts <em>s</em> at the current cursor position. <h3 class=fn>void <a name="insert-2"></a>QtMultiLineEdit::insert ( const <a href="qstring.html">QString</a> & str, bool mark )<tt> [virtual protected]</tt> </h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function. <p> Inserts string <em>str</em> at the current cursor position. If <em>mark</em> is TRUE the string is marked. <h3 class=fn>void <a name="insertAt"></a>QtMultiLineEdit::insertAt ( const <a href="qstring.html">QString</a> & s, int line, int col, bool mark = FALSE )<tt> [virtual]</tt> </h3> Inserts <em>s</em> at line number <em>line</em>, after character number <em>col</em> in the line. If <em>s</em> contains newline characters, new lines are inserted. If <em>mark</em> is TRUE the inserted text is selected. <p> The cursor position is adjusted. If the insertion position is equal to the cursor position, the cursor is placed after the end of the new text. <p> <h3 class=fn>void <a name="insertChar"></a>QtMultiLineEdit::insertChar ( <a href="qchar.html">QChar</a> c )<tt> [protected]</tt> </h3> Inserts <em>c</em> at the current cursor position. (this function is provided for backward compatibility - it simply calls <a href="#insert">insert</a>()). <h3 class=fn>void <a name="insertLine"></a>QtMultiLineEdit::insertLine ( const <a href="qstring.html">QString</a> & txt, int line = -1 )<tt> [virtual]</tt> </h3> Inserts <em>txt</em> at line number <em>line</em>. If <em>line</em> is less than zero, or larger than the number of rows, the new text is put at the end. If <em>txt</em> contains newline characters, several lines are inserted. <p> The cursor position is not changed. <h3 class=fn>bool <a name="isEndOfParagraph"></a>QtMultiLineEdit::isEndOfParagraph ( int row ) const<tt> [protected]</tt> </h3> Returns wether <em>row</em> is the last row in a paragraph. <p> This function is only interesting in word wrap mode, otherwise its return value is always TRUE. <p> <p>See also <a href="#wordWrap-prop">wordWrap</a>. <h3 class=fn>bool <a name="isOverwriteMode"></a>QtMultiLineEdit::isOverwriteMode () const </h3><p>Returns the overwrite mode. See the <a href="qtmultilineedit.html#overWriteMode-prop">"overWriteMode"</a> property for details. <h3 class=fn>bool <a name="isReadOnly"></a>QtMultiLineEdit::isReadOnly () const </h3><p>Returns TRUE if the multi-line edit is read-only; otherwise returns FALSE. See the <a href="qtmultilineedit.html#readOnly-prop">"readOnly"</a> property for details. <h3 class=fn>bool <a name="isUndoEnabled"></a>QtMultiLineEdit::isUndoEnabled () const </h3><p>Returns TRUE if undo is enabled; otherwise returns FALSE. See the <a href="qtmultilineedit.html#undoEnabled-prop">"undoEnabled"</a> property for details. <h3 class=fn>void <a name="keyPressEvent"></a>QtMultiLineEdit::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * e )<tt> [virtual protected]</tt> </h3> The key press event handler converts a key press in event <em>e</em> to some line editor action. <p> Here are the default key bindings when <a href="#isReadOnly">isReadOnly</a>() is FALSE: <ul> <li> <i> Left Arrow </i> Move the cursor one character leftwards <li> <i> Right Arrow </i> Move the cursor one character rightwards <li> <i> Up Arrow </i> Move the cursor one line upwards <li> <i> Down Arrow </i> Move the cursor one line downwards <li> <i> Page Up </i> Move the cursor one page upwards <li> <i> Page Down </i> Move the cursor one page downwards <li> <i> Backspace </i> Delete the character to the left of the cursor <li> <i> Home </i> Move the cursor to the beginning of the line <li> <i> End </i> Move the cursor to the end of the line <li> <i> Delete </i> Delete the character to the right of the cursor <li> <i> Shift - Left Arrow </i> Mark text one character leftwards <li> <i> Shift - Right Arrow </i> Mark text one character rightwards <li> <i> Control-A </i> Move the cursor to the beginning of the line <li> <i> Control-B </i> Move the cursor one character leftwards <li> <i> Control-C </i> Copy the marked text to the clipboard <li> <i> Control-D </i> Delete the character to the right of the cursor <li> <i> Control-E </i> Move the cursor to the end of the line <li> <i> Control-F </i> Move the cursor one character rightwards <li> <i> Control-H </i> Delete the character to the left of the cursor <li> <i> Control-K </i> Delete to end of line <li> <i> Control-N </i> Move the cursor one line downwards <li> <i> Control-P </i> Move the cursor one line upwards <li> <i> Control-V </i> Paste the clipboard text into line edit <li> <i> Control-X </i> Cut the marked text, copy to clipboard <li> <i> Control-Z </i> Undo the last operation <li> <i> Control-Y </i> Redo the last operation <li> <i> Control - Left Arrow </i> Move the cursor one word leftwards <li> <i> Control - Right Arrow </i> Move the cursor one word rightwards <li> <i> Control - Up Arrow </i> Move the cursor one word upwards <li> <i> Control - Down Arrow </i> Move the cursor one word downwards <li> <i> Control - Home Arrow </i> Move the cursor to the beginning of the text <li> <i> Control - End Arrow </i> Move the cursor to the end of the text </ul> In addition, the following key bindings are used on Windows: <ul> <li> <i> Shift - Delete </i> Cut the marked text, copy to clipboard <li> <i> Shift - Insert </i> Paste the clipboard text into line edit <li> <i> Control - Insert </i> Copy the marked text to the clipboard </ul> All other keys with valid ASCII codes insert themselves into the line. <p> Here are the default key bindings when <a href="#isReadOnly">isReadOnly</a>() is TRUE: <ul> <li> <i> Left Arrow </i> Scrolls the table rightwards <li> <i> Right Arrow </i> Scrolls the table rightwards <li> <i> Up Arrow </i> Scrolls the table one line downwards <li> <i> Down Arrow </i> Scrolls the table one line upwards <li> <i> Page Up </i> Scrolls the table one page downwards <li> <i> Page Down </i> Scrolls the table one page upwards <li> <i> Control-C </i> Copy the marked text to the clipboard </ul> <p> <p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget</a>. <h3 class=fn>void <a name="killLine"></a>QtMultiLineEdit::killLine ()<tt> [virtual protected]</tt> </h3> Deletes text from the current cursor position to the end of the line. <h3 class=fn>int <a name="length"></a>QtMultiLineEdit::length () const </h3><p>Returns the length of the text. See the <a href="qtmultilineedit.html#length-prop">"length"</a> property for details. <h3 class=fn>int <a name="lineLength"></a>QtMultiLineEdit::lineLength ( int line ) const<tt> [protected]</tt> </h3> Returns the number of characters at line number <em>line</em>. <h3 class=fn><a href="qstring.html">QString</a> <a name="markedText"></a>QtMultiLineEdit::markedText () const<tt> [protected]</tt> </h3> Returns a copy of the marked text. <h3 class=fn>int <a name="maxLength"></a>QtMultiLineEdit::maxLength () const </h3><p>Returns the maximum length of the text. See the <a href="qtmultilineedit.html#maxLength-prop">"maxLength"</a> property for details. <h3 class=fn>int <a name="maxLineLength"></a>QtMultiLineEdit::maxLineLength () const </h3> Returns the currently set line length limit, or -1 if there is no limit (this is the default). <p> <p>See also <a href="#setMaxLineLength">setMaxLineLength</a>(). <h3 class=fn>int <a name="maxLineWidth"></a>QtMultiLineEdit::maxLineWidth () const </h3><p>Returns the maximum line width in pixels Returns the width in pixels of the longest text line in this editor. See the <a href="qtmultilineedit.html#maxLineWidth-prop">"maxLineWidth"</a> property for details. <h3 class=fn>int <a name="maxLines"></a>QtMultiLineEdit::maxLines () const </h3><p>Returns the maximum number of lines The currently set line limit, or -1 if there is no limit (the default). See the <a href="qtmultilineedit.html#maxLines-prop">"maxLines"</a> property for details. <h3 class=fn><a href="qsize.html">QSize</a> <a name="minimumSizeHint"></a>QtMultiLineEdit::minimumSizeHint () const<tt> [virtual]</tt> </h3> Returns a size sufficient for one character, and scroll bars. <p>Reimplemented from <a href="qwidget.html#minimumSizeHint">QWidget</a>. <h3 class=fn>void <a name="newLine"></a>QtMultiLineEdit::newLine ()<tt> [virtual protected]</tt> </h3> Makes a line break at the current cursor position. <h3 class=fn>int <a name="numLines"></a>QtMultiLineEdit::numLines () const </h3><p>Returns the number of lines in the multi-line edit. See the <a href="qtmultilineedit.html#numLines-prop">"numLines"</a> property for details. <h3 class=fn>void <a name="pageDown"></a>QtMultiLineEdit::pageDown ( bool mark = FALSE )<tt> [virtual protected]</tt> </h3> Moves the cursor one page down. If <em>mark</em> is TRUE, the text is marked. <h3 class=fn>void <a name="pageUp"></a>QtMultiLineEdit::pageUp ( bool mark = FALSE )<tt> [virtual protected]</tt> </h3> Moves the cursor one page up. If <em>mark</em> is TRUE, the text is marked. <h3 class=fn>void <a name="paintCell"></a>QtMultiLineEdit::paintCell ( <a href="qpainter.html">QPainter</a> * painter, int row, int col )<tt> [virtual protected]</tt> </h3> Implements the basic drawing logic. Paints the line at row <em>row</em> using painter <em>painter</em>. The <em>col</em> parameter is ignored. <p>Reimplemented from <a href="qttableview.html#paintCell">QtTableView</a>. <h3 class=fn>void <a name="paste"></a>QtMultiLineEdit::paste ()<tt> [slot]</tt> </h3> Copies plain text from the clipboard onto the current cursor position. Any marked text is first deleted. <h3 class=fn>void <a name="pasteSubType"></a>QtMultiLineEdit::pasteSubType ( const <a href="qcstring.html">QCString</a> & subtype )<tt> [slot]</tt> </h3> Copies text in MIME subtype <em>subtype</em> from the clipboard onto the current cursor position. Any marked text is first deleted. <h3 class=fn>void <a name="redo"></a>QtMultiLineEdit::redo ()<tt> [slot]</tt> </h3> Redoes the last text operation. <h3 class=fn>void <a name="redoAvailable"></a>QtMultiLineEdit::redoAvailable ( bool yes )<tt> [signal]</tt> </h3> <p> This signal is emitted when the availability of redo changes. If <em>yes</em> is TRUE, then <a href="#redo">redo</a>() will work until <a href="#redoAvailable">redoAvailable</a>( FALSE ) is next emitted. <h3 class=fn>void <a name="removeLine"></a>QtMultiLineEdit::removeLine ( int line )<tt> [virtual]</tt> </h3> Deletes the line at line number <em>line</em>. If <em>line</em> is less than zero, or larger than the number of lines, no line is deleted. <h3 class=fn>void <a name="returnPressed"></a>QtMultiLineEdit::returnPressed ()<tt> [signal]</tt> </h3> <p> This signal is emitted when the user presses the return or enter key. It is not emitted if <a href="#isReadOnly">isReadOnly</a>() is TRUE. <p> <p>See also <a href="#textChanged">textChanged</a>(). <h3 class=fn>void <a name="selectAll"></a>QtMultiLineEdit::selectAll ()<tt> [slot]</tt> </h3> Selects all text without moving the cursor. <h3 class=fn>void <a name="setAlignment"></a>QtMultiLineEdit::setAlignment ( int flags ) </h3><p>Sets the alignment to <em>flags</em>. See the <a href="qtmultilineedit.html#alignment-prop">"alignment"</a> property for details. <h3 class=fn>void <a name="setAutoUpdate"></a>QtMultiLineEdit::setAutoUpdate ( bool )<tt> [virtual]</tt> </h3><p>Sets whether auto update is enabled. See the <a href="qtmultilineedit.html#autoUpdate-prop">"autoUpdate"</a> property for details. <p>Reimplemented from <a href="qttableview.html#setAutoUpdate">QtTableView</a>. <h3 class=fn>void <a name="setCursorPosition"></a>QtMultiLineEdit::setCursorPosition ( int line, int col, bool mark = FALSE )<tt> [virtual]</tt> </h3> Sets the cursor position to character number <em>col</em> in line 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> <p>See also <a href="#cursorPosition">cursorPosition</a>(). <h3 class=fn>void <a name="setDefaultTabStop"></a>QtMultiLineEdit::setDefaultTabStop ( int ex )<tt> [static]</tt> </h3> Sets the distance between tab stops for all QtMultiLineEdit instances to <em>ex</em>, which is measured in multiples of the width of a lower case 'x' in the widget's font. The initial value is 8. <p> <b>Warning:</b> This function does not cause a redraw. It is best to call it before any QtMultiLineEdit widgets are shown. <p> <p>See also <a href="#defaultTabStop">defaultTabStop</a>(). <h3 class=fn>void <a name="setEchoMode"></a>QtMultiLineEdit::setEchoMode ( <a href="qtmultilineedit.html#EchoMode-enum">EchoMode</a> )<tt> [virtual]</tt> </h3><p>Sets the echo mode. See the <a href="qtmultilineedit.html#echoMode-prop">"echoMode"</a> property for details. <h3 class=fn>void <a name="setEdited"></a>QtMultiLineEdit::setEdited ( bool ) </h3><p>Sets whether the text had been edited. See the <a href="qtmultilineedit.html#edited-prop">"edited"</a> property for details. <h3 class=fn>void <a name="setFixedVisibleLines"></a>QtMultiLineEdit::setFixedVisibleLines ( int lines )<tt> [virtual]</tt> </h3> Sets the fixed height of the QtMultiLineEdit so that <em>lines</em> text lines are visible given the current font. <p> <p>See also <a href="#maxLines-prop">maxLines</a> and <a href="qwidget.html#setFixedHeight">setFixedHeight</a>(). <h3 class=fn>void <a name="setHMargin"></a>QtMultiLineEdit::setHMargin ( int )<tt> [virtual]</tt> </h3><p>Sets the horizontal margin The horizontal margin current set. The default is 3. See the <a href="qtmultilineedit.html#hMargin-prop">"hMargin"</a> property for details. <h3 class=fn>void <a name="setMaxLength"></a>QtMultiLineEdit::setMaxLength ( int ) </h3><p>Sets the maximum length of the text. See the <a href="qtmultilineedit.html#maxLength-prop">"maxLength"</a> property for details. <h3 class=fn>void <a name="setMaxLineLength"></a>QtMultiLineEdit::setMaxLineLength ( int m )<tt> [virtual]</tt> </h3> Sets the maximum length of lines to <em>m</em>. Use -1 for unlimited (the default). Existing long lines will be truncated. <p> <p>See also <a href="#maxLineLength">maxLineLength</a>(). <h3 class=fn>void <a name="setMaxLines"></a>QtMultiLineEdit::setMaxLines ( int )<tt> [virtual]</tt> </h3><p>Sets the maximum number of lines The currently set line limit, or -1 if there is no limit (the default). See the <a href="qtmultilineedit.html#maxLines-prop">"maxLines"</a> property for details. <h3 class=fn>void <a name="setOverwriteMode"></a>QtMultiLineEdit::setOverwriteMode ( bool )<tt> [virtual slot]</tt> </h3><p>Sets the overwrite mode. See the <a href="qtmultilineedit.html#overWriteMode-prop">"overWriteMode"</a> property for details. <h3 class=fn>void <a name="setReadOnly"></a>QtMultiLineEdit::setReadOnly ( bool )<tt> [virtual slot]</tt> </h3><p>Sets whether the multi-line edit is read-only. See the <a href="qtmultilineedit.html#readOnly-prop">"readOnly"</a> property for details. <h3 class=fn>void <a name="setSelection"></a>QtMultiLineEdit::setSelection ( int row_from, int col_from, int row_to, int col_to )<tt> [virtual]</tt> </h3> Marks the text starting at <em>row_from</em>, <em>col_from</em> and ending at <em>row_to</em>, <em>col_to</em>. <h3 class=fn>void <a name="setText"></a>QtMultiLineEdit::setText ( const <a href="qstring.html">QString</a> & )<tt> [virtual slot]</tt> </h3><p>Sets the multi-line edit's text. See the <a href="qtmultilineedit.html#text-prop">"text"</a> property for details. <h3 class=fn>void <a name="setUndoDepth"></a>QtMultiLineEdit::setUndoDepth ( int ) </h3><p>Sets the undo depth. See the <a href="qtmultilineedit.html#undoDepth-prop">"undoDepth"</a> property for details. <h3 class=fn>void <a name="setUndoEnabled"></a>QtMultiLineEdit::setUndoEnabled ( bool ) </h3><p>Sets whether undo is enabled. See the <a href="qtmultilineedit.html#undoEnabled-prop">"undoEnabled"</a> property for details. <h3 class=fn>void <a name="setValidator"></a>QtMultiLineEdit::setValidator ( const <a href="qvalidator.html">QValidator</a> * v )<tt> [virtual]</tt> </h3> Not supported at this time. <em>v</em> is the validator to set. <h3 class=fn>void <a name="setWordWrap"></a>QtMultiLineEdit::setWordWrap ( <a href="qtmultilineedit.html#WordWrap-enum">WordWrap</a> mode ) </h3><p>Sets the word wrap mode to <em>mode</em>. See the <a href="qtmultilineedit.html#wordWrap-prop">"wordWrap"</a> property for details. <h3 class=fn>void <a name="setWrapColumnOrWidth"></a>QtMultiLineEdit::setWrapColumnOrWidth ( int ) </h3><p>Sets the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode. See the <a href="qtmultilineedit.html#wrapColumnOrWidth-prop">"wrapColumnOrWidth"</a> property for details. <h3 class=fn>void <a name="setWrapPolicy"></a>QtMultiLineEdit::setWrapPolicy ( <a href="qtmultilineedit.html#WrapPolicy-enum">WrapPolicy</a> policy ) </h3><p>Sets the wrap policy mode The default is <a href="#WrapPolicy-enum">AtWhiteSpace</a> to <em>policy</em>. See the <a href="qtmultilineedit.html#wrapPolicy-prop">"wrapPolicy"</a> property for details. <h3 class=fn><a href="qstring.html">QString</a> <a name="stringShown"></a>QtMultiLineEdit::stringShown ( int row ) const<tt> [protected]</tt> </h3> Returns the string shown at line <em>row</em>, including processing of the <a href="#echoMode">echoMode</a>(). <h3 class=fn><a href="qstring.html">QString</a> <a name="text"></a>QtMultiLineEdit::text () const </h3><p>Returns the multi-line edit's text. See the <a href="qtmultilineedit.html#text-prop">"text"</a> property for details. <h3 class=fn>void <a name="textChanged"></a>QtMultiLineEdit::textChanged ()<tt> [signal]</tt> </h3> <p> 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 <a href="#insertLine">insertLine</a>(). <p> <p>See also <a href="#returnPressed">returnPressed</a>(). <h3 class=fn><a href="qstring.html">QString</a> <a name="textLine"></a>QtMultiLineEdit::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. <h3 class=fn>int <a name="textWidth"></a>QtMultiLineEdit::textWidth ( int line )<tt> [protected]</tt> </h3> Returns the width in pixels of the text at line <em>line</em>. <h3 class=fn>int <a name="textWidth-2"></a>QtMultiLineEdit::textWidth ( const <a href="qstring.html">QString</a> & s )<tt> [protected]</tt> </h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function. <p> Returns the width in pixels of the string <em>s</em>. NOTE: only appropriate for whole lines. <h3 class=fn>void <a name="undo"></a>QtMultiLineEdit::undo ()<tt> [slot]</tt> </h3> Undoes the last text operation. <h3 class=fn>void <a name="undoAvailable"></a>QtMultiLineEdit::undoAvailable ( bool yes )<tt> [signal]</tt> </h3> <p> This signal is emitted when the availability of undo changes. If <em>yes</em> is TRUE, then <a href="#undo">undo</a>() will work until <a href="#undoAvailable">undoAvailable</a>( FALSE ) is next emitted. <h3 class=fn>int <a name="undoDepth"></a>QtMultiLineEdit::undoDepth () const </h3><p>Returns the undo depth. See the <a href="qtmultilineedit.html#undoDepth-prop">"undoDepth"</a> property for details. <h3 class=fn>const <a href="qvalidator.html">QValidator</a> * <a name="validator"></a>QtMultiLineEdit::validator () const </h3> Not supported at this time. <h3 class=fn><a href="qtmultilineedit.html#WordWrap-enum">WordWrap</a> <a name="wordWrap"></a>QtMultiLineEdit::wordWrap () const </h3><p>Returns the word wrap mode. See the <a href="qtmultilineedit.html#wordWrap-prop">"wordWrap"</a> property for details. <h3 class=fn>int <a name="wrapColumnOrWidth"></a>QtMultiLineEdit::wrapColumnOrWidth () const </h3><p>Returns the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode. See the <a href="qtmultilineedit.html#wrapColumnOrWidth-prop">"wrapColumnOrWidth"</a> property for details. <h3 class=fn><a href="qtmultilineedit.html#WrapPolicy-enum">WrapPolicy</a> <a name="wrapPolicy"></a>QtMultiLineEdit::wrapPolicy () const </h3><p>Returns the wrap policy mode The default is <a href="#WrapPolicy-enum">AtWhiteSpace</a>. See the <a href="qtmultilineedit.html#wrapPolicy-prop">"wrapPolicy"</a> property for details. <hr><h2>Property Documentation</h2> <h3 class=fn>Alignment <a name="alignment-prop"></a>alignment</h3> <p>This property holds the alignment. <p>Possible values are <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>, <tt>Align(H)Center</tt> and <a href="qt.html#AlignmentFlags-enum">AlignRight</a>. <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 at the beginning. <p>atBeginning() returns TRUE if the cursor is placed at the beginning of the text. <p>Get this property's value with <a href="#atBeginning">atBeginning</a>(). <h3 class=fn>bool <a name="atEnd-prop"></a>atEnd</h3> <p>This property holds whether the cursor is at the end. <p>atEnd() returns TRUE if the cursor is placed at the end of the text. <p>Get this property's value with <a href="#atEnd">atEnd</a>(). <h3 class=fn>bool <a name="autoUpdate-prop"></a>autoUpdate</h3> <p>This property holds whether auto update is enabled. <p>autoUpdate() returns TRUE if the view updates itself automatically whenever it is changed in some way. <p> If <a href="#autoUpdate">autoUpdate</a>() is TRUE (this is the default) then the editor updates itself automatically whenever it has changed in some way (generally, when text has been inserted or deleted). <p> If autoUpdate() is FALSE, the view does NOT repaint itself, or update its internal state variables itself when it is changed. This can be useful to avoid flicker during large changes, and is singularly useless otherwise: Disable auto-update, do the changes, re-enable auto-update, and call <a href="qttableview.html#repaint">repaint</a>(). <p> <b>Warning:</b> Do not leave the view in this state for a long time (i.e. between events ). If, for example, the user interacts with the view when auto-update is off, strange things can happen. <p> Setting auto-update to TRUE does not repaint the view, you must call repaint() to do this (preferable repaint(FALSE) to avoid flicker). <p> <p>See also <a href="#autoUpdate-prop">autoUpdate</a> and <a href="qttableview.html#repaint">repaint</a>(). <p> <p>Set this property's value with <a href="#setAutoUpdate">setAutoUpdate</a>() and get this property's value with <a href="#autoUpdate">autoUpdate</a>(). <h3 class=fn><a href="qtmultilineedit.html#EchoMode-enum">EchoMode</a> <a name="echoMode-prop"></a>echoMode</h3> <p>This property holds the echo mode. <p> <p>Set this property's value with <a href="#setEchoMode">setEchoMode</a>() and get this property's value with <a href="#echoMode">echoMode</a>(). <h3 class=fn>bool <a name="edited-prop"></a>edited</h3> <p>This property holds whether the text had been edited. <p>edited() returns the edited flag of the line edit. If this returns FALSE, the contents has not been changed since the construction of the QtMultiLineEdit (or the last call to <a href="#setEdited">setEdited</a>( FALSE ), if any). If it returns TRUE, the contents have been edited, or setEdited( TRUE ) has been called. <p> setEdited() sets the edited flag of this line edit to <em>e</em>. The edited flag is never read by QtMultiLineEdit, but is changed to TRUE whenever the user changes its contents. <p> This is useful e.g. for things that need to provide a default value, but cannot find the default at once. Just open the widget without the best default and when the default is known, check the <a href="#edited">edited</a>() return value and set the line edit's contents if the user has not started editing the line edit. Another example is to detect whether the contents need saving. <p> <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="hMargin-prop"></a>hMargin</h3> <p>This property holds the horizontal margin The horizontal margin current set. The default is 3. <p> <p>Set this property's value with <a href="#setHMargin">setHMargin</a>() and get this property's value with <a href="#hMargin">hMargin</a>(). <h3 class=fn>int <a name="length-prop"></a>length</h3> <p>This property holds the length of the text. <p> <p>Get this property's value with <a href="#length">length</a>(). <h3 class=fn>int <a name="maxLength-prop"></a>maxLength</h3> <p>This property holds the maximum length of the text. <p>The currently set text length limit, or -1 if there is no limit (this is the default). <p> <p>Set this property's value with <a href="#setMaxLength">setMaxLength</a>() and get this property's value with <a href="#maxLength">maxLength</a>(). <h3 class=fn>int <a name="maxLineWidth-prop"></a>maxLineWidth</h3> <p>This property holds the maximum line width in pixels Returns the width in pixels of the longest text line in this editor. <p> <p>Get this property's value with <a href="#maxLineWidth">maxLineWidth</a>(). <h3 class=fn>int <a name="maxLines-prop"></a>maxLines</h3> <p>This property holds the maximum number of lines The currently set line limit, or -1 if there is no limit (the default). <p>Note that excess lines are deleted from the <em>bottom</em> of the lines. If you want teletype behaviour with lines disappearing from the <em>top</em> as the limit is exceed, you probably just want to use <a href="#removeLine">removeLine</a>(0) prior to adding an excess line. <p> <p>Set this property's value with <a href="#setMaxLines">setMaxLines</a>() and get this property's value with <a href="#maxLines">maxLines</a>(). <h3 class=fn>int <a name="numLines-prop"></a>numLines</h3> <p>This property holds the number of lines in the multi-line edit. <p>numLines() returns the number of lines in the editor. The count includes any empty lines at top and bottom, so for an empty editor this method will return 1. <p>Get this property's value with <a href="#numLines">numLines</a>(). <h3 class=fn>bool <a name="overWriteMode-prop"></a>overWriteMode</h3> <p>This property holds the overwrite mode. <p> <p>Set this property's value with <a href="#setOverwriteMode">setOverwriteMode</a>() and get this property's value with <a href="#isOverwriteMode">isOverwriteMode</a>(). <h3 class=fn>bool <a name="readOnly-prop"></a>readOnly</h3> <p>This property holds whether the multi-line edit is read-only. <p> <p>Set this property's value with <a href="#setReadOnly">setReadOnly</a>() and get this property's value with <a href="#isReadOnly">isReadOnly</a>(). <h3 class=fn><a href="qstring.html">QString</a> <a name="text-prop"></a>text</h3> <p>This property holds the multi-line edit's text. <p> <p>Set this property's value with <a href="#setText">setText</a>() and get this property's value with <a href="#text">text</a>(). <h3 class=fn>int <a name="undoDepth-prop"></a>undoDepth</h3> <p>This property holds the undo depth. <p>The maximum number of operations that can be stored on the undo stack. <p> <p>See also <a href="#undoDepth-prop">undoDepth</a>. <p>Set this property's value with <a href="#setUndoDepth">setUndoDepth</a>() and get this property's value with <a href="#undoDepth">undoDepth</a>(). <h3 class=fn>bool <a name="undoEnabled-prop"></a>undoEnabled</h3> <p>This property holds whether undo is enabled. <p> <p>Set this property's value with <a href="#setUndoEnabled">setUndoEnabled</a>() and get this property's value with <a href="#isUndoEnabled">isUndoEnabled</a>(). <h3 class=fn><a href="qtmultilineedit.html#WordWrap-enum">WordWrap</a> <a name="wordWrap-prop"></a>wordWrap</h3> <p>This property holds the word wrap mode. <p>By default, wrapping keeps words intact. To allow breaking within words, set the wrap policy to <a href="#WrapPolicy-enum">Anywhere</a> (see <a href="#setWrapPolicy">setWrapPolicy</a>() ). <p> The default wrap mode is <a href="#WordWrap-enum">NoWrap</a>. <p> <p>See also <a href="#wordWrap-prop">wordWrap</a>, <a href="#wrapColumnOrWidth-prop">wrapColumnOrWidth</a> and <a href="#wrapPolicy-prop">wrapPolicy</a>. <p>Set this property's value with <a href="#setWordWrap">setWordWrap</a>() and get this property's value with <a href="#wordWrap">wordWrap</a>(). <h3 class=fn>int <a name="wrapColumnOrWidth-prop"></a>wrapColumnOrWidth</h3> <p>This property holds the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode. <p>Set this property's value with <a href="#setWrapColumnOrWidth">setWrapColumnOrWidth</a>() and get this property's value with <a href="#wrapColumnOrWidth">wrapColumnOrWidth</a>(). <p><p>See also <a href="#wordWrap-prop">wordWrap</a> and <a href="#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>. <h3 class=fn><a href="qtmultilineedit.html#WrapPolicy-enum">WrapPolicy</a> <a name="wrapPolicy-prop"></a>wrapPolicy</h3> <p>This property holds the wrap policy mode The default is <a href="#WrapPolicy-enum">AtWhiteSpace</a>. <p> <p>Set this property's value with <a href="#setWrapPolicy">setWrapPolicy</a>() and get this property's value with <a href="#wrapPolicy">wrapPolicy</a>(). <!-- eof --> <hr><p> This file is part of the <a href="index.html">Qt toolkit</a>. Copyright © 1995-2001 <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 © 2001 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a> <td align=right><div align=right>Qt version 3.0.2</div> </table></div></address></body> </html>