Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > b77dda48f87d4eda8cc559e40c49a652 > files > 497

python-kde4-doc-4.4.5-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>KRichTextEdit</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
  <div id="header_top">
    <div>
      <div>
        <img alt ="" src="../common/top-kde.jpg"/>
        KDE 4.4 PyKDE API Reference
      </div>
    </div>
  </div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li>KDE's Python API</li>
      </ul>
    </div>

    <div id="menu">
      <ul>
        <li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
    </div>
  </div>
</div>

<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer">&nbsp;</div>

<h1>KRichTextEdit Class Reference</h1>
<code>from PyKDE4.kdeui import *</code>
<p>
Inherits: <a href="../kdeui/KTextEdit.html">KTextEdit</a> &#x2192; <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtextedit.html">QTextEdit</a> &#x2192; <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qabstractscrollarea.html">QAbstractScrollArea</a> &#x2192; <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qframe.html">QFrame</a> &#x2192; <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a> &#x2192; <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a><br />
Subclasses: <a href="../kdeui/KRichTextWidget.html">KRichTextWidget</a><br />

<h2>Detailed Description</h2>

<p>The KRichTextEdit class provides a widget to edit and display rich text.
</p>
<p>
It offers several additional rich text editing functions to KTextEdit and makes
them easier to access including:
</p>
<p>
<li> Changing fonts, sizes. </li>
<li> Font formatting, such as bold, underline, italic, foreground and </li>
background color.
<li> Paragraph alignment </li>
<li> Ability to edit and remove hyperlinks </li>
<li> Nested list handling </li>
<li> Simple actions to insert tables. TODO </li>
</p>
<p>
The KRichTextEdit can be in two modes: Rich text mode and plain text mode.
Calling functions which modify the format/style of the text will automatically
enable the rich text mode. Rich text mode is sometimes also referred to as
HTML mode.
</p>
<p>
Do not call setAcceptRichText() or acceptRichText() yourself. Instead simply
connect to the slots which insert the rich text, use switchToPlainText() or
enableRichTextMode().
</p>
<p>
<div align="center"><img src="../images/krichtextedit.png" /><p><strong> "KDE Rich Text Edit Widget" </strong></p></div>
</p>
<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.1
</dd></dl>
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#Mode">Mode</a>&nbsp;</td><td class="memItemRight" valign="bottom">{&nbsp;Plain, Rich&nbsp;}</td></tr>
<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#selectionFinished">selectionFinished</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#textModeChanged">textModeChanged</a> (, <a href="../kdeui/KRichTextEdit.html#Mode">KRichTextEdit.Mode</a> mode)</td></tr>
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#KRichTextEdit">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> text, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a> parent=0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#KRichTextEdit">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a> parent=0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#alignCenter">alignCenter</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#alignJustify">alignJustify</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#alignLeft">alignLeft</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#alignRight">alignRight</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#canDedentList">canDedentList</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#canIndentList">canIndentList</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#currentLinkText">currentLinkText</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#currentLinkUrl">currentLinkUrl</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#enableRichTextMode">enableRichTextMode</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#indentListLess">indentListLess</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#indentListMore">indentListMore</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#insertHorizontalRule">insertHorizontalRule</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#keyPressEvent">keyPressEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qkeyevent.html">QKeyEvent</a> event)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#selectLinkText">selectLinkText</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtextcursor.html">QTextCursor</a> cursor)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#selectLinkText">selectLinkText</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#selectionFinished">selectionFinished</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setFont">setFont</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qfont.html">QFont</a> font)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setFontFamily">setFontFamily</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> fontFamily)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setFontSize">setFontSize</a> (self, int size)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setListStyle">setListStyle</a> (self, int _styleIndex)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextBackgroundColor">setTextBackgroundColor</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcolor.html">QColor</a> color)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextBold">setTextBold</a> (self, bool bold)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextForegroundColor">setTextForegroundColor</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcolor.html">QColor</a> color)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextItalic">setTextItalic</a> (self, bool italic)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextOrHtml">setTextOrHtml</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> text)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextStrikeOut">setTextStrikeOut</a> (self, bool strikeOut)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextSubScript">setTextSubScript</a> (self, bool subscript)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextSuperScript">setTextSuperScript</a> (self, bool superscript)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setTextUnderline">setTextUnderline</a> (self, bool underline)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#switchToPlainText">switchToPlainText</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdeui/KRichTextEdit.html#Mode">KRichTextEdit.Mode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#textMode">textMode</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#textModeChanged">textModeChanged</a> (self, <a href="../kdeui/KRichTextEdit.html#Mode">KRichTextEdit.Mode</a> mode)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#textOrHtml">textOrHtml</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#toCleanHtml">toCleanHtml</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#updateLink">updateLink</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> linkUrl, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> linkText)</td></tr>
</table>
<hr><h2>Method Documentation</h2><a class="anchor" name="KRichTextEdit"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a>&nbsp;</td>
<td class="paramname"><em>parent=0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Constructs a KRichTextEdit object
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>text</em>&nbsp;</td><td> The initial text of the text edit, which is interpreted as
HTML.

<tr><td></td><td valign="top"><em>parent</em>&nbsp;</td><td> The parent widget
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="KRichTextEdit"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html">QWidget</a>&nbsp;</td>
<td class="paramname"><em>parent=0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Constructs a KRichTextEdit object.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>parent</em>&nbsp;</td><td> The parent widget
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="alignCenter"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> alignCenter</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Sets the alignment of the current block to Centered
</p></div></div><a class="anchor" name="alignJustify"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> alignJustify</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Sets the alignment of the current block to Justified
</p></div></div><a class="anchor" name="alignLeft"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> alignLeft</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Sets the alignment of the current block to Left Aligned
</p></div></div><a class="anchor" name="alignRight"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> alignRight</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Sets the alignment of the current block to Right Aligned
</p></div></div><a class="anchor" name="canDedentList"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool canDedentList</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns true if the list item at the current position can be dedented.
</p>
<p>
@sa canIndentList
</p></div></div><a class="anchor" name="canIndentList"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool canIndentList</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns true if the list item at the current position can be indented.
</p>
<p>
@sa canDedentList
</p></div></div><a class="anchor" name="currentLinkText"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> currentLinkText</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the text of the link at the current position or an empty string
if the cursor is not on a link.
</p>
<p>
@sa currentLinkUrl
<dl class="return" compact><dt><b>Returns:</b></dt><dd> The link text
</dd></dl>
</p></div></div><a class="anchor" name="currentLinkUrl"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> currentLinkUrl</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the URL target (href) of the link at the current position or an
empty string if the cursor is not on a link.
</p>
<p>
@sa currentLinkText
<dl class="return" compact><dt><b>Returns:</b></dt><dd> The link target URL
</dd></dl>
</p></div></div><a class="anchor" name="enableRichTextMode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> enableRichTextMode</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>This enables rich text mode. Nothing is done except changing the internal
mode and allowing rich text pastes.
</p></div></div><a class="anchor" name="indentListLess"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> indentListLess</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Decreases the nesting level of the current block or selected blocks.
</p>
<p>
@sa canDedentList
</p></div></div><a class="anchor" name="indentListMore"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> indentListMore</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Increases the nesting level of the current block or selected blocks.
</p>
<p>
@sa canIndentList
</p></div></div><a class="anchor" name="insertHorizontalRule"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> insertHorizontalRule</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Inserts a horizontal rule below the current block.
</p></div></div><a class="anchor" name="keyPressEvent"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> keyPressEvent</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qkeyevent.html">QKeyEvent</a>&nbsp;</td>
<td class="paramname"><em>event</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Reimplemented.
Catches key press events. Used to handle some key presses on lists.
</p></div></div><a class="anchor" name="selectLinkText"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> selectLinkText</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtextcursor.html">QTextCursor</a>&nbsp;</td>
<td class="paramname"><em>cursor</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Convenience function to select the link text using the active cursor.
</p>
<p>
@sa selectLinkText
</p></div></div><a class="anchor" name="selectLinkText"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> selectLinkText</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Convenience function to select the link text using the active cursor.
</p>
<p>
@sa selectLinkText
</p></div></div><a class="anchor" name="selectionFinished"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> selectionFinished</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Emitted whenever the user has finished making a selection. (on mouse up)
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("selectionFinished()"), target_slot)</code></dd></dl></div></div><a class="anchor" name="setFont"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setFont</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qfont.html">QFont</a>&nbsp;</td>
<td class="paramname"><em>font</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the current word or selection to the font <b>font</b>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>font</em>&nbsp;</td><td> the font of the text will be set to this font
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setFontFamily"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setFontFamily</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>fontFamily</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the current word or selection to the font family <b>fontFamily</b>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>fontFamily</em>&nbsp;</td><td> The text's font family will be changed to this one
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setFontSize"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setFontSize</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"><em>size</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the current word or selection to the font size <b>size</b>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>size</em>&nbsp;</td><td> The text's font will get this size
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setListStyle"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setListStyle</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"><em>_styleIndex</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the list style of the current list, or creates a new list using the
current block. The <b>_styleindex</b> corresponds to the QTextListFormat.Style
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>_styleIndex</em>&nbsp;</td><td> The list will get this style
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextBackgroundColor"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextBackgroundColor</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcolor.html">QColor</a>&nbsp;</td>
<td class="paramname"><em>color</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the background color of the current word or selection to <b>color.</b>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>color</em>&nbsp;</td><td> The text will get this foreground color
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextBold"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextBold</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>bold</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Toggles the bold formatting of the current word or selection at the current
cursor position.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>bold</em>&nbsp;</td><td> If true, the text will be set to bold
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextForegroundColor"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextForegroundColor</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcolor.html">QColor</a>&nbsp;</td>
<td class="paramname"><em>color</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Sets the foreground color of the current word or selection to <b>color.</b>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>color</em>&nbsp;</td><td> The text will get this background color
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextItalic"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextItalic</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>italic</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Toggles the italic formatting of the current word or selection at the current
cursor position.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>italic</em>&nbsp;</td><td> If true, the text will be set to italic
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextOrHtml"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextOrHtml</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>text</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Replaces all the content of the text edit with the given string.
If the string is in rich text format, the text is inserted as rich text,
otherwise it is inserted as plain text.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>text</em>&nbsp;</td><td> The text to insert
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextStrikeOut"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextStrikeOut</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>strikeOut</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Toggles the strikeout formatting of the current word or selection at the current
cursor position.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>strikeOut</em>&nbsp;</td><td> If true, the text will be struck out
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextSubScript"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextSubScript</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>subscript</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Toggles the subscript formatting of the current word or selection at the current
cursor position.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>subscript</em>&nbsp;</td><td> If true, the text will be set to subscript
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextSuperScript"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextSuperScript</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>superscript</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Toggles the superscript formatting of the current word or selection at the current
cursor position.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>superscript</em>&nbsp;</td><td> If true, the text will be set to superscript
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="setTextUnderline"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setTextUnderline</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"><em>underline</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Toggles the underline formatting of the current word or selection at the current
cursor position.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>underline</em>&nbsp;</td><td> If true, the text will be underlined
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="switchToPlainText"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> switchToPlainText</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>This will switch the editor to plain text mode.
All rich text formatting will be destroyed.
</p></div></div><a class="anchor" name="textMode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../kdeui/KRichTextEdit.html#Mode">KRichTextEdit.Mode</a> textMode</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The current text mode
</dd></dl>
</p></div></div><a class="anchor" name="textModeChanged"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> textModeChanged</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdeui/KRichTextEdit.html#Mode">KRichTextEdit.Mode</a>&nbsp;</td>
<td class="paramname"><em>mode</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Emitted whenever the text mode is changed.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>mode</em>&nbsp;</td><td> The new text mode
</td></tr>
</table></dl>
<p>
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("textModeChanged(KRichTextEdit::Mode)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="textOrHtml"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> textOrHtml</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The plain text string if in plain text mode or the HTML code
if in rich text mode. The text is not word-wrapped.
</dd></dl>
</p></div></div><a class="anchor" name="toCleanHtml"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> toCleanHtml</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>This will clean some of the bad html produced by the underlying QTextEdit
It walks over all lines and cleans up a bit. Should be improved to produce
our own Html.
</p></div></div><a class="anchor" name="updateLink"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> updateLink</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>linkUrl</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a>&nbsp;</td>
<td class="paramname"><em>linkText</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Replaces the current selection with a hyperlink with the link URL <b>linkUrl</b>
and the link text <b>linkText.</b>
</p>
<p>
@sa selectLinkText
@sa currentLinkUrl
@sa currentLinkText
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>linkUrl</em>&nbsp;</td><td> The link will get this URL as href (target)

<tr><td></td><td valign="top"><em>linkText</em>&nbsp;</td><td> The link will get this alternative text, which is the
text displayed in the text edit.
</td></tr>
</table></dl>
<p>
</p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="Mode"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr><td class="memname">Mode</td>
</tr>
</table>
</div>
<div class="memdoc"><p>The mode the edit widget is in.
</p><dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>Plain</em>&nbsp;</td><td><tr><td valign="top"><em>Rich</em>&nbsp;</td><td></table>
</dl>
</div></div><p>
</div>
</div>
</div>

<div id="left">

<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>

<a name="cp-menu" /><div class="menutitle"><div>
  <h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>

</div>

</div>
  <div class="clearer"/>
</div>

<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a>
    </div></div>
</body>
</html>