<class name="QTextTableFormat" doc="/** <p>The <a href="QTextTableFormat.html#QTextTableFormat()"><tt>QTextTableFormat</tt></a> class provides formatting information for tables in a <a href="QTextDocument.html"><tt>QTextDocument</tt></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()"><tt>alignment</tt></a> function and set with <a href="QTextTableFormat.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)"><tt>setAlignment</tt></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(double)"><tt>setCellSpacing</tt></a> and read with <a href="QTextTableFormat.html#cellSpacing()"><tt>cellSpacing</tt></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(double)"><tt>setCellPadding</tt></a> and read with <a href="QTextTableFormat.html#cellPadding()"><tt>cellPadding</tt></a>.</p> <p align="center"><img src="%2E%2E/images/qtexttableformat-cell.png" /></p><p>The table's background color can be read with the <a href="QTextFormat.html#background()"><tt>background</tt></a> function, and can be specified with <a href="QTextFormat.html#setBackground(com.trolltech.qt.gui.QBrush)"><tt>setBackground</tt></a>. 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"><tt>QTextLength</tt></a>). The <a href="QTextTableFormat.html#columns()"><tt>columns</tt></a> function returns the number of columns with constraints, and the <a href="QTextTableFormat.html#columnWidthConstraints()"><tt>columnWidthConstraints</tt></a> function returns the constraints defined for the table. These quantities can also be set by calling <a href="QTextTableFormat.html#setColumnWidthConstraints(java.util.List<com.trolltech.qt.gui.QTextLength>)"><tt>setColumnWidthConstraints</tt></a> with a vector containing new constraints. If no constraints are required, <a href="QTextTableFormat.html#clearColumnWidthConstraints()"><tt>clearColumnWidthConstraints</tt></a> can be used to remove them.</p> @see <a href="QTextTable.html"><tt>QTextTable</tt></a> @see <a href="QTextTableCell.html"><tt>QTextTableCell</tt></a> @see <a href="QTextLength.html"><tt>QTextLength</tt></a> */"> <method name="public QTextTableFormat()" doc="/** <p>Constructs a new table format object.</p> */"/> <method name="public final com.trolltech.qt.core.Qt.Alignment alignment()" doc="/** <p>Returns the table's alignment.</p> @see <a href="QTextTableFormat.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)"><tt>setAlignment</tt></a> */"/> <method name="public final double cellPadding()" doc="/** <p>Returns the table's cell padding. This describes the distance between the border of a cell and its contents.</p> @see <a href="QTextTableFormat.html#setCellPadding(double)"><tt>setCellPadding</tt></a> */"/> <method name="public final double cellSpacing()" doc="/** <p>Returns the table's cell spacing. This describes the distance between adjacent cells.</p> @see <a href="QTextTableFormat.html#setCellSpacing(double)"><tt>setCellSpacing</tt></a> */"/> <method name="public final void clearColumnWidthConstraints()" doc="/** <p>Clears the column width constraints for the table.</p> @see <a href="QTextTableFormat.html#columnWidthConstraints()"><tt>columnWidthConstraints</tt></a> @see <a href="QTextTableFormat.html#setColumnWidthConstraints(java.util.List<com.trolltech.qt.gui.QTextLength>)"><tt>setColumnWidthConstraints</tt></a> */"/> <method name="public final java.util.List<com.trolltech.qt.gui.QTextLength> columnWidthConstraints()" doc="/** <p>Returns a list of constraints used by this table format to control the appearance of columns in a table.</p> @see <a href="QTextTableFormat.html#setColumnWidthConstraints(java.util.List<com.trolltech.qt.gui.QTextLength>)"><tt>setColumnWidthConstraints</tt></a> */"/> <method name="public final int columns()" doc="/** <p>Returns the number of columns specified by the table format.</p> @see <a href="QTextTableFormat.html#setColumns(int)"><tt>setColumns</tt></a> */"/> <method name="public final int headerRowCount()" doc="/** <p>Returns the number of rows in the table that define the header.</p> @see <a href="QTextTableFormat.html#setHeaderRowCount(int)"><tt>setHeaderRowCount</tt></a> */"/> <method name="public final boolean isValid()" doc="/** <p>Returns true if this table format is valid; otherwise returns false.</p> */"/> <method name="public final void setAlignment(com.trolltech.qt.core.Qt.Alignment alignment)" doc="/** <p>Sets the table's <tt>alignment</tt>.</p> @see <a href="QTextTableFormat.html#alignment()"><tt>alignment</tt></a> */"/> <method name="public final void setCellPadding(double padding)" doc="/** <p>Sets the cell <tt>padding</tt> for the table. This determines the distance between the border of a cell and its contents.</p> @see <a href="QTextTableFormat.html#cellPadding()"><tt>cellPadding</tt></a> */"/> <method name="public final void setCellSpacing(double spacing)" doc="/** <p>Sets the cell <tt>spacing</tt> for the table. This determines the distance between adjacent cells.</p> @see <a href="QTextTableFormat.html#cellSpacing()"><tt>cellSpacing</tt></a> */"/> <method name="public final void setColumnWidthConstraints(java.util.List<com.trolltech.qt.gui.QTextLength> constraints)" doc="/** <p>Sets the column width <tt>constraints</tt> for the table.</p> @see <a href="QTextTableFormat.html#columnWidthConstraints()"><tt>columnWidthConstraints</tt></a> @see <a href="QTextTableFormat.html#clearColumnWidthConstraints()"><tt>clearColumnWidthConstraints</tt></a> */"/> <method name="public final void setColumns(int columns)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTextTableFormat.html#columns()"><tt>columns</tt></a> */"/> <method name="public final void setHeaderRowCount(int count)" doc="/** <p>Declares the first <tt>count</tt> rows of the table as table header. The table header rows get repeated when a table is broken across a page boundary.</p> @see <a href="QTextTableFormat.html#headerRowCount()"><tt>headerRowCount</tt></a> */"/> </class>