|
|
||||||||||
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.QTextTableCell
public class QTextTableCell
The QTextTableCell class represents the properties of a cell in a QTextTable.
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.
Cells are usually created when a table is inserted into a document with QTextCursor::insertTable(), but they are also created and destroyed when a table is resized.
Cells contain information about their location in a table; you can obtain the row and column numbers of a cell, and its rowSpan and columnSpan.
The format of a cell describes the default character format of its contents. The firstCursorPosition and lastCursorPosition functions are used to obtain the extent of the cell in the document.
Nested Class Summary |
---|
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 | |
---|---|
QTextTableCell()
Constructs an invalid table cell. |
|
QTextTableCell(QTextTableCell o)
Copy constructor. |
Method Summary | |
---|---|
QTextFrame_iterator |
begin()
Returns a frame iterator pointing to the beginning of the table's cell. |
int |
column()
Returns the number of the column in the table that contains this cell. |
int |
columnSpan()
Returns the number of columns this cell spans. |
QTextFrame_iterator |
end()
Returns a frame iterator pointing to the end of the table's cell. |
boolean |
equals(java.lang.Object other)
|
QTextCursor |
firstCursorPosition()
Returns the first valid cursor position in this cell. |
int |
firstPosition()
|
QTextCharFormat |
format()
Returns the cell's character format. |
static QTextTableCell |
fromNativePointer(QNativePointer nativePointer)
This function returns the QTextTableCell instance pointed to by nativePointer |
boolean |
isValid()
Returns true if this is a valid table cell; otherwise returns false. |
QTextCursor |
lastCursorPosition()
Returns the last valid cursor position in this cell. |
int |
lastPosition()
|
static QNativePointer |
nativePointerArray(QTextTableCell[] array)
This function returns a QNativePointer that is pointing to the specified QTextTableCell array. |
int |
row()
Returns the number of the row in the table that contains this cell. |
int |
rowSpan()
Returns the number of rows this cell spans. |
void |
setFormat(QTextCharFormat format)
Sets the cell's character format to format. |
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 QTextTableCell()
Constructs an invalid table cell.
public QTextTableCell(QTextTableCell o)
Copy constructor. Creates a new QTextTableCell object based on the o cell.
Method Detail |
---|
public final QTextFrame_iterator begin()
Returns a frame iterator pointing to the beginning of the table's cell.
public final int column()
Returns the number of the column in the table that contains this cell.
public final int columnSpan()
Returns the number of columns this cell spans. The default is 1.
public final QTextFrame_iterator end()
Returns a frame iterator pointing to the end of the table's cell.
public final QTextCursor firstCursorPosition()
Returns the first valid cursor position in this cell.
public final int firstPosition()
public final QTextCharFormat format()
Returns the cell's character format.
public final boolean isValid()
Returns true if this is a valid table cell; otherwise returns false.
public final QTextCursor lastCursorPosition()
Returns the last valid cursor position in this cell.
public final int lastPosition()
public final int row()
Returns the number of the row in the table that contains this cell.
public final int rowSpan()
Returns the number of rows this cell spans. The default is 1.
public final void setFormat(QTextCharFormat format)
Sets the cell's character format to format. This can for example be used to change the background color of the entire cell:
QTextTableCell cell = table->cellAt(2, 3); QTextCharFormat format = cell.format; format.setBackground(Qt::blue); cell.setFormat(format);
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.
public static QTextTableCell fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QTextTableCell[] array)
array
- the array that the returned pointer will point to.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |