Warning, file /office/calligra/libs/pageapp/KoPAPage.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) 2006-2009 Thorsten Zachmann <zachmann@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 0020 #ifndef KOPAPAGE_H 0021 #define KOPAPAGE_H 0022 0023 #include "KoPAPageBase.h" 0024 0025 class KoPAMasterPage; 0026 0027 /// Class representing a page 0028 class KOPAGEAPP_EXPORT KoPAPage : public KoPAPageBase 0029 { 0030 public: 0031 /** Constructor 0032 * @param masterPage masterpage used for this page 0033 */ 0034 explicit KoPAPage( KoPAMasterPage * masterPage ); 0035 ~KoPAPage() override; 0036 0037 /// reimplemented 0038 void saveOdf( KoShapeSavingContext & context ) const override; 0039 0040 /// @return the layout set by the masterpage 0041 KoPageLayout & pageLayout() override; 0042 const KoPageLayout & pageLayout() const override; 0043 0044 /// Set the masterpage for this page to @p masterPage 0045 void setMasterPage( KoPAMasterPage * masterPage ); 0046 /// @return the masterpage of this page 0047 KoPAMasterPage * masterPage() { return m_masterPage; } 0048 0049 /// reimplemented 0050 void paintBackground( QPainter & painter, const KoViewConverter & converter, KoShapePaintingContext &paintContext ) override; 0051 0052 /// reimplemented 0053 bool displayMasterShapes() override; 0054 0055 /// reimplemented 0056 void setDisplayMasterShapes( bool display ) override; 0057 0058 /// reimplemented 0059 bool displayMasterBackground() override; 0060 0061 /// reimplemented 0062 void setDisplayMasterBackground( bool display ) override; 0063 0064 /// reimplemented 0065 bool displayShape(KoShape *shape) const override; 0066 0067 /// reimplemented 0068 void paintPage( QPainter & painter, KoZoomHandler & zoomHandler ) override; 0069 0070 protected: 0071 /** 0072 * DisplayMasterBackground and DisplayMasterShapes are only saved loaded in a presentation 0073 * They are however implemented here to reduce code duplication. 0074 */ 0075 enum PageProperty 0076 { 0077 UseMasterBackground = 1, ///< Use the background of the master page. See ODF 14.13.2 Drawing Page Style 0078 DisplayMasterBackground = 2, ///< If the master page is used this indicated if its backround should be used. See ODF 15.36.13 Background Visible 0079 DisplayMasterShapes = 4, ///< Set if the shapes of the master page should be shown. See ODF 15.36.12 Background Objects Visible 0080 DisplayHeader = 8, /// set if presentation:display-header is true 0081 DisplayFooter = 16, /// set if presentation:display-footer is true 0082 DisplayPageNumber = 32, /// set if presentation:display-page-number is true 0083 DisplayDateTime = 64 /// set if presentation:display-date-time is true 0084 }; 0085 0086 /// Reimplemented from KoPageBase 0087 void loadOdfPageTag( const KoXmlElement &element, KoPALoadingContext &loadingContext ) override; 0088 0089 /// Reimplemented from KoPageBase 0090 void saveOdfPageStyleData( KoGenStyle &style, KoPASavingContext &paContext ) const override; 0091 0092 KoPAMasterPage * m_masterPage; 0093 0094 int m_pageProperties; 0095 }; 0096 0097 #endif /* KOPAPAGE_H */