KoDocumentChild Class Reference
Holds an embedded object. More...
#include <koDocumentChild.h>
Inheritance diagram for KoDocumentChild:


Public Member Functions | |
KoDocumentChild (KoDocument *parent, KoDocument *doc, const QRect &geometry) | |
KoDocumentChild (KoDocument *parent) | |
virtual void | setDocument (KoDocument *doc, const QRect &geometry) |
KoDocument * | document () const |
virtual KoDocument * | parentDocument () const |
virtual KoDocument * | hitTest (const QPoint &p, const QWMatrix &_matrix=QWMatrix()) |
KURL | url () const |
virtual QDomElement | save (QDomDocument &doc, bool uppercase=false) |
void | saveOasisAttributes (KoXmlWriter &xmlWriter, const QString &name) |
virtual bool | saveOasisToStore (KoStore *store, KoXmlWriter *manifestWriter) |
virtual bool | load (const QDomElement &element, bool uppercase=false) |
void | loadOasis (const QDomElement &frameElement, const QDomElement &objectElement) |
virtual bool | loadDocument (KoStore *) |
virtual bool | loadOasisDocument (KoStore *store, const QDomDocument &manifestDoc) |
virtual bool | isStoredExtern () const |
bool | isDeleted () const |
void | setDeleted (bool on=true) |
Protected Attributes | |
QString | m_tmpURL |
QRect | m_tmpGeometry |
QString | m_tmpMimeType |
Detailed Description
Holds an embedded object.In addition to its base class KoChild it cares about the content of an embedded document. That means it supports operations like loading and saving.
If you need a representation for embedded documents in your KOffice component then you should inherit from this class.
Definition at line 43 of file koDocumentChild.h.
Constructor & Destructor Documentation
|
When using this constructor you must call setDocument before you can call any other function of this class.
Definition at line 82 of file koDocumentChild.cc. |
Member Function Documentation
|
Call this function only directly after calling the constructor that takes only a parent as argument.
Definition at line 91 of file koDocumentChild.cc. References KoChild::setGeometry(), and KoChild::updateMatrix(). |
|
Definition at line 100 of file koDocumentChild.cc. Referenced by KoView::hitTest(), KoDocument::paintChild(), KoView::partActivateEvent(), save(), KoDocument::saveExternalChildren(), saveOasisAttributes(), saveOasisToStore(), and url(). |
|
Definition at line 105 of file koDocumentChild.cc. |
|
Definition at line 476 of file koDocumentChild.cc. References document(). Referenced by save(), and saveOasisToStore(). |
|
Writes the "object" tag, but does NOT write the content of the embedded documents. Saving the embedded documents themselves is done in KoDocument::saveChildren. This function just stores information about the position and id of the embedded document and should be called from within KoDocument::saveXML. The "object" element is not added to the document. It is just created and returned.
Definition at line 444 of file koDocumentChild.cc. References document(), KoChild::geometry(), and url(). |
|
Save an embedded object to OASIS.
This method sets the attributes for the draw:object element in the parent XML document. It also prepares the embedded object for being saved into the store at the end of saving (see saveOasisToStore). Note that Definition at line 421 of file koDocumentChild.cc. References KoXmlWriter::addAttribute(), and document(). |
|
Save an embedded object to an OASIS store. This is called automatically by the parent KoDocument's saveOasis Definition at line 387 of file koDocumentChild.cc. References document(), and url(). |
|
Parses the "object" tag. This does NOT mean creating the child documents. AFTER the 'parser' has finished parsing, you must use loadDocument to actually load the embedded documents. What you should have in mind is that this method is called from within KoDocument::loadXML while loadDocument is called from within KoDocument::loadChildren, respectively from your implementation of these methods. Definition at line 143 of file koDocumentChild.cc. References m_tmpGeometry, m_tmpMimeType, m_tmpURL, and KoChild::setGeometry(). |
|
Actually loads the document from the disk/net or from the store, depending on url.
Definition at line 194 of file koDocumentChild.cc. References KoDocumentEntry::isEmpty(), m_tmpMimeType, m_tmpURL, and KoDocumentEntry::queryByMimeType(). |
|
Actually loads the document from the disk/net or from the store depending on the document's url.
Definition at line 224 of file koDocumentChild.cc. References KoStore::currentDirectory(), KoDocumentEntry::isEmpty(), m_tmpURL, KoOasisStore::mimeForPath(), and KoDocumentEntry::queryByMimeType(). |
|
This document (child) is deleted.
Definition at line 490 of file koDocumentChild.cc. Referenced by KoDocument::paintChild(), and KoDocument::saveExternalChildren(). |
Member Data Documentation
|
Holds the source of this object, for example "file:/home/weis/image.gif" or "tar:/table1/2" if it is stored in a koffice store. This variable is set after parsing the OBJECT tag in load and is reset after calling loadDocument. Definition at line 156 of file koDocumentChild.h. Referenced by load(), loadDocument(), and loadOasisDocument(). |
|
This variable is set after parsing the OBJECT tag in load and is reset after calling loadDocument.
Definition at line 163 of file koDocumentChild.h. Referenced by load(). |
|
This variable is set after parsing the OBJECT tag in load and is reset after calling loadDocument.
Definition at line 170 of file koDocumentChild.h. Referenced by load(), and loadDocument(). |
The documentation for this class was generated from the following files: