Warning, file /office/calligra/libs/pageapp/KoPALoadingContext.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) 2007 Peter Simonsson <peter.simonsson@gmail.com>
0003  * Copyright (C) 2007-2009 Thorsten Zachmann <zachmann@kde.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 KOPALOADINGCONTEXT_H
0022 #define KOPALOADINGCONTEXT_H
0023 
0024 #include <KoShapeLoadingContext.h>
0025 
0026 #include <QMap>
0027 
0028 #include "kopageapp_export.h"
0029 
0030 class KoPAMasterPage;
0031 class KoPAPage;
0032 class KoDocumentResourceManager;
0033 
0034 /// Context needed for loading the data of a pageapp
0035 class KOPAGEAPP_EXPORT KoPALoadingContext : public KoShapeLoadingContext
0036 {
0037 public:
0038     /**
0039      * Constructor.
0040      *
0041      * @param context Context for loading oasis docs.
0042      * @param context The shape controller.
0043      */
0044      KoPALoadingContext(KoOdfLoadingContext &context, KoDocumentResourceManager *documentResources);
0045      ~KoPALoadingContext();
0046 
0047     /**
0048      * Get the master page with the name @p name.
0049      *
0050      * @param name name of the master page.
0051      */
0052     KoPAMasterPage* masterPageByName( const QString& name );
0053 
0054     /**
0055      * Add a master page to the context.
0056      *
0057      * @param name name of the master page.
0058      * @param master master page to add.
0059      */
0060     void addMasterPage( const QString& name, KoPAMasterPage* master );
0061 
0062     /**
0063      * Get the master pages
0064      */
0065     const QMap<QString, KoPAMasterPage *> & masterPages();
0066 
0067     /**
0068      * Get the page with the name @p name.
0069      *
0070      * @param name name of the page.
0071      */
0072     KoPAPage* pageByName( const QString& name );
0073 
0074     /**
0075      * Add a master page to the context.
0076      *
0077      * @param name name of the page.
0078      * @param page page to add.
0079      */
0080     void addPage( const QString& name, KoPAPage* page );
0081 
0082 private:
0083     class Private;
0084     Private * const d;
0085 };
0086 
0087 #endif /*KOPALOADINGCONTEXT_H*/