|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QTextFormat
com.trolltech.qt.gui.QTextFrameFormat
com.trolltech.qt.gui.QTextTableFormat
public class QTextTableFormat
The QTextTableFormat class provides formatting information for tables in a QTextDocument.
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.
Tables are horizontally justified within their parent frame according to the table's alignment. This can be read with the alignment function and set with setAlignment.
Cells within the table are separated by cell spacing. The number of pixels between cells is set with setCellSpacing and read with cellSpacing. The contents of each cell is surrounded by cell padding. The number of pixels between each cell edge and its contents is set with setCellPadding and read with cellPadding.
The table's background color can be read with the background function, and can be specified with setBackground. The background color of each cell can be set independently, and will control the color of the cell within the padded area.
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 QTextLength). The columns function returns the number of columns with constraints, and the columnWidthConstraints function returns the constraints defined for the table. These quantities can also be set by calling setColumnWidthConstraints with a vector containing new constraints. If no constraints are required, clearColumnWidthConstraints can be used to remove them.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QTextFrameFormat |
---|
QTextFrameFormat.BorderStyle, QTextFrameFormat.Position |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QTextFormat |
---|
QTextFormat.FormatType, QTextFormat.ObjectTypes, QTextFormat.PageBreakFlag, QTextFormat.PageBreakFlags, QTextFormat.Property |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QTextTableFormat()
Constructs a new table format object. |
Method Summary | |
---|---|
Qt.Alignment |
alignment()
Returns the table's alignment. |
double |
cellPadding()
Returns the table's cell padding. |
double |
cellSpacing()
Returns the table's cell spacing. |
void |
clearColumnWidthConstraints()
Clears the column width constraints for the table. |
int |
columns()
Returns the number of columns specified by the table format. |
java.util.List<QTextLength> |
columnWidthConstraints()
Returns a list of constraints used by this table format to control the appearance of columns in a table. |
static QTextTableFormat |
fromNativePointer(QNativePointer nativePointer)
This function returns the QTextTableFormat instance pointed to by nativePointer |
int |
headerRowCount()
Returns the number of rows in the table that define the header. |
boolean |
isValid()
Returns true if this table format is valid; otherwise returns false. |
static QNativePointer |
nativePointerArray(QTextTableFormat[] array)
This function returns a QNativePointer that is pointing to the specified QTextTableFormat array. |
void |
setAlignment(Qt.Alignment alignment)
Sets the table's alignment. |
void |
setAlignment(Qt.AlignmentFlag... alignment)
Sets the table's alignment. |
void |
setCellPadding(double padding)
Sets the cell padding for the table. |
void |
setCellSpacing(double spacing)
Sets the cell spacing for the table. |
void |
setColumns(int columns)
|
void |
setColumnWidthConstraints(java.util.List<QTextLength> constraints)
Sets the column width constraints for the table. |
void |
setHeaderRowCount(int count)
Declares the first count rows of the table as table header. |
Methods inherited from class com.trolltech.qt.gui.QTextFrameFormat |
---|
border, borderBrush, borderStyle, bottomMargin, height, leftMargin, margin, nativePointerArray, padding, pageBreakPolicy, position, rightMargin, setBorder, setBorderBrush, setBorderStyle, setBottomMargin, setHeight, setHeight, setLeftMargin, setMargin, setPadding, setPageBreakPolicy, setPageBreakPolicy, setPosition, setRightMargin, setTopMargin, setWidth, setWidth, topMargin, width |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QTextTableFormat()
Constructs a new table format object.
Method Detail |
---|
public final Qt.Alignment alignment()
Returns the table's alignment.
public final double cellPadding()
Returns the table's cell padding. This describes the distance between the border of a cell and its contents.
public final double cellSpacing()
Returns the table's cell spacing. This describes the distance between adjacent cells.
public final void clearColumnWidthConstraints()
Clears the column width constraints for the table.
public final java.util.List<QTextLength> columnWidthConstraints()
Returns a list of constraints used by this table format to control the appearance of columns in a table.
public final int columns()
Returns the number of columns specified by the table format.
public final int headerRowCount()
Returns the number of rows in the table that define the header.
public final boolean isValid()
Returns true if this table format is valid; otherwise returns false.
isValid
in class QTextFrameFormat
public final void setAlignment(Qt.AlignmentFlag... alignment)
Sets the table's alignment.
public final void setAlignment(Qt.Alignment alignment)
Sets the table's alignment.
public final void setCellPadding(double padding)
Sets the cell padding for the table. This determines the distance between the border of a cell and its contents.
public final void setCellSpacing(double spacing)
Sets the cell spacing for the table. This determines the distance between adjacent cells.
public final void setColumnWidthConstraints(java.util.List<QTextLength> constraints)
Sets the column width constraints for the table.
public final void setColumns(int columns)
public final void setHeaderRowCount(int count)
Declares the first count rows of the table as table header. The table header rows get repeated when a table is broken across a page boundary.
public static QTextTableFormat fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QTextTableFormat[] array)
array
- the array that the returned pointer will point to.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |