Warning, file /office/calligra/libs/textlayout/TableIterator.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2011 C. Boemann, KO GmbH <cbo@kogmbh.com> 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Library General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2 of the License, or (at your option) any later version. 0008 * 0009 * This library is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 * Library General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU Library General Public License 0015 * along with this library; see the file COPYING.LIB. If not, write to 0016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 #ifndef TABLEITERATOR_H 0020 #define TABLEITERATOR_H 0021 0022 #include <QVector> 0023 #include <QString> 0024 0025 class FrameIterator; 0026 class KoTextLayoutArea; 0027 class QTextTable; 0028 0029 /** 0030 * Convenience cursor class used during table layout. 0031 * 0032 * The class holds information about a table and the current row. Can also 0033 * provide a FrameIterator for a given column in the table. 0034 */ 0035 class TableIterator 0036 { 0037 public: 0038 /** 0039 * Constructs a new iterator for the given table. 0040 * 0041 * @param table table to use. 0042 */ 0043 explicit TableIterator(QTextTable *table); 0044 0045 /** 0046 * Constructs a new iterator initialized from another. 0047 * 0048 * @param other iterator to initialize the iterator from. 0049 */ 0050 explicit TableIterator(TableIterator *other); 0051 0052 /// Destructor. 0053 ~TableIterator(); 0054 0055 /// Compare this iterator to another. 0056 bool operator ==(const TableIterator &other) const; 0057 0058 /** 0059 * Returns a frame iterator that iterates over the frames in a given column. 0060 * 0061 * @param column column for which and iterator should be returned. 0062 */ 0063 FrameIterator *frameIterator(int column); 0064 0065 /// Table being iterated over. 0066 QTextTable *table; 0067 /// Current row. 0068 int row; 0069 /// Number of header rows. 0070 int headerRows; 0071 /// X position of header. 0072 qreal headerPositionX; 0073 /// Frame iterators, one for each column. 0074 QVector<FrameIterator *> frameIterators; 0075 /// Header row positions. 0076 QVector<qreal> headerRowPositions; // we will only fill those of header rows 0077 /// Rows of header cell areas. 0078 QVector<QVector<KoTextLayoutArea *> > headerCellAreas; 0079 /// The name of the master-page that is used for this table. 0080 QString masterPageName; 0081 }; 0082 0083 #endif