F:/KPlato/koffice/libs/kofficecore/KoDocumentChild.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef __koDocumentChild_h__
00020 #define __koDocumentChild_h__
00021 
00022 #include <KoChild.h>
00023 #include <koffice_export.h>
00024 #include <KoXmlReader.h>
00025 
00026 class KoView;
00027 class QDomDocument;
00028 class QDomElement;
00029 class KUrl;
00030 class KoStore;
00031 class KoDocument;
00032 class KoDocumentChildPrivate;
00033 class KoDocumentEntry;
00034 class KoXmlWriter;
00035 
00046 class KOFFICECORE_EXPORT KoDocumentChild : public KoChild
00047 {
00048   Q_OBJECT
00049 public:
00050   KoDocumentChild( KoDocument* parent, KoDocument* doc, const QRect& geometry );
00051 
00056   KoDocumentChild( KoDocument* parent );
00057 
00058   virtual ~KoDocumentChild();
00059 
00064   virtual void setDocument( KoDocument *doc, const QRect &geometry );
00065 
00071   KoDocument *document() const;
00072 
00078   KoDocument *parentDocument() const;
00079 
00080   virtual KoDocument* hitTest( const QPoint& p, KoView* view, const QMatrix& _matrix = QMatrix() );
00081 
00085   KUrl url() const;
00086 
00099   virtual QDomElement save( QDomDocument& doc, bool uppercase=false );
00100 
00108   void saveOasisAttributes( KoXmlWriter &xmlWriter, const QString& name );
00109 
00114   virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
00115 
00126   virtual bool load( const KoXmlElement& element, bool uppercase=false );
00127 
00128   void loadOasis( const KoXmlElement &frameElement, const KoXmlElement& objectElement );
00129 
00134   virtual bool loadDocument( KoStore* );
00135 
00140   virtual bool loadOasisDocument( KoStore* store, const KoXmlDocument& manifestDoc );
00141 
00142   virtual bool isStoredExtern() const;
00143 
00147   bool isDeleted() const;
00148   void setDeleted( bool on = true );
00149 
00150 protected: // Should be private, but KWord needs access to the variables
00151     // because it reimplements load/save (for uppercase tags)
00152 
00159   QString m_tmpURL;
00160 
00166   QRect m_tmpGeometry;
00167 
00173   QString m_tmpMimeType;
00174 
00175 private:
00176   bool createUnavailDocument( KoStore* store, bool doOpenURL, const QString& mimeType );
00177   bool createAndLoadDocument( KoStore* store, bool doOpenURL, bool oasis, const QString& mimeType );
00178   bool finishLoadingDocument( KoStore* store, KoDocument* doc, bool doOpenURL, bool oasis );
00179 
00180 private:
00181   KoDocumentChildPrivate *d;
00182 };
00183 
00184 #endif

Généré le Wed Nov 22 23:41:02 2006 pour KPlato par  doxygen 1.5.1-p1