lib Library API Documentation

koDocumentChild.h

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., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 #ifndef __koDocumentChild_h__
00020 #define __koDocumentChild_h__
00021 
00022 #include <koChild.h>
00023 #include <koffice_export.h>
00024 class QDomDocument;
00025 class QDomElement;
00026 class KURL;
00027 class KoStore;
00028 class KoDocument;
00029 class KoDocumentChildPrivate;
00030 class KoDocumentEntry;
00031 class KoXmlWriter;
00032 
00043 class KOFFICECORE_EXPORT KoDocumentChild : public KoChild
00044 {
00045   Q_OBJECT
00046 public:
00047   KoDocumentChild( KoDocument* parent, KoDocument* doc, const QRect& geometry );
00048 
00053   KoDocumentChild( KoDocument* parent );
00054 
00055   virtual ~KoDocumentChild();
00056 
00061   virtual void setDocument( KoDocument *doc, const QRect &geometry );
00062 
00068   KoDocument *document() const;
00069 
00075   virtual KoDocument *parentDocument() const;
00076 
00077   virtual KoDocument* hitTest( const QPoint& p, const QWMatrix& _matrix = QWMatrix() );
00078 
00082   KURL url() const;
00083 
00096   virtual QDomElement save( QDomDocument& doc, bool uppercase=false );
00097 
00105   void saveOasisAttributes( KoXmlWriter &xmlWriter, const QString& name );
00106 
00111   virtual bool saveOasisToStore( KoStore* store, KoXmlWriter* manifestWriter );
00112 
00123   virtual bool load( const QDomElement& element, bool uppercase=false );
00124 
00125   void loadOasis( const QDomElement &frameElement, const QDomElement& objectElement );
00126 
00131   virtual bool loadDocument( KoStore* );
00132 
00137   virtual bool loadOasisDocument( KoStore* store, const QDomDocument& manifestDoc );
00138 
00139   virtual bool isStoredExtern() const;
00140 
00144   bool isDeleted() const;
00145   void setDeleted( bool on = true );
00146 
00147 protected: // Should be private, but KWord needs access to the variables
00148     // because it reimplements load/save (for uppercase tags)
00149 
00156   QString m_tmpURL;
00157 
00163   QRect m_tmpGeometry;
00164 
00170   QString m_tmpMimeType;
00171 
00172 private:
00173   bool createUnavailDocument( KoStore* store, bool doOpenURL, const QString& mimeType );
00174   bool loadDocumentInternal( KoStore* _store, const KoDocumentEntry& e, bool doOpenURL, bool oasis );
00175 
00176 private:
00177   KoDocumentChildPrivate *d;
00178 };
00179 
00180 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:40:00 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003