File: qtexttableformat.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (42 lines) | stat: -rw-r--r-- 10,074 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTextTableFormat Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTextTableFormat Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextTableFormat class provides formatting information for tables in a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>
<p>Inherits <a href="qtextframeformat.html">QTextFrameFormat</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtexttableformat.html#QTextTableFormat">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#QTextTableFormat-2">__init__</a></b> (<i>self</i>, QTextTableFormat)</li><li><div class="fn" />Qt.Alignment <b><a href="qtexttableformat.html#alignment">alignment</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtexttableformat.html#cellPadding">cellPadding</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtexttableformat.html#cellSpacing">cellSpacing</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#clearColumnWidthConstraints">clearColumnWidthConstraints</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtexttableformat.html#columns">columns</a></b> (<i>self</i>)</li><li><div class="fn" />QTextLength-list <b><a href="qtexttableformat.html#columnWidthConstraints">columnWidthConstraints</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtexttableformat.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#setAlignment">setAlignment</a></b> (<i>self</i>, Qt.Alignment&#160;<i>aalignment</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#setCellPadding">setCellPadding</a></b> (<i>self</i>, float&#160;<i>apadding</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#setCellSpacing">setCellSpacing</a></b> (<i>self</i>, float&#160;<i>spacing</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#setColumns">setColumns</a></b> (<i>self</i>, int&#160;<i>acolumns</i>)</li><li><div class="fn" /><b><a href="qtexttableformat.html#setColumnWidthConstraints">setColumnWidthConstraints</a></b> (<i>self</i>, QTextLength-list&#160;<i>constraints</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextTableFormat class provides formatting information for tables in a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>A table is a group of cells ordered into rows and columns. Each table contains at least one row and one column. Each cell contains a block. Tables in rich text documents are formatted using the properties defined in this class.</p>
<p>Tables are horizontally justified within their parent frame according to the table's alignment. This can be read with the <a href="qtexttableformat.html#alignment">alignment</a>() function and set with <a href="qtexttableformat.html#setAlignment">setAlignment</a>().</p>
<p>Cells within the table are separated by cell spacing. The number of pixels between cells is set with <a href="qtexttableformat.html#setCellSpacing">setCellSpacing</a>() and read with <a href="qtexttableformat.html#cellSpacing">cellSpacing</a>(). The contents of each cell is surrounded by cell padding. The number of pixels between each cell edge and its contents is set with <a href="qtexttableformat.html#setCellPadding">setCellPadding</a>() and read with <a href="qtexttableformat.html#cellPadding">cellPadding</a>().</p>
<p align="center"><img src="images/qtexttableformat-cell.png" /></p>
<p>The table's background color can be read with the backgroundColor() function, and can be specified with setBackgroundColor(). The background color of each cell can be set independently, and will control the color of the cell within the padded area.</p>
<p>The table format also provides a way to constrain the widths of the columns in the table. Columns can be assigned a fixed width, a variable width, or a percentage of the available width (see <a href="qtextlength.html">QTextLength</a>). The <a href="qtexttableformat.html#columns">columns</a>() function returns the number of columns with constraints, and the <a href="qtexttableformat.html#columnWidthConstraints">columnWidthConstraints</a>() function returns the constraints defined for the table. These quantities can also be set by calling <a href="qtexttableformat.html#setColumnWidthConstraints">setColumnWidthConstraints</a>() with a vector containing new constraints. The <a href="qtexttableformat.html#setColumns">setColumns</a>() function can be used to change the number of constraints in use. If no constraints are required, <a href="qtexttableformat.html#clearColumnWidthConstraints">clearColumnWidthConstraints</a>() can be used to remove them.</p>
<p>See also <a href="qtexttable.html">QTextTable</a>, <a href="qtexttablecell.html">QTextTableCell</a>, and <a href="qtextlength.html">QTextLength</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextTableFormat" />QTextTableFormat.__init__ (<i>self</i>)</h3><p>Constructs a new table format object.</p>
<h3 class="fn"><a name="QTextTableFormat-2" />QTextTableFormat.__init__ (<i>self</i>, <a href="qtexttableformat.html">QTextTableFormat</a>)</h3><h3 class="fn"><a name="alignment" /><a href="qt-alignment.html">Qt.Alignment</a> QTextTableFormat.alignment (<i>self</i>)</h3><p>Returns the table's alignment.</p>
<p>See also <a href="qtexttableformat.html#setAlignment">setAlignment</a>().</p>
<h3 class="fn"><a name="cellPadding" />float QTextTableFormat.cellPadding (<i>self</i>)</h3><p>Returns the table's cell padding. This describes the distance between the border of a cell and its contents.</p>
<p>See also <a href="qtexttableformat.html#setCellPadding">setCellPadding</a>().</p>
<h3 class="fn"><a name="cellSpacing" />float QTextTableFormat.cellSpacing (<i>self</i>)</h3><p>Returns the table's cell spacing. This describes the distance between adjacent cells.</p>
<p>See also <a href="qtexttableformat.html#setCellSpacing">setCellSpacing</a>().</p>
<h3 class="fn"><a name="clearColumnWidthConstraints" />QTextTableFormat.clearColumnWidthConstraints (<i>self</i>)</h3><p>Clears the column width constraints for the table.</p>
<p>See also <a href="qtexttableformat.html#columnWidthConstraints">columnWidthConstraints</a>() and <a href="qtexttableformat.html#setColumnWidthConstraints">setColumnWidthConstraints</a>().</p>
<h3 class="fn"><a name="columns" />int QTextTableFormat.columns (<i>self</i>)</h3><p>Returns the number of columns specified by the table format.</p>
<p>See also <a href="qtexttableformat.html#setColumns">setColumns</a>().</p>
<h3 class="fn"><a name="columnWidthConstraints" />QTextLength-list QTextTableFormat.columnWidthConstraints (<i>self</i>)</h3><p>Returns a list of constraints used by this table format to control the appearance of columns in a table.</p>
<p>See also <a href="qtexttableformat.html#setColumnWidthConstraints">setColumnWidthConstraints</a>().</p>
<h3 class="fn"><a name="isValid" />bool QTextTableFormat.isValid (<i>self</i>)</h3><p>Returns true if this table format is valid; otherwise returns false.</p>
<h3 class="fn"><a name="setAlignment" />QTextTableFormat.setAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>aalignment</i>)</h3><p>Sets the table's <i>alignment</i>.</p>
<p>See also <a href="qtexttableformat.html#alignment">alignment</a>().</p>
<h3 class="fn"><a name="setCellPadding" />QTextTableFormat.setCellPadding (<i>self</i>, float&#160;<i>apadding</i>)</h3><p>Sets the cell <i>padding</i> for the table. This determines the distance between the border of a cell and its contents.</p>
<p>See also <a href="qtexttableformat.html#cellPadding">cellPadding</a>().</p>
<h3 class="fn"><a name="setCellSpacing" />QTextTableFormat.setCellSpacing (<i>self</i>, float&#160;<i>spacing</i>)</h3><p>Sets the cell <i>spacing</i> for the table. This determines the distance between adjacent cells.</p>
<p>See also <a href="qtexttableformat.html#cellSpacing">cellSpacing</a>().</p>
<h3 class="fn"><a name="setColumns" />QTextTableFormat.setColumns (<i>self</i>, int&#160;<i>acolumns</i>)</h3><p>Sets the number of <i>columns</i> required by the table format.</p>
<p>See also <a href="qtexttableformat.html#columns">columns</a>().</p>
<h3 class="fn"><a name="setColumnWidthConstraints" />QTextTableFormat.setColumnWidthConstraints (<i>self</i>, QTextLength-list&#160;<i>constraints</i>)</h3><p>Sets the column width <i>constraints</i> for the table.</p>
<p>See also <a href="qtexttableformat.html#columnWidthConstraints">columnWidthConstraints</a>() and <a href="qtexttableformat.html#clearColumnWidthConstraints">clearColumnWidthConstraints</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>