lib

#include <KoDocumentChild.h>

Inheritance diagram for KoDocumentChild:
KoChild

Public Member Functions

 KoDocumentChild (KoDocument *parent, KoDocument *doc, const TQRect &geometry)
 KoDocumentChild (KoDocument *parent)
virtual void setDocument (KoDocument *doc, const TQRect &geometry)
KoDocument * document () const
virtual KoDocument * parentDocument () const
virtual KoDocument * hitTest (const TQPoint &p, const TQWMatrix &_matrix=TQWMatrix())
KURL url () const
virtual TQDomElement save (TQDomDocument &doc, bool uppercase=false)
void saveOasisAttributes (KoXmlWriter &xmlWriter, const TQString &name)
virtual bool saveOasis (KoStore *store, KoXmlWriter *manifestWriter)
virtual bool load (const TQDomElement &element, bool uppercase=false)
void loadOasis (const TQDomElement &frameElement, const TQDomElement &objectElement)
virtual bool loadDocument (KoStore *)
virtual bool loadOasisDocument (KoStore *store, const TQDomDocument &manifestDoc)
virtual bool isStoredExtern () const
bool isDeleted () const
void setDeleted (bool on=true)
Public Member Functions inherited from KoChild
 KoChild (TQObject *parent=0, const char *name=0)
void setGeometry (const TQRect &rect, bool noEmit=false)
TQRect geometry () const
virtual TQRegion region (const TQWMatrix &=TQWMatrix()) const
virtual TQPointArray pointArray (const TQWMatrix &matrix=TQWMatrix()) const
TQRect boundingRect () const
virtual void setScaling (double x, double y)
virtual double xScaling () const
virtual double yScaling () const
virtual void setShearing (double x, double y)
virtual double xShearing () const
virtual double yShearing () const
virtual void setRotation (double)
virtual double rotation () const
virtual void setRotationPoint (const TQPoint &pos)
virtual TQPoint rotationPoint () const
bool isRectangle () const
virtual void setClipRegion (TQPainter &painter, bool combine=true)
virtual void transform (TQPainter &painter)
virtual void setContentsPos (int x, int y)
virtual TQRect contentRect () const
virtual TQRegion frameRegion (const TQWMatrix &matrix=TQWMatrix(), bool solid=false) const
virtual TQPointArray framePointArray (const TQWMatrix &matrix=TQWMatrix()) const
virtual TQWMatrix matrix () const
void lock ()
void unlock ()
bool locked () const
virtual TQPointArray oldPointArray (const TQWMatrix &matrix)
virtual void setTransparent (bool transparent)
virtual bool isTransparent () const
virtual Gadget gadgetHitTest (const TQPoint &p)

Protected Attributes

TQString m_tmpURL
TQRect m_tmpGeometry
TQString m_tmpMimeType

Additional Inherited Members

Public Types inherited from KoChild
enum  Gadget {
  NoGadget , TopLeft , TopMid , TopRight ,
  MidLeft , MidRight , BottomLeft , BottomMid ,
  BottomRight , Move
}
Signals inherited from KoChild
void changed (KoChild *thisChild)
Protected Member Functions inherited from KoChild
virtual TQPointArray pointArray (const TQRect &r, const TQWMatrix &matrix=TQWMatrix()) const
virtual void updateMatrix ()

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

◆ KoDocumentChild() [1/2]

KoDocumentChild::KoDocumentChild ( KoDocument * parent,
KoDocument * doc,
const TQRect & geometry )

Definition at line 70 of file KoDocumentChild.cpp.

◆ KoDocumentChild() [2/2]

KoDocumentChild::KoDocumentChild ( KoDocument * parent)

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.cpp.

◆ ~KoDocumentChild()

KoDocumentChild::~KoDocumentChild ( )
virtual

Definition at line 504 of file KoDocumentChild.cpp.

Member Function Documentation

◆ document()

KoDocument * KoDocumentChild::document ( ) const
Returns
document contained in this child
See also
KoDocument

Definition at line 100 of file KoDocumentChild.cpp.

◆ hitTest()

KoDocument * KoDocumentChild::hitTest ( const TQPoint & p,
const TQWMatrix & _matrix = TQWMatrix() )
virtual

Definition at line 110 of file KoDocumentChild.cpp.

◆ isDeleted()

bool KoDocumentChild::isDeleted ( ) const

This document (child) is deleted.

Definition at line 513 of file KoDocumentChild.cpp.

◆ isStoredExtern()

bool KoDocumentChild::isStoredExtern ( ) const
virtual

Definition at line 493 of file KoDocumentChild.cpp.

◆ load()

bool KoDocumentChild::load ( const TQDomElement & element,
bool uppercase = false )
virtual

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.cpp.

◆ loadDocument()

bool KoDocumentChild::loadDocument ( KoStore * store)
virtual

Actually loads the document from the disk/net or from the store, depending on url.

Definition at line 194 of file KoDocumentChild.cpp.

◆ loadOasis()

void KoDocumentChild::loadOasis ( const TQDomElement & frameElement,
const TQDomElement & objectElement )

Definition at line 122 of file KoDocumentChild.cpp.

◆ loadOasisDocument()

bool KoDocumentChild::loadOasisDocument ( KoStore * store,
const TQDomDocument & manifestDoc )
virtual

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.cpp.

◆ parentDocument()

KoDocument * KoDocumentChild::parentDocument ( ) const
virtual
Returns
parent document of this child
See also
KoDocument

Definition at line 105 of file KoDocumentChild.cpp.

◆ save()

TQDomElement KoDocumentChild::save ( TQDomDocument & doc,
bool uppercase = false )
virtual

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.

Returns
the element containing the "object" tag.

Definition at line 467 of file KoDocumentChild.cpp.

◆ saveOasis()

bool KoDocumentChild::saveOasis ( KoStore * store,
KoXmlWriter * manifestWriter )
virtual

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.cpp.

◆ saveOasisAttributes()

void KoDocumentChild::saveOasisAttributes ( KoXmlWriter & xmlWriter,
const TQString & name )

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 name is only used for "internal" documents (not extern).

Definition at line 444 of file KoDocumentChild.cpp.

◆ setDeleted()

void KoDocumentChild::setDeleted ( bool on = true)

Definition at line 518 of file KoDocumentChild.cpp.

◆ setDocument()

void KoDocumentChild::setDocument ( KoDocument * doc,
const TQRect & geometry )
virtual

Call this function only directly after calling the constructor that takes only a parent as argument.

Definition at line 91 of file KoDocumentChild.cpp.

◆ url()

KURL KoDocumentChild::url ( ) const
Note
Can be empty (which is why it doesn't return a const KURL &)

Definition at line 499 of file KoDocumentChild.cpp.

Member Data Documentation

◆ m_tmpGeometry

TQRect KoDocumentChild::m_tmpGeometry
protected

This variable is set after parsing the OBJECT tag in load and is reset after calling loadDocument.

Definition at line 164 of file KoDocumentChild.h.

◆ m_tmpMimeType

TQString KoDocumentChild::m_tmpMimeType
protected

This variable is set after parsing the OBJECT tag in load and is reset after calling loadDocument.

Definition at line 171 of file KoDocumentChild.h.

◆ m_tmpURL

TQString KoDocumentChild::m_tmpURL
protected

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 157 of file KoDocumentChild.h.


The documentation for this class was generated from the following files: