Qt 4.8
Public Functions | Public Variables | List of all members
QTextHtmlImporter::TableCellIterator Struct Reference

Public Functions

bool atEnd () const
 
QTextTableCell cell () const
 
TableCellIteratoroperator++ ()
 
 TableCellIterator (QTextTable *t=0)
 

Public Variables

int column
 
int row
 
QTextTabletable
 

Detailed Description

Definition at line 163 of file qtextdocumentfragment_p.h.

Constructors and Destructors

◆ TableCellIterator()

QTextHtmlImporter::TableCellIterator::TableCellIterator ( QTextTable t = 0)
inline

Functions

◆ atEnd()

bool QTextHtmlImporter::TableCellIterator::atEnd ( ) const
inline

Definition at line 184 of file qtextdocumentfragment_p.h.

Referenced by QTextHtmlImporter::closeTag(), and QTextHtmlImporter::processBlockNode().

184 { return table == 0 || row >= table->rows(); }
int rows() const
Returns the number of rows in the table.

◆ cell()

QTextTableCell QTextHtmlImporter::TableCellIterator::cell ( ) const
inline

Definition at line 186 of file qtextdocumentfragment_p.h.

Referenced by QTextHtmlImporter::closeTag(), and QTextHtmlImporter::processBlockNode().

186 { return table->cellAt(row, column); }
QTextTableCell cellAt(int row, int col) const
Returns the table cell at the given row and column in the table.
Definition: qtexttable.cpp:630

◆ operator++()

TableCellIterator& QTextHtmlImporter::TableCellIterator::operator++ ( )
inline

Definition at line 167 of file qtextdocumentfragment_p.h.

167  {
168  if (atEnd())
169  return *this;
170  do {
172  if (!cell.isValid())
173  break;
174  column += cell.columnSpan();
175  if (column >= table->columns()) {
176  column = 0;
177  ++row;
178  }
179  } while (row < table->rows() && table->cellAt(row, column).row() != row);
180 
181  return *this;
182  }
int columns() const
Returns the number of columns in the table.
QTextTableCell cellAt(int row, int col) const
Returns the table cell at the given row and column in the table.
Definition: qtexttable.cpp:630
int row() const
Returns the number of the row in the table that contains this cell.
Definition: qtexttable.cpp:184
The QTextTableCell class represents the properties of a cell in a QTextTable.
Definition: qtexttable.h:59
bool isValid() const
Returns true if this is a valid table cell; otherwise returns false.
Definition: qtexttable.h:77
int columnSpan() const
Returns the number of columns this cell spans.
Definition: qtexttable.cpp:228

Properties

◆ column

int QTextHtmlImporter::TableCellIterator::column

Definition at line 190 of file qtextdocumentfragment_p.h.

◆ row

int QTextHtmlImporter::TableCellIterator::row

Definition at line 189 of file qtextdocumentfragment_p.h.

Referenced by QTextHtmlImporter::closeTag().

◆ table

QTextTable* QTextHtmlImporter::TableCellIterator::table

Definition at line 188 of file qtextdocumentfragment_p.h.


The documentation for this struct was generated from the following file: