<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qtextformat.cpp --> <title>Qt 4.8: QTextFormat Class Reference</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li><a href="modules.html">Modules</a></li> <li><a href="qtgui.html">QtGui</a></li> <li>QTextFormat</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-types">Public Types</a></li> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">QTextFormat Class Reference</h1> <!-- $$$QTextFormat-brief --> <p>The QTextFormat class provides formatting information for a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p> <!-- @@@QTextFormat --> <pre class="cpp"> <span class="preprocessor">#include <QTextFormat></span></pre><p><b>Inherited by: </b><a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextcharformat.html">QTextCharFormat</a>, <a href="qtextframeformat.html">QTextFrameFormat</a>, and <a href="qtextlistformat.html">QTextListFormat</a>.</p> <p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p> <ul> <li><a href="qtextformat-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-types"></a> <h2>Public Types</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#FormatType-enum">FormatType</a></b> { InvalidFormat, BlockFormat, CharFormat, ListFormat, ..., UserFormat }</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#ObjectTypes-enum">ObjectTypes</a></b> { NoObject, ImageObject, TableObject, TableCellObject, UserObject }</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#PageBreakFlag-enum">PageBreakFlag</a></b> { PageBreak_Auto, PageBreak_AlwaysBefore, PageBreak_AlwaysAfter }</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#PageBreakFlag-enum">PageBreakFlags</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#Property-enum">Property</a></b> { ObjectIndex, CssFloat, LayoutDirection, OutlinePen, ..., UserProperty }</td></tr> </table> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#QTextFormat">QTextFormat</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#QTextFormat-2">QTextFormat</a></b> ( int <i>type</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#QTextFormat-3">QTextFormat</a></b> ( const QTextFormat & <i>other</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#dtor.QTextFormat">~QTextFormat</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#background">background</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#boolProperty">boolProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#brushProperty">brushProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#clearBackground">clearBackground</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#clearForeground">clearForeground</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#clearProperty">clearProperty</a></b> ( int <i>propertyId</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#colorProperty">colorProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#doubleProperty">doubleProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#foreground">foreground</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#hasProperty">hasProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#intProperty">intProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isBlockFormat">isBlockFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isCharFormat">isCharFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isFrameFormat">isFrameFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isImageFormat">isImageFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isListFormat">isListFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isTableCellFormat">isTableCellFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isTableFormat">isTableFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#isValid">isValid</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> Qt::LayoutDirection </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#layoutDirection">layoutDirection</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextLength </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#lengthProperty">lengthProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVector<QTextLength> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#merge">merge</a></b> ( const QTextFormat & <i>other</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#objectIndex">objectIndex</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#objectType">objectType</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPen </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#penProperty">penProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QMap<int, QVariant> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#properties">properties</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#property">property</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#propertyCount">propertyCount</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setBackground">setBackground</a></b> ( const QBrush & <i>brush</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setForeground">setForeground</a></b> ( const QBrush & <i>brush</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setLayoutDirection">setLayoutDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setObjectIndex">setObjectIndex</a></b> ( int <i>index</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setObjectType">setObjectType</a></b> ( int <i>type</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setProperty">setProperty</a></b> ( int <i>propertyId</i>, const QVariant & <i>value</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#setProperty-2">setProperty</a></b> ( int <i>propertyId</i>, const QVector<QTextLength> & <i>value</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#stringProperty">stringProperty</a></b> ( int <i>propertyId</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextBlockFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toBlockFormat">toBlockFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toCharFormat">toCharFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextFrameFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toFrameFormat">toFrameFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextImageFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toImageFormat">toImageFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextListFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toListFormat">toListFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextTableCellFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toTableCellFormat">toTableCellFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextTableFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#toTableFormat">toTableFormat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#type">type</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#operator-QVariant">operator QVariant</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#operator-not-eq">operator!=</a></b> ( const QTextFormat & <i>other</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QTextFormat & </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#operator-eq">operator=</a></b> ( const QTextFormat & <i>other</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextformat.html#operator-eq-eq">operator==</a></b> ( const QTextFormat & <i>other</i> ) const</td></tr> </table> <a name="details"></a> <!-- $$$QTextFormat-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The QTextFormat class provides formatting information for a <a href="qtextdocument.html">QTextDocument</a>.</p> <p>A QTextFormat is a generic class used for describing the format of parts of a <a href="qtextdocument.html">QTextDocument</a>. The derived classes <a href="qtextcharformat.html">QTextCharFormat</a>, <a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextlistformat.html">QTextListFormat</a>, and <a href="qtexttableformat.html">QTextTableFormat</a> are usually more useful, and describe the formatting that is applied to specific parts of the document.</p> <p>A format has a <tt>FormatType</tt> which specifies the kinds of text item it can format; e.g. a block of text, a list, a table, etc. A format also has various properties (some specific to particular format types), as described by the Property enum. Every property has a corresponding Property.</p> <p>The format type is given by <a href="qtextformat.html#type">type</a>(), and the format can be tested with <a href="qtextformat.html#isCharFormat">isCharFormat</a>(), <a href="qtextformat.html#isBlockFormat">isBlockFormat</a>(), <a href="qtextformat.html#isListFormat">isListFormat</a>(), <a href="qtextformat.html#isTableFormat">isTableFormat</a>(), <a href="qtextformat.html#isFrameFormat">isFrameFormat</a>(), and <a href="qtextformat.html#isImageFormat">isImageFormat</a>(). If the type is determined, it can be retrieved with <a href="qtextformat.html#toCharFormat">toCharFormat</a>(), <a href="qtextformat.html#toBlockFormat">toBlockFormat</a>(), <a href="qtextformat.html#toListFormat">toListFormat</a>(), <a href="qtextformat.html#toTableFormat">toTableFormat</a>(), <a href="qtextformat.html#toFrameFormat">toFrameFormat</a>(), and <a href="qtextformat.html#toImageFormat">toImageFormat</a>().</p> <p>A format's properties can be set with the <a href="qtextformat.html#setProperty">setProperty</a>() functions, and retrieved with <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), and <a href="qtextformat.html#stringProperty">stringProperty</a>() as appropriate. All the property IDs used in the format can be retrieved with allPropertyIds(). One format can be merged into another using <a href="qtextformat.html#merge">merge</a>().</p> <p>A format's object index can be set with <a href="qtextformat.html#setObjectIndex">setObjectIndex</a>(), and retrieved with <a href="qtextformat.html#objectIndex">objectIndex</a>(). These methods can be used to associate the format with a <a href="qtextobject.html">QTextObject</a>. It is used to represent lists, frames, and tables inside the document.</p> </div> <p><b>See also </b><a href="richtext.html">Rich Text Processing</a>.</p> <!-- @@@QTextFormat --> <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$FormatType$$$InvalidFormat$$$BlockFormat$$$CharFormat$$$ListFormat$$$TableFormat$$$FrameFormat$$$UserFormat --> <h3 class="fn"><a name="FormatType-enum"></a>enum QTextFormat::<span class="name">FormatType</span></h3> <p>This enum describes the text item a <a href="qtextformat.html">QTextFormat</a> object is formatting.</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::InvalidFormat</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">An invalid format as created by the default constructor</td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockFormat</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The object formats a text block</td></tr> <tr><td class="topAlign"><tt>QTextFormat::CharFormat</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The object formats a single character</td></tr> <tr><td class="topAlign"><tt>QTextFormat::ListFormat</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The object formats a list</td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableFormat</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The object formats a table</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameFormat</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The object formats a frame</td></tr> <tr><td class="topAlign"><tt>QTextFormat::UserFormat</tt></td><td class="topAlign"><tt>100</tt></td><td class="topAlign"> </td></tr> </table> <p><b>See also </b><a href="qtextcharformat.html">QTextCharFormat</a>, <a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextlistformat.html">QTextListFormat</a>, <a href="qtexttableformat.html">QTextTableFormat</a>, and <a href="qtextformat.html#type">type</a>().</p> <!-- @@@FormatType --> <!-- $$$ObjectTypes$$$NoObject$$$ImageObject$$$TableObject$$$TableCellObject$$$UserObject --> <h3 class="fn"><a name="ObjectTypes-enum"></a>enum QTextFormat::<span class="name">ObjectTypes</span></h3> <p>This enum describes what kind of <a href="qtextobject.html">QTextObject</a> this format is associated with.</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::NoObject</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::ImageObject</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableObject</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellObject</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::UserObject</tt></td><td class="topAlign"><tt>0x1000</tt></td><td class="topAlign">The first object that can be used for application-specific purposes.</td></tr> </table> <p><b>See also </b><a href="qtextobject.html">QTextObject</a>, <a href="qtexttable.html">QTextTable</a>, and <a href="qtextobject.html#format">QTextObject::format</a>().</p> <!-- @@@ObjectTypes --> <!-- $$$PageBreakFlag$$$PageBreak_Auto$$$PageBreak_AlwaysBefore$$$PageBreak_AlwaysAfter --> <h3 class="flags"><a name="PageBreakFlag-enum"></a>enum QTextFormat::<span class="name">PageBreakFlag</span><br/>flags QTextFormat::<span class="name">PageBreakFlags</span></h3> <p>This enum describes how page breaking is performed when printing. It maps to the corresponding css properties.</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::PageBreak_Auto</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The page break is determined automatically depending on the available space on the current page</td></tr> <tr><td class="topAlign"><tt>QTextFormat::PageBreak_AlwaysBefore</tt></td><td class="topAlign"><tt>0x001</tt></td><td class="topAlign">The page is always broken before the paragraph/table</td></tr> <tr><td class="topAlign"><tt>QTextFormat::PageBreak_AlwaysAfter</tt></td><td class="topAlign"><tt>0x010</tt></td><td class="topAlign">A new page is always started after the paragraph/table</td></tr> </table> <p>This enum was introduced or modified in Qt 4.2.</p> <p>The PageBreakFlags type is a typedef for <a href="qflags.html">QFlags</a><PageBreakFlag>. It stores an OR combination of PageBreakFlag values.</p> <p><b>See also </b><a href="qtextblockformat.html#pageBreakPolicy">QTextBlockFormat::pageBreakPolicy</a>(), <a href="qtextframeformat.html#pageBreakPolicy">QTextFrameFormat::pageBreakPolicy</a>(), and <a href="qtextformat.html#Property-enum">PageBreakPolicy</a>.</p> <!-- @@@PageBreakFlag --> <!-- $$$Property$$$ObjectIndex$$$CssFloat$$$LayoutDirection$$$OutlinePen$$$BackgroundBrush$$$ForegroundBrush$$$BackgroundImageUrl$$$BlockAlignment$$$BlockTopMargin$$$BlockBottomMargin$$$BlockLeftMargin$$$BlockRightMargin$$$TextIndent$$$TabPositions$$$BlockIndent$$$LineHeight$$$LineHeightType$$$BlockNonBreakableLines$$$BlockTrailingHorizontalRulerWidth$$$FirstFontProperty$$$FontCapitalization$$$FontLetterSpacing$$$FontWordSpacing$$$FontStyleHint$$$FontStyleStrategy$$$FontKerning$$$FontHintingPreference$$$FontFamily$$$FontPointSize$$$FontSizeAdjustment$$$FontSizeIncrement$$$FontWeight$$$FontItalic$$$FontUnderline$$$FontOverline$$$FontStrikeOut$$$FontFixedPitch$$$FontPixelSize$$$LastFontProperty$$$TextUnderlineColor$$$TextVerticalAlignment$$$TextOutline$$$TextUnderlineStyle$$$TextToolTip$$$IsAnchor$$$AnchorHref$$$AnchorName$$$ObjectType$$$ListStyle$$$ListIndent$$$ListNumberPrefix$$$ListNumberSuffix$$$FrameBorder$$$FrameMargin$$$FramePadding$$$FrameWidth$$$FrameHeight$$$FrameTopMargin$$$FrameBottomMargin$$$FrameLeftMargin$$$FrameRightMargin$$$FrameBorderBrush$$$FrameBorderStyle$$$TableColumns$$$TableColumnWidthConstraints$$$TableCellSpacing$$$TableCellPadding$$$TableHeaderRowCount$$$TableCellRowSpan$$$TableCellColumnSpan$$$TableCellTopPadding$$$TableCellBottomPadding$$$TableCellLeftPadding$$$TableCellRightPadding$$$ImageName$$$ImageWidth$$$ImageHeight$$$FullWidthSelection$$$PageBreakPolicy$$$UserProperty --> <h3 class="fn"><a name="Property-enum"></a>enum QTextFormat::<span class="name">Property</span></h3> <p>This enum describes the different properties a format can have.</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::ObjectIndex</tt></td><td class="topAlign"><tt>0x0</tt></td><td class="topAlign">The index of the formatted object. See <a href="qtextformat.html#objectIndex">objectIndex</a>().</td></tr> </table> <p>Paragraph and character properties</p> <table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::CssFloat</tt></td><td class="topAlign"><tt>0x0800</tt></td><td class="topAlign">How a frame is located relative to the surrounding text</td></tr> <tr><td class="topAlign"><tt>QTextFormat::LayoutDirection</tt></td><td class="topAlign"><tt>0x0801</tt></td><td class="topAlign">The layout direction of the text in the document (<a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a>).</td></tr> <tr><td class="topAlign"><tt>QTextFormat::OutlinePen</tt></td><td class="topAlign"><tt>0x810</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::ForegroundBrush</tt></td><td class="topAlign"><tt>0x821</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BackgroundBrush</tt></td><td class="topAlign"><tt>0x820</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BackgroundImageUrl</tt></td><td class="topAlign"><tt>0x823</tt></td><td class="topAlign"> </td></tr> </table> <p>Paragraph properties</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockAlignment</tt></td><td class="topAlign"><tt>0x1010</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockTopMargin</tt></td><td class="topAlign"><tt>0x1030</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockBottomMargin</tt></td><td class="topAlign"><tt>0x1031</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockLeftMargin</tt></td><td class="topAlign"><tt>0x1032</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockRightMargin</tt></td><td class="topAlign"><tt>0x1033</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TextIndent</tt></td><td class="topAlign"><tt>0x1034</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TabPositions</tt></td><td class="topAlign"><tt>0x1035</tt></td><td class="topAlign">Specifies the tab positions. The tab positions are structs of <a href="qtextoption-tab.html">QTextOption::Tab</a> which are stored in a <a href="qlist.html">QList</a> (internally, in a <a href="qlist.html">QList</a><<a href="qvariant.html">QVariant</a>>).</td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockIndent</tt></td><td class="topAlign"><tt>0x1040</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::LineHeight</tt></td><td class="topAlign"><tt>0x1048</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::LineHeightType</tt></td><td class="topAlign"><tt>0x1049</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockNonBreakableLines</tt></td><td class="topAlign"><tt>0x1050</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::BlockTrailingHorizontalRulerWidth</tt></td><td class="topAlign"><tt>0x1060</tt></td><td class="topAlign">The width of a horizontal ruler element.</td></tr> </table> <p>Character properties</p> <table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::FontFamily</tt></td><td class="topAlign"><tt>0x2000</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontPointSize</tt></td><td class="topAlign"><tt>0x2001</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontPixelSize</tt></td><td class="topAlign"><tt>0x2009</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontSizeAdjustment</tt></td><td class="topAlign"><tt>0x2002</tt></td><td class="topAlign">Specifies the change in size given to the fontsize already set using FontPointSize or FontPixelSize.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontFixedPitch</tt></td><td class="topAlign"><tt>0x2008</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontWeight</tt></td><td class="topAlign"><tt>0x2003</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontItalic</tt></td><td class="topAlign"><tt>0x2004</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontUnderline</tt></td><td class="topAlign"><tt>0x2005</tt></td><td class="topAlign"><i>This property has been deprecated.</i> Use QTextFormat::TextUnderlineStyle instead.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontOverline</tt></td><td class="topAlign"><tt>0x2006</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontStrikeOut</tt></td><td class="topAlign"><tt>0x2007</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontCapitalization</tt></td><td class="topAlign"><tt>FirstFontProperty</tt></td><td class="topAlign">Specifies the capitalization type that is to be applied to the text.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontLetterSpacing</tt></td><td class="topAlign"><tt>0x1FE1</tt></td><td class="topAlign">Changes the default spacing between individual letters in the font. The value is specified in percentage, with 100 as the default value.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontWordSpacing</tt></td><td class="topAlign"><tt>0x1FE2</tt></td><td class="topAlign">Changes the default spacing between individual words. A positive value increases the word spacing by the corresponding pixels; a negative value decreases the spacing.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontStyleHint</tt></td><td class="topAlign"><tt>0x1FE3</tt></td><td class="topAlign">Corresponds to the <a href="qfont.html#StyleHint-enum">QFont::StyleHint</a> property</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontStyleStrategy</tt></td><td class="topAlign"><tt>0x1FE4</tt></td><td class="topAlign">Corresponds to the <a href="qfont.html#StyleStrategy-enum">QFont::StyleStrategy</a> property</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontKerning</tt></td><td class="topAlign"><tt>0x1FE5</tt></td><td class="topAlign">Specifies whether the font has kerning turned on.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FontHintingPreference</tt></td><td class="topAlign"><tt>0x1FE6</tt></td><td class="topAlign">Controls the use of hinting according to values of the <a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a> enum.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::TextUnderlineColor</tt></td><td class="topAlign"><tt>0x2010</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TextVerticalAlignment</tt></td><td class="topAlign"><tt>0x2021</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TextOutline</tt></td><td class="topAlign"><tt>0x2022</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TextUnderlineStyle</tt></td><td class="topAlign"><tt>0x2023</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TextToolTip</tt></td><td class="topAlign"><tt>0x2024</tt></td><td class="topAlign">Specifies the (optional) tool tip to be displayed for a fragment of text.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::IsAnchor</tt></td><td class="topAlign"><tt>0x2030</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::AnchorHref</tt></td><td class="topAlign"><tt>0x2031</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::AnchorName</tt></td><td class="topAlign"><tt>0x2032</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::ObjectType</tt></td><td class="topAlign"><tt>0x2f00</tt></td><td class="topAlign"> </td></tr> </table> <p>List properties</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::ListStyle</tt></td><td class="topAlign"><tt>0x3000</tt></td><td class="topAlign">Specifies the style used for the items in a list, described by values of the <a href="qtextlistformat.html#Style-enum">QTextListFormat::Style</a> enum.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::ListIndent</tt></td><td class="topAlign"><tt>0x3001</tt></td><td class="topAlign">Specifies the amount of indentation used for a list.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::ListNumberPrefix</tt></td><td class="topAlign"><tt>0x3002</tt></td><td class="topAlign">Defines the text which is prepended to item numbers in numeric lists.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::ListNumberSuffix</tt></td><td class="topAlign"><tt>0x3003</tt></td><td class="topAlign">Defines the text which is appended to item numbers in numeric lists.</td></tr> </table> <p>Table and frame properties</p> <table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameBorder</tt></td><td class="topAlign"><tt>0x4000</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameBorderBrush</tt></td><td class="topAlign"><tt>0x4009</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameBorderStyle</tt></td><td class="topAlign"><tt>0x4010</tt></td><td class="topAlign">See the <a href="qtextframeformat.html#BorderStyle-enum">BorderStyle</a> enum.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameBottomMargin</tt></td><td class="topAlign"><tt>0x4006</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameHeight</tt></td><td class="topAlign"><tt>0x4004</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameLeftMargin</tt></td><td class="topAlign"><tt>0x4007</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameMargin</tt></td><td class="topAlign"><tt>0x4001</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FramePadding</tt></td><td class="topAlign"><tt>0x4002</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameRightMargin</tt></td><td class="topAlign"><tt>0x4008</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameTopMargin</tt></td><td class="topAlign"><tt>0x4005</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::FrameWidth</tt></td><td class="topAlign"><tt>0x4003</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellSpacing</tt></td><td class="topAlign"><tt>0x4102</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellPadding</tt></td><td class="topAlign"><tt>0x4103</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableColumns</tt></td><td class="topAlign"><tt>0x4100</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableColumnWidthConstraints</tt></td><td class="topAlign"><tt>0x4101</tt></td><td class="topAlign"> </td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableHeaderRowCount</tt></td><td class="topAlign"><tt>0x4104</tt></td><td class="topAlign"> </td></tr> </table> <p>Table cell properties</p> <table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellRowSpan</tt></td><td class="topAlign"><tt>0x4810</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellColumnSpan</tt></td><td class="topAlign"><tt>0x4811</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellLeftPadding</tt></td><td class="topAlign"><tt>0x4814</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellRightPadding</tt></td><td class="topAlign"><tt>0x4815</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellTopPadding</tt></td><td class="topAlign"><tt>0x4812</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::TableCellBottomPadding</tt></td><td class="topAlign"><tt>0x4813</tt></td></tr> </table> <p>Image properties</p> <table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr> <tr><td class="topAlign"><tt>QTextFormat::ImageName</tt></td><td class="topAlign"><tt>0x5000</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::ImageWidth</tt></td><td class="topAlign"><tt>0x5010</tt></td></tr> <tr><td class="topAlign"><tt>QTextFormat::ImageHeight</tt></td><td class="topAlign"><tt>0x5011</tt></td></tr> </table> <p>Selection properties</p> <table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::FullWidthSelection</tt></td><td class="topAlign"><tt>0x06000</tt></td><td class="topAlign">When set on the characterFormat of a selection, the whole width of the text will be shown selected.</td></tr> </table> <p>Page break properties</p> <table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><tt>QTextFormat::PageBreakPolicy</tt></td><td class="topAlign"><tt>0x7000</tt></td><td class="topAlign">Specifies how pages are broken. See the <a href="qtextformat.html#PageBreakFlag-enum">PageBreakFlag</a> enum.</td></tr> <tr><td class="topAlign"><tt>QTextFormat::UserProperty</tt></td><td class="topAlign"><tt>0x100000</tt></td><td class="topAlign"> </td></tr> </table> <p><b>See also </b><a href="qtextformat.html#property">property</a>() and <a href="qtextformat.html#setProperty">setProperty</a>().</p> <!-- @@@Property --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QTextFormat[overload1]$$$QTextFormat --> <h3 class="fn"><a name="QTextFormat"></a>QTextFormat::<span class="name">QTextFormat</span> ()</h3> <p>Creates a new text format with an <tt>InvalidFormat</tt>.</p> <p><b>See also </b><a href="qtextformat.html#FormatType-enum">FormatType</a>.</p> <!-- @@@QTextFormat --> <!-- $$$QTextFormat$$$QTextFormatint --> <h3 class="fn"><a name="QTextFormat-2"></a>QTextFormat::<span class="name">QTextFormat</span> ( <span class="type">int</span> <i>type</i> )</h3> <p>Creates a new text format of the given <i>type</i>.</p> <p><b>See also </b><a href="qtextformat.html#FormatType-enum">FormatType</a>.</p> <!-- @@@QTextFormat --> <!-- $$$QTextFormat$$$QTextFormatconstQTextFormat& --> <h3 class="fn"><a name="QTextFormat-3"></a>QTextFormat::<span class="name">QTextFormat</span> ( const <span class="type">QTextFormat</span> & <i>other</i> )</h3> <p>Creates a new text format with the same attributes as the <i>other</i> text format.</p> <!-- @@@QTextFormat --> <!-- $$$~QTextFormat[overload1]$$$~QTextFormat --> <h3 class="fn"><a name="dtor.QTextFormat"></a>QTextFormat::<span class="name">~QTextFormat</span> ()</h3> <p>Destroys this text format.</p> <!-- @@@~QTextFormat --> <!-- $$$background[overload1]$$$background --> <h3 class="fn"><a name="background"></a><span class="type"><a href="qbrush.html">QBrush</a></span> QTextFormat::<span class="name">background</span> () const</h3> <p>Returns the brush used to paint the document's background.</p> <p><b>See also </b><a href="qtextformat.html#setBackground">setBackground</a>(), <a href="qtextformat.html#clearBackground">clearBackground</a>(), and <a href="qtextformat.html#foreground">foreground</a>().</p> <!-- @@@background --> <!-- $$$boolProperty[overload1]$$$boolPropertyint --> <h3 class="fn"><a name="boolProperty"></a><span class="type">bool</span> QTextFormat::<span class="name">boolProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property specified by <i>propertyId</i>. If the property isn't of QTextFormat::Bool type, false is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@boolProperty --> <!-- $$$brushProperty[overload1]$$$brushPropertyint --> <h3 class="fn"><a name="brushProperty"></a><span class="type"><a href="qbrush.html">QBrush</a></span> QTextFormat::<span class="name">brushProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property given by <i>propertyId</i>; if the property isn't of <a href="qvariant.html#Type-enum">QVariant::Brush</a> type, <a href="qt.html#BrushStyle-enum">Qt::NoBrush</a> is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@brushProperty --> <!-- $$$clearBackground[overload1]$$$clearBackground --> <h3 class="fn"><a name="clearBackground"></a><span class="type">void</span> QTextFormat::<span class="name">clearBackground</span> ()</h3> <p>Clears the brush used to paint the document's background. The default brush will be used.</p> <p><b>See also </b><a href="qtextformat.html#background">background</a>(), <a href="qtextformat.html#setBackground">setBackground</a>(), and <a href="qtextformat.html#clearForeground">clearForeground</a>().</p> <!-- @@@clearBackground --> <!-- $$$clearForeground[overload1]$$$clearForeground --> <h3 class="fn"><a name="clearForeground"></a><span class="type">void</span> QTextFormat::<span class="name">clearForeground</span> ()</h3> <p>Clears the brush used to paint the document's foreground. The default brush will be used.</p> <p><b>See also </b><a href="qtextformat.html#foreground">foreground</a>(), <a href="qtextformat.html#setForeground">setForeground</a>(), and <a href="qtextformat.html#clearBackground">clearBackground</a>().</p> <!-- @@@clearForeground --> <!-- $$$clearProperty[overload1]$$$clearPropertyint --> <h3 class="fn"><a name="clearProperty"></a><span class="type">void</span> QTextFormat::<span class="name">clearProperty</span> ( <span class="type">int</span> <i>propertyId</i> )</h3> <p>Clears the value of the property given by <i>propertyId</i></p> <p><b>See also </b><a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@clearProperty --> <!-- $$$colorProperty[overload1]$$$colorPropertyint --> <h3 class="fn"><a name="colorProperty"></a><span class="type"><a href="qcolor.html">QColor</a></span> QTextFormat::<span class="name">colorProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property given by <i>propertyId</i>; if the property isn't of <a href="qvariant.html#Type-enum">QVariant::Color</a> type, an invalid color is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@colorProperty --> <!-- $$$doubleProperty[overload1]$$$doublePropertyint --> <h3 class="fn"><a name="doubleProperty"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextFormat::<span class="name">doubleProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property specified by <i>propertyId</i>. If the property isn't of <a href="qvariant.html#Type-enum">QVariant::Double</a> or <a href="qmetatype.html#Type-enum">QMetaType::Float</a> type, 0 is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@doubleProperty --> <!-- $$$foreground[overload1]$$$foreground --> <h3 class="fn"><a name="foreground"></a><span class="type"><a href="qbrush.html">QBrush</a></span> QTextFormat::<span class="name">foreground</span> () const</h3> <p>Returns the brush used to render foreground details, such as text, frame outlines, and table borders.</p> <p><b>See also </b><a href="qtextformat.html#setForeground">setForeground</a>(), <a href="qtextformat.html#clearForeground">clearForeground</a>(), and <a href="qtextformat.html#background">background</a>().</p> <!-- @@@foreground --> <!-- $$$hasProperty[overload1]$$$hasPropertyint --> <h3 class="fn"><a name="hasProperty"></a><span class="type">bool</span> QTextFormat::<span class="name">hasProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns true if the text format has a property with the given <i>propertyId</i>; otherwise returns false.</p> <p><b>See also </b><a href="qtextformat.html#properties">properties</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@hasProperty --> <!-- $$$intProperty[overload1]$$$intPropertyint --> <h3 class="fn"><a name="intProperty"></a><span class="type">int</span> QTextFormat::<span class="name">intProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property specified by <i>propertyId</i>. If the property is not of QTextFormat::Integer type, 0 is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@intProperty --> <!-- $$$isBlockFormat[overload1]$$$isBlockFormat --> <h3 class="fn"><a name="isBlockFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isBlockFormat</span> () const</h3> <p>Returns true if this text format is a <tt>BlockFormat</tt>; otherwise returns false.</p> <!-- @@@isBlockFormat --> <!-- $$$isCharFormat[overload1]$$$isCharFormat --> <h3 class="fn"><a name="isCharFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isCharFormat</span> () const</h3> <p>Returns true if this text format is a <tt>CharFormat</tt>; otherwise returns false.</p> <!-- @@@isCharFormat --> <!-- $$$isFrameFormat[overload1]$$$isFrameFormat --> <h3 class="fn"><a name="isFrameFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isFrameFormat</span> () const</h3> <p>Returns true if this text format is a <tt>FrameFormat</tt>; otherwise returns false.</p> <!-- @@@isFrameFormat --> <!-- $$$isImageFormat[overload1]$$$isImageFormat --> <h3 class="fn"><a name="isImageFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isImageFormat</span> () const</h3> <p>Returns true if this text format is an image format; otherwise returns false.</p> <!-- @@@isImageFormat --> <!-- $$$isListFormat[overload1]$$$isListFormat --> <h3 class="fn"><a name="isListFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isListFormat</span> () const</h3> <p>Returns true if this text format is a <tt>ListFormat</tt>; otherwise returns false.</p> <!-- @@@isListFormat --> <!-- $$$isTableCellFormat[overload1]$$$isTableCellFormat --> <h3 class="fn"><a name="isTableCellFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isTableCellFormat</span> () const</h3> <p>Returns true if this text format is a <tt>TableCellFormat</tt>; otherwise returns false.</p> <p>This function was introduced in Qt 4.4.</p> <!-- @@@isTableCellFormat --> <!-- $$$isTableFormat[overload1]$$$isTableFormat --> <h3 class="fn"><a name="isTableFormat"></a><span class="type">bool</span> QTextFormat::<span class="name">isTableFormat</span> () const</h3> <p>Returns true if this text format is a <tt>TableFormat</tt>; otherwise returns false.</p> <!-- @@@isTableFormat --> <!-- $$$isValid[overload1]$$$isValid --> <h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QTextFormat::<span class="name">isValid</span> () const</h3> <p>Returns true if the format is valid (i.e. is not <a href="qtextformat.html#FormatType-enum">InvalidFormat</a>); otherwise returns false.</p> <!-- @@@isValid --> <!-- $$$layoutDirection[overload1]$$$layoutDirection --> <h3 class="fn"><a name="layoutDirection"></a><span class="type"><a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> QTextFormat::<span class="name">layoutDirection</span> () const</h3> <p>Returns the document's layout direction.</p> <p><b>See also </b><a href="qtextformat.html#setLayoutDirection">setLayoutDirection</a>().</p> <!-- @@@layoutDirection --> <!-- $$$lengthProperty[overload1]$$$lengthPropertyint --> <h3 class="fn"><a name="lengthProperty"></a><span class="type"><a href="qtextlength.html">QTextLength</a></span> QTextFormat::<span class="name">lengthProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property given by <i>propertyId</i>.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@lengthProperty --> <!-- $$$lengthVectorProperty[overload1]$$$lengthVectorPropertyint --> <h3 class="fn"><a name="lengthVectorProperty"></a><span class="type"><a href="qvector.html">QVector</a></span><<span class="type"><a href="qtextlength.html">QTextLength</a></span>> QTextFormat::<span class="name">lengthVectorProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property given by <i>propertyId</i>. If the property isn't of QTextFormat::LengthVector type, an empty length vector is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@lengthVectorProperty --> <!-- $$$merge[overload1]$$$mergeconstQTextFormat& --> <h3 class="fn"><a name="merge"></a><span class="type">void</span> QTextFormat::<span class="name">merge</span> ( const <span class="type">QTextFormat</span> & <i>other</i> )</h3> <p>Merges the <i>other</i> format with this format; where there are conflicts the <i>other</i> format takes precedence.</p> <!-- @@@merge --> <!-- $$$objectIndex[overload1]$$$objectIndex --> <h3 class="fn"><a name="objectIndex"></a><span class="type">int</span> QTextFormat::<span class="name">objectIndex</span> () const</h3> <p>Returns the index of the format object, or -1 if the format object is invalid.</p> <p><b>See also </b><a href="qtextformat.html#setObjectIndex">setObjectIndex</a>().</p> <!-- @@@objectIndex --> <!-- $$$objectType[overload1]$$$objectType --> <h3 class="fn"><a name="objectType"></a><span class="type">int</span> QTextFormat::<span class="name">objectType</span> () const</h3> <p>Returns the text format's object type.</p> <p><b>See also </b><a href="qtextformat.html#ObjectTypes-enum">ObjectTypes</a> and <a href="qtextformat.html#setObjectType">setObjectType</a>().</p> <!-- @@@objectType --> <!-- $$$penProperty[overload1]$$$penPropertyint --> <h3 class="fn"><a name="penProperty"></a><span class="type"><a href="qpen.html">QPen</a></span> QTextFormat::<span class="name">penProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property given by <i>propertyId</i>; if the property isn't of <a href="qvariant.html#Type-enum">QVariant::Pen</a> type, <a href="qt.html#PenStyle-enum">Qt::NoPen</a> is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@penProperty --> <!-- $$$properties[overload1]$$$properties --> <h3 class="fn"><a name="properties"></a><span class="type"><a href="qmap.html">QMap</a></span><<span class="type">int</span>, <span class="type"><a href="qvariant.html">QVariant</a></span>> QTextFormat::<span class="name">properties</span> () const</h3> <p>Returns a map with all properties of this text format.</p> <!-- @@@properties --> <!-- $$$property[overload1]$$$propertyint --> <h3 class="fn"><a name="property"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QTextFormat::<span class="name">property</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the property specified by the given <i>propertyId</i>.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@property --> <!-- $$$propertyCount[overload1]$$$propertyCount --> <h3 class="fn"><a name="propertyCount"></a><span class="type">int</span> QTextFormat::<span class="name">propertyCount</span> () const</h3> <p>Returns the number of properties stored in the format.</p> <p>This function was introduced in Qt 4.3.</p> <!-- @@@propertyCount --> <!-- $$$setBackground[overload1]$$$setBackgroundconstQBrush& --> <h3 class="fn"><a name="setBackground"></a><span class="type">void</span> QTextFormat::<span class="name">setBackground</span> ( const <span class="type"><a href="qbrush.html">QBrush</a></span> & <i>brush</i> )</h3> <p>Sets the brush use to paint the document's background to the <i>brush</i> specified.</p> <p><b>See also </b><a href="qtextformat.html#background">background</a>(), <a href="qtextformat.html#clearBackground">clearBackground</a>(), and <a href="qtextformat.html#setForeground">setForeground</a>().</p> <!-- @@@setBackground --> <!-- $$$setForeground[overload1]$$$setForegroundconstQBrush& --> <h3 class="fn"><a name="setForeground"></a><span class="type">void</span> QTextFormat::<span class="name">setForeground</span> ( const <span class="type"><a href="qbrush.html">QBrush</a></span> & <i>brush</i> )</h3> <p>Sets the foreground brush to the specified <i>brush</i>. The foreground brush is mostly used to render text.</p> <p><b>See also </b><a href="qtextformat.html#foreground">foreground</a>(), <a href="qtextformat.html#clearForeground">clearForeground</a>(), and <a href="qtextformat.html#setBackground">setBackground</a>().</p> <!-- @@@setForeground --> <!-- $$$setLayoutDirection[overload1]$$$setLayoutDirectionQt::LayoutDirection --> <h3 class="fn"><a name="setLayoutDirection"></a><span class="type">void</span> QTextFormat::<span class="name">setLayoutDirection</span> ( <span class="type"><a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> <i>direction</i> )</h3> <p>Sets the document's layout direction to the specified <i>direction</i>.</p> <p><b>See also </b><a href="qtextformat.html#layoutDirection">layoutDirection</a>().</p> <!-- @@@setLayoutDirection --> <!-- $$$setObjectIndex[overload1]$$$setObjectIndexint --> <h3 class="fn"><a name="setObjectIndex"></a><span class="type">void</span> QTextFormat::<span class="name">setObjectIndex</span> ( <span class="type">int</span> <i>index</i> )</h3> <p>Sets the format object's object <i>index</i>.</p> <p><b>See also </b><a href="qtextformat.html#objectIndex">objectIndex</a>().</p> <!-- @@@setObjectIndex --> <!-- $$$setObjectType[overload1]$$$setObjectTypeint --> <h3 class="fn"><a name="setObjectType"></a><span class="type">void</span> QTextFormat::<span class="name">setObjectType</span> ( <span class="type">int</span> <i>type</i> )</h3> <p>Sets the text format's object type to <i>type</i>.</p> <p><b>See also </b><a href="qtextformat.html#ObjectTypes-enum">ObjectTypes</a> and <a href="qtextformat.html#objectType">objectType</a>().</p> <!-- @@@setObjectType --> <!-- $$$setProperty[overload1]$$$setPropertyintconstQVariant& --> <h3 class="fn"><a name="setProperty"></a><span class="type">void</span> QTextFormat::<span class="name">setProperty</span> ( <span class="type">int</span> <i>propertyId</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> & <i>value</i> )</h3> <p>Sets the property specified by the <i>propertyId</i> to the given <i>value</i>.</p> <p><b>See also </b><a href="qtextformat.html#property">property</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@setProperty --> <!-- $$$setProperty$$$setPropertyintconstQVector<QTextLength>& --> <h3 class="fn"><a name="setProperty-2"></a><span class="type">void</span> QTextFormat::<span class="name">setProperty</span> ( <span class="type">int</span> <i>propertyId</i>, const <span class="type"><a href="qvector.html">QVector</a></span><<span class="type"><a href="qtextlength.html">QTextLength</a></span>> & <i>value</i> )</h3> <p>Sets the value of the property given by <i>propertyId</i> to <i>value</i>.</p> <p><b>See also </b><a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@setProperty --> <!-- $$$stringProperty[overload1]$$$stringPropertyint --> <h3 class="fn"><a name="stringProperty"></a><span class="type"><a href="qstring.html">QString</a></span> QTextFormat::<span class="name">stringProperty</span> ( <span class="type">int</span> <i>propertyId</i> ) const</h3> <p>Returns the value of the property given by <i>propertyId</i>; if the property isn't of <a href="qvariant.html#Type-enum">QVariant::String</a> type, an empty string is returned instead.</p> <p><b>See also </b><a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(), and <a href="qtextformat.html#Property-enum">Property</a>.</p> <!-- @@@stringProperty --> <!-- $$$toBlockFormat[overload1]$$$toBlockFormat --> <h3 class="fn"><a name="toBlockFormat"></a><span class="type"><a href="qtextblockformat.html">QTextBlockFormat</a></span> QTextFormat::<span class="name">toBlockFormat</span> () const</h3> <p>Returns this format as a block format.</p> <!-- @@@toBlockFormat --> <!-- $$$toCharFormat[overload1]$$$toCharFormat --> <h3 class="fn"><a name="toCharFormat"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QTextFormat::<span class="name">toCharFormat</span> () const</h3> <p>Returns this format as a character format.</p> <!-- @@@toCharFormat --> <!-- $$$toFrameFormat[overload1]$$$toFrameFormat --> <h3 class="fn"><a name="toFrameFormat"></a><span class="type"><a href="qtextframeformat.html">QTextFrameFormat</a></span> QTextFormat::<span class="name">toFrameFormat</span> () const</h3> <p>Returns this format as a frame format.</p> <!-- @@@toFrameFormat --> <!-- $$$toImageFormat[overload1]$$$toImageFormat --> <h3 class="fn"><a name="toImageFormat"></a><span class="type"><a href="qtextimageformat.html">QTextImageFormat</a></span> QTextFormat::<span class="name">toImageFormat</span> () const</h3> <p>Returns this format as an image format.</p> <!-- @@@toImageFormat --> <!-- $$$toListFormat[overload1]$$$toListFormat --> <h3 class="fn"><a name="toListFormat"></a><span class="type"><a href="qtextlistformat.html">QTextListFormat</a></span> QTextFormat::<span class="name">toListFormat</span> () const</h3> <p>Returns this format as a list format.</p> <!-- @@@toListFormat --> <!-- $$$toTableCellFormat[overload1]$$$toTableCellFormat --> <h3 class="fn"><a name="toTableCellFormat"></a><span class="type"><a href="qtexttablecellformat.html">QTextTableCellFormat</a></span> QTextFormat::<span class="name">toTableCellFormat</span> () const</h3> <p>Returns this format as a table cell format.</p> <p>This function was introduced in Qt 4.4.</p> <!-- @@@toTableCellFormat --> <!-- $$$toTableFormat[overload1]$$$toTableFormat --> <h3 class="fn"><a name="toTableFormat"></a><span class="type"><a href="qtexttableformat.html">QTextTableFormat</a></span> QTextFormat::<span class="name">toTableFormat</span> () const</h3> <p>Returns this format as a table format.</p> <!-- @@@toTableFormat --> <!-- $$$type[overload1]$$$type --> <h3 class="fn"><a name="type"></a><span class="type">int</span> QTextFormat::<span class="name">type</span> () const</h3> <p>Returns the type of this format.</p> <p><b>See also </b><a href="qtextformat.html#FormatType-enum">FormatType</a>.</p> <!-- @@@type --> <!-- $$$operator QVariant[overload1]$$$operator QVariant --> <h3 class="fn"><a name="operator-QVariant"></a>QTextFormat::<span class="name">operator QVariant</span> () const</h3> <p>Returns the text format as a <a href="qvariant.html">QVariant</a></p> <!-- @@@operator QVariant --> <!-- $$$operator!=[overload1]$$$operator!=constQTextFormat& --> <h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QTextFormat::<span class="name">operator!=</span> ( const <span class="type">QTextFormat</span> & <i>other</i> ) const</h3> <p>Returns true if this text format is different from the <i>other</i> text format.</p> <!-- @@@operator!= --> <!-- $$$operator=[overload1]$$$operator=constQTextFormat& --> <h3 class="fn"><a name="operator-eq"></a><span class="type">QTextFormat</span> & QTextFormat::<span class="name">operator=</span> ( const <span class="type">QTextFormat</span> & <i>other</i> )</h3> <p>Assigns the <i>other</i> text format to this text format, and returns a reference to this text format.</p> <!-- @@@operator= --> <!-- $$$operator==[overload1]$$$operator==constQTextFormat& --> <h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QTextFormat::<span class="name">operator==</span> ( const <span class="type">QTextFormat</span> & <i>other</i> ) const</h3> <p>Returns true if this text format is the same as the <i>other</i> text format.</p> <!-- @@@operator== --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>