Warning, file /office/calligra/libs/text/KoList_p.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) 2008 Girish Ramakrishnan <girish@forwardbias.in> 0003 * Copyright (C) 2008 Pierre Stirnweiss <pierre.stirnweiss_calligra@gadz.org> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Library General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KOLIST_P_H 0022 #define KOLIST_P_H 0023 0024 0025 #include "KoList.h" 0026 #include "styles/KoListStyle.h" 0027 #include "KoTextBlockData.h" 0028 0029 #include <QTextDocument> 0030 #include <QTextBlock> 0031 #include <QVector> 0032 #include <QVariant> 0033 #include <QPointer> 0034 #include <QTextList> 0035 0036 class KoListPrivate 0037 { 0038 public: 0039 KoListPrivate(KoList *q, const QTextDocument *document) 0040 : q(q), type(KoList::TextList), style(0), textLists(10), textListIds(10), document(document), listToBeContinuedFrom(0) 0041 { 0042 } 0043 0044 ~KoListPrivate() 0045 { 0046 } 0047 0048 static void invalidate(const QTextBlock &block) 0049 { 0050 QTextBlock currentBlock = block; 0051 KoTextBlockData data(currentBlock); 0052 data.setCounterWidth(-1.0); 0053 } 0054 0055 static void invalidateList(const QTextBlock &block) 0056 { 0057 for (int i = 0; i < block.textList()->count(); i++) { 0058 if (block.textList()->item(i) != block) { 0059 invalidate(block.textList()->item(i)); 0060 break; 0061 } 0062 } 0063 } 0064 0065 void styleChanged(int level) 0066 { 0067 Q_UNUSED(level); 0068 q->setStyle(style); 0069 } 0070 0071 KoList *q; 0072 KoList::Type type; 0073 KoListStyle *style; 0074 QVector<QPointer<QTextList> > textLists; 0075 QVector<KoListStyle::ListIdType> textListIds; 0076 const QTextDocument *document; 0077 QMap<int, QVariant> properties; 0078 KoList *listToBeContinuedFrom; 0079 }; 0080 0081 #endif // KOLIST_P_H