File indexing completed on 2024-05-12 16:37:13
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2006-2010 Thomas Zander <zander@kde.org> 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 KWPAGESTYLE_P_H 0020 #define KWPAGESTYLE_P_H 0021 0022 #include <QSharedData> 0023 #include <KoText.h> 0024 #include <KoShapeBackground.h> 0025 #include <KoColumns.h> 0026 0027 class KWPageStylePrivate : public QSharedData 0028 { 0029 public: 0030 KWPageStylePrivate() : fullPageBackground(0) { clear(); } 0031 ~KWPageStylePrivate(); 0032 void clear(); 0033 0034 KWPageStyle::PageUsageType pageUsage; 0035 KoColumns columns; 0036 KoPageLayout pageLayout; 0037 QString name; 0038 QString displayName; 0039 qreal headerDistance, footerDistance, footNoteDistance, endNoteDistance; 0040 qreal headerMinimumHeight,footerMinimumHeight; 0041 Words::HeaderFooterType headers, footers; 0042 bool headerDynamicSpacing; 0043 bool footerDynamicSpacing; 0044 qreal footNoteSeparatorLineWidth; ///< width of line; so more like 'thickness' 0045 int footNoteSeparatorLineLength; ///< It's a percentage of page. 0046 Qt::PenStyle footNoteSeparatorLineType; ///< foot note separate type 0047 Words::FootNoteSeparatorLinePos footNoteSeparatorLinePos; ///< alignment in page 0048 0049 // See parag 16.2 for all the ODF features. 0050 KoText::Direction direction; 0051 QSharedPointer<KoShapeBackground> fullPageBackground; 0052 QString nextStyleName; 0053 0054 // called from the command 0055 void copyProperties(KWPageStylePrivate *other) { 0056 pageUsage = other->pageUsage; 0057 columns = other->columns; 0058 pageLayout = other->pageLayout; 0059 //name = other->name; 0060 headerDistance = other->headerDistance; 0061 footerDistance = other->footerDistance; 0062 footNoteDistance = other->footNoteDistance; 0063 endNoteDistance = other->endNoteDistance; 0064 headerMinimumHeight = other->headerMinimumHeight; 0065 footerMinimumHeight = other->footerMinimumHeight; 0066 headers = other->headers; 0067 footers = other->footers; 0068 footNoteSeparatorLineWidth = other->footNoteSeparatorLineWidth; 0069 footNoteSeparatorLineLength = other->footNoteSeparatorLineLength; 0070 footNoteSeparatorLineType = other->footNoteSeparatorLineType; 0071 footNoteSeparatorLinePos = other->footNoteSeparatorLinePos; 0072 direction = other->direction; 0073 fullPageBackground = other->fullPageBackground; 0074 nextStyleName = other->nextStyleName; 0075 } 0076 }; 0077 0078 #endif