|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.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()
.
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.
QTextTable
, QTextTableCell
, and QTextLength
.
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.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
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. |
QTextTableFormat |
clone()
This method is reimplemented for internal reasons |
int |
columns()
Returns the number of columns specified by the table format. |
java.util.List |
columnWidthConstraints()
Returns a list of constraints used by this table format to control the appearance of columns in a table. |
int |
headerRowCount()
Returns the number of rows in the table that define the header. |
void |
setAlignment(Qt.Alignment alignment)
Sets the table's alignment. |
void |
setAlignment(Qt.AlignmentFlag[] alignment)
This is an overloaded method provided for convenience. |
void |
setCellPadding(double padding)
Sets the cell padding for the table. |
void |
setCellSpacing(double spacing)
Sets the cell spacing for the table. |
void |
setColumnWidthConstraints(java.util.List 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, 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, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
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()
Method Detail |
---|
public final Qt.Alignment alignment()
setAlignment()
.
public final double cellPadding()
setCellPadding()
.
public final double cellSpacing()
setCellSpacing()
.
public final void clearColumnWidthConstraints()
columnWidthConstraints()
, and setColumnWidthConstraints()
.
public final java.util.List columnWidthConstraints()
setColumnWidthConstraints()
.
public final int columns()
public final int headerRowCount()
setHeaderRowCount()
.
public final void setAlignment(Qt.AlignmentFlag[] alignment)
public final void setAlignment(Qt.Alignment alignment)
alignment()
.
public final void setCellPadding(double padding)
cellPadding()
.
public final void setCellSpacing(double spacing)
cellSpacing()
.
public final void setColumnWidthConstraints(java.util.List constraints)
columnWidthConstraints()
, and clearColumnWidthConstraints()
.
public final void setHeaderRowCount(int count)
headerRowCount()
.
public QTextTableFormat clone()
clone
in class QTextFrameFormat
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |