2998 const int rows = table->
rows();
2999 const int columns = table->
columns();
3003 columnWidths.
resize(columns);
3009 for (
int i = 0; i < columns; ++i)
3010 widthEmittedForColumn[i] =
false;
3013 if (headerRowCount > 0)
3016 for (
int row = 0; row < rows; ++row) {
3019 for (
int col = 0; col < columns; ++col) {
3023 if (cell.
row() != row)
3026 if (cell.
column() != col)
3031 if (!widthEmittedForColumn[col] && cell.
columnSpan() == 1) {
3033 widthEmittedForColumn[col] =
true;
3094 if (headerRowCount > 0 && row == headerRowCount - 1)
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int columns() const
Returns the number of columns in the table.
qreal cellSpacing() const
Returns the table's cell spacing.
qreal rightPadding() const
Gets the right padding of the table cell.
QTextCharFormat defaultCharFormat
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
int headerRowCount() const
Returns the number of rows in the table that define the header.
QVector< T > & fill(const T &t, int size=-1)
Assigns value to all items in the vector.
int count(const T &t) const
Returns the number of occurrences of value in the vector.
QTextFrame::iterator begin() const
Returns a frame iterator pointing to the beginning of the table's cell.
QTextTableCellFormat toTableCellFormat() const
Returns this format as a table cell format.
void emitAlignment(Qt::Alignment alignment)
void setVerticalAlignment(VerticalAlignment alignment)
Sets the vertical alignment used for the characters with this format to the alignment specified...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
void resize(int size)
Sets the size of the vector to size.
int rowSpan() const
Returns the number of rows this cell spans.
bool hasProperty(int propertyId) const
Returns true if the text format has a property with the given propertyId; otherwise returns false...
QTextTableCell cellAt(int row, int col) const
Returns the table cell at the given row and column in the table.
VerticalAlignment
This enum describes the ways that adjacent characters can be vertically aligned.
Qt::Alignment alignment() const
Returns the table's alignment.
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.
void emitBackgroundAttribute(const QTextFormat &format)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int row() const
Returns the number of the row in the table that contains this cell.
const T & at(int i) const
Returns the item at index position i in the vector.
VerticalAlignment verticalAlignment() const
Returns the vertical alignment used for characters with this format.
void emitFrame(QTextFrame::Iterator frameIt)
QTextLength width() const
Returns the width of the frame's border rectangle.
void merge(const QTextFormat &other)
Merges the other format with this format; where there are conflicts the other format takes precedence...
int rows() const
Returns the number of rows in the table.
The QTextTableCell class represents the properties of a cell in a QTextTable.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
void emitTextLength(const char *attribute, const QTextLength &length)
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument...
The QTextTableFormat class provides formatting information for tables in a QTextDocument.
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
void emitAttribute(const char *attribute, const QString &value)
qreal topPadding() const
Gets the top padding of the table cell.
int columnSpan() const
Returns the number of columns this cell spans.
void emitFrameStyle(const QTextFrameFormat &format, FrameType frameType)
qreal border() const
Returns the width of the border in pixels.
qreal cellPadding() const
Returns the table's cell padding.
qreal leftPadding() const
Gets the left padding of the table cell.
qreal bottomPadding() const
Gets the bottom padding of the table cell.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QVector< QTextLength > columnWidthConstraints() const
Returns a list of constraints used by this table format to control the appearance of columns in a tab...