File: qtexttablecell.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (53 lines) | stat: -rw-r--r-- 9,158 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
43
44
45
46
47
48
49
50
51
52
53
<?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>QTextTableCell 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">QTextTableCell Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextTableCell class represents the properties of a cell in a <a href="qtexttable.html">QTextTable</a>. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtexttablecell.html#QTextTableCell">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtexttablecell.html#QTextTableCell-2">__init__</a></b> (<i>self</i>, QTextTableCell)</li><li><div class="fn" />int <b><a href="qtexttablecell.html#column">column</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtexttablecell.html#columnSpan">columnSpan</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCursor <b><a href="qtexttablecell.html#firstCursorPosition">firstCursorPosition</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCharFormat <b><a href="qtexttablecell.html#format">format</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtexttablecell.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCursor <b><a href="qtexttablecell.html#lastCursorPosition">lastCursorPosition</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtexttablecell.html#row">row</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtexttablecell.html#rowSpan">rowSpan</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtexttablecell.html#setFormat">setFormat</a></b> (<i>self</i>, QTextCharFormat)</li><li><div class="fn" />int <b><a href="qtexttablecell.html#tableCellFormatIndex">tableCellFormatIndex</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qtexttablecell.html#__eq__">__eq__</a></b> (<i>self</i>, QTextTableCell)</li><li><div class="fn" />bool <b><a href="qtexttablecell.html#__ne__">__ne__</a></b> (<i>self</i>, QTextTableCell)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextTableCell class represents the properties of a cell in a <a href="qtexttable.html">QTextTable</a>.</p>
<p>Table cells are pieces of document structure that belong to a table. The table orders cells into particular rows and columns; cells can also span multiple columns and rows.</p>
<p>Cells are usually created when a table is inserted into a document with <a href="qtextcursor.html#insertTable">QTextCursor.insertTable</a>(), but they are also created and destroyed when a table is resized.</p>
<p>Cells contain information about their location in a table; you can obtain the <a href="qtexttablecell.html#row">row</a>() and <a href="qtexttablecell.html#column">column</a>() numbers of a cell, and its <a href="qtexttablecell.html#rowSpan">rowSpan</a>() and <a href="qtexttablecell.html#columnSpan">columnSpan</a>().</p>
<p>The <a href="qtexttablecell.html#format">format</a>() of a cell describes the default character format of its contents. The <a href="qtexttablecell.html#firstCursorPosition">firstCursorPosition</a>() and <a href="qtexttablecell.html#lastCursorPosition">lastCursorPosition</a>() functions are used to obtain the extent of the cell in the document.</p>
<p>See also <a href="qtexttable.html">QTextTable</a> and <a href="qtexttableformat.html">QTextTableFormat</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextTableCell" />QTextTableCell.__init__ (<i>self</i>)</h3><p>Constructs an invalid table cell.</p>
<p>See also <a href="qtexttablecell.html#isValid">isValid</a>().</p>
<h3 class="fn"><a name="QTextTableCell-2" />QTextTableCell.__init__ (<i>self</i>, <a href="qtexttablecell.html">QTextTableCell</a>)</h3><p>Copy constructor. Creates a new <a href="qtexttablecell.html">QTextTableCell</a> object based on the <i>other</i> cell.</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/~QTextTableCell" />
<h3 class="fn"><a name="column" />int QTextTableCell.column (<i>self</i>)</h3><p>Returns the number of the column in the table that contains this cell.</p>
<p>See also <a href="qtexttablecell.html#row">row</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/columnSpan" />
<h3 class="fn"><a name="columnSpan" />int QTextTableCell.columnSpan (<i>self</i>)</h3><p>Returns the number of columns this cell spans. The default is 1.</p>
<p>See also <a href="qtexttablecell.html#rowSpan">rowSpan</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/end" />
<h3 class="fn"><a name="firstCursorPosition" /><a href="qtextcursor.html">QTextCursor</a> QTextTableCell.firstCursorPosition (<i>self</i>)</h3><p>Returns the first valid cursor position in this cell.</p>
<p>See also <a href="qtexttablecell.html#lastCursorPosition">lastCursorPosition</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/format" />
<h3 class="fn"><a name="format" /><a href="qtextcharformat.html">QTextCharFormat</a> QTextTableCell.format (<i>self</i>)</h3><p>Returns the cell's character format.</p>
<p>See also <a href="qtexttablecell.html#setFormat">setFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/isValid" />
<h3 class="fn"><a name="isValid" />bool QTextTableCell.isValid (<i>self</i>)</h3><p>Returns true if this is a valid table cell; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/lastCursorPosition" />
<h3 class="fn"><a name="lastCursorPosition" /><a href="qtextcursor.html">QTextCursor</a> QTextTableCell.lastCursorPosition (<i>self</i>)</h3><p>Returns the last valid cursor position in this cell.</p>
<p>See also <a href="qtexttablecell.html#firstCursorPosition">firstCursorPosition</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/row" />
<h3 class="fn"><a name="row" />int QTextTableCell.row (<i>self</i>)</h3><p>Returns the number of the row in the table that contains this cell.</p>
<p>See also <a href="qtexttablecell.html#column">column</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/rowSpan" />
<h3 class="fn"><a name="rowSpan" />int QTextTableCell.rowSpan (<i>self</i>)</h3><p>Returns the number of rows this cell spans. The default is 1.</p>
<p>See also <a href="qtexttablecell.html#columnSpan">columnSpan</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/setFormat" />
<h3 class="fn"><a name="setFormat" />QTextTableCell.setFormat (<i>self</i>, <a href="qtextcharformat.html">QTextCharFormat</a>)</h3><p>Sets the cell's character format to <i>format</i>. This can for example be used to change the background color of the entire cell:</p>
<p><a href="qtexttablecell.html">QTextTableCell</a> cell = table-&gt;cellAt(2, 3); <a href="qtextcharformat.html">QTextCharFormat</a> format = cell.<a href="qtexttablecell.html#format">format</a>(); format.setBackground(<a href="qt.html#GlobalColor-enum">Qt.blue</a>); cell.setFormat(format);</p>
<p>Note that the cell's row or column span cannot be changed through this function. You have to use QTextTable.mergeCells and QTextTable.splitCell instead.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qtexttablecell.html#format">format</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/tableCellFormatIndex" />
<h3 class="fn"><a name="tableCellFormatIndex" />int QTextTableCell.tableCellFormatIndex (<i>self</i>)</h3><p>Returns the index of the tableCell's format in the document's internal list of formats.</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qtextdocument.html#allFormats">QTextDocument.allFormats</a>().</p>
<a name="//apple_ref/cpp/instm/QTextTableCell/operator!=" />
<h3 class="fn"><a name="__eq__" />bool QTextTableCell.__eq__ (<i>self</i>, <a href="qtexttablecell.html">QTextTableCell</a>)</h3><h3 class="fn"><a name="__ne__" />bool QTextTableCell.__ne__ (<i>self</i>, <a href="qtexttablecell.html">QTextTableCell</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 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.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>