161 int row_start, col_start, num_rows, num_cols;
170 for (
int r = row_start; r < row_start + num_rows; ++r) {
171 for (
int c = col_start;
c < col_start + num_cols; ++
c) {
173 const int rspan = cell.
rowSpan();
188 if (r + rspan >= row_start + num_rows) {
191 if (
c + cspan >= col_start + num_cols) {
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
void appendFragments(int pos, int endPos)
int selectionEnd() const
Returns the end of the selection or position() if the cursor doesn't have a selection.
int createObjectIndex(const QTextFormat &f)
QTextDocumentPrivate * dst
#define QTextBeginningOfFrame
void setTableCellRowSpan(int tableCellRowSpan)
If this character format is applied to characters in a table cell, the cell will span tableCellRowSpa...
int insertBlock(int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation=QTextUndoCommand::MoveCursor)
int rowSpan() const
Returns the number of rows this cell spans.
int position() const
Returns the index of the block's first character within the document.
void setTableCellColumnSpan(int tableCellColumnSpan)
If this character format is applied to characters in a table cell, the cell will span tableCellColumn...
void selectedTableCells(int *firstRow, int *numRows, int *firstColumn, int *numColumns) const
If the selection spans over table cells, firstRow is populated with the number of the first row in th...
QTextTableCell cellAt(int row, int col) const
Returns the table cell at the given row and column in the table.
QTextCharFormat format() const
Returns the cell's character format.
QTextTableFormat format() const
Returns the table's format.
int column() const
Returns the number of the column in the table that contains this cell.
int lastPosition() const
Returns the last document position inside the frame.
QTextTable * currentTable() const
Returns a pointer to the current table if the cursor position() is inside a block that is part of a t...
QTextFormatCollection * formatCollection()
The QTextBlock class provides a container for text fragments in a QTextDocument.
int convertFormatIndex(const QTextFormat &oldFormat, int objectIndexToSet=-1)
int row() const
Returns the number of the row in the table that contains this cell.
The QTextTable class represents a table in a QTextDocument.
void setColumns(int columns)
Sets the number of columns required by the table format.
int firstPosition() const
Returns the first valid position in the document occupied by this cell.
The QTextTableCell class represents the properties of a cell in a QTextTable.
int appendFragment(int pos, int endPos, int objectIndex=-1)
bool hasComplexSelection() const
Returns true if the cursor contains a selection that is not simply a range from selectionStart() to s...
void clearColumnWidthConstraints()
Clears the column width constraints for the table.
int lastPosition() const
Returns the last valid position in the document occupied by this cell.
The QTextTableFormat class provides formatting information for tables in a QTextDocument.
QTextBlock blocksFind(int pos) const
int columnSpan() const
Returns the number of columns this cell spans.
static const KeyPair *const end
QTextDocumentPrivate * src
QTextBlockFormat blockFormat() const
Returns the QTextBlockFormat that describes block-specific properties.
int selectionStart() const
Returns the start of the selection or position() if the cursor doesn't have a selection.