krita

KisPartLayerImpl Class Reference

#include <kis_part_layer.h>

Inheritance diagram for KisPartLayerImpl:

KisPartLayer KisLayer

List of all members.


Detailed Description

A PartLayer is a layer that contains a KOffice Part like a KWord document or a KSpread spreadsheet.

Or whatever. A Karbon drawing.

The part is rendered into an RBGA8 paint device so we can composite it with the other layers.

When it is activated (see activate()), it draws a rectangle around itself on the kisdoc, whereas when it is deactivated (deactivate()), it removes that rectangle and commits the child to the paint device.

Embedded parts should get loaded and saved to the Native Krita Fileformat natively.

Definition at line 74 of file kis_part_layer.h.


Public Member Functions

 KisPartLayerImpl (KisImageSP img, KisChildDoc *doc)
virtual KisLayerSP clone () const
virtual void activate ()
virtual void deactivate ()
virtual KisChildDocchildDoc () const
void setDocType (const QString &type)
QString docType () const
virtual void setX (Q_INT32 x)
virtual void setY (Q_INT32 y)
virtual Q_INT32 x () const
virtual Q_INT32 y () const
virtual QRect extent () const
virtual QRect exactBounds () const
virtual QImage createThumbnail (Q_INT32 w, Q_INT32 h)
virtual bool accept (KisLayerVisitor &visitor)
virtual KisPaintDeviceSP prepareProjection (KisPaintDeviceSP projection, const QRect &r)
virtual void paintSelection (QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h)
virtual bool saveToXML (QDomDocument doc, QDomElement elem)

Member Function Documentation

KisLayerSP KisPartLayerImpl::clone (  )  const [virtual]

Return a copy of this layer.

Implements KisLayer.

Definition at line 74 of file kis_part_layer.cc.

virtual void KisPartLayerImpl::activate (  )  [inline, virtual]

Called when the layer is made active.

Reimplemented from KisLayer.

Definition at line 84 of file kis_part_layer.h.

virtual void KisPartLayerImpl::deactivate (  )  [inline, virtual]

Called when another layer is made inactive.

Reimplemented from KisLayer.

Definition at line 87 of file kis_part_layer.h.

virtual KisChildDoc* KisPartLayerImpl::childDoc (  )  const [inline, virtual]

Returns the childDoc so that we can access the doc from other places, if need be (KisDoc).

Definition at line 90 of file kis_part_layer.h.

virtual QRect KisPartLayerImpl::extent (  )  const [inline, virtual]

Returns an approximation of where the bounds on actual data are in this layer.

Implements KisLayer.

Definition at line 99 of file kis_part_layer.h.

virtual QRect KisPartLayerImpl::exactBounds (  )  const [inline, virtual]

Returns the exact bounds of where the actual data resides in this layer.

Implements KisLayer.

Definition at line 100 of file kis_part_layer.h.

QImage KisPartLayerImpl::createThumbnail ( Q_INT32  w,
Q_INT32  h 
) [virtual]

Returns a thumbnail in requested size.

The QImage may have transparent parts. May also return 0

Reimplemented from KisLayer.

Definition at line 189 of file kis_part_layer.cc.

virtual bool KisPartLayerImpl::accept ( KisLayerVisitor &   )  [inline, virtual]

Accept the KisLayerVisitor (for the Visitor design pattern), should call the correct function on the KisLayerVisitor for this layer type.

Implements KisLayer.

Definition at line 104 of file kis_part_layer.h.

void KisPartLayerImpl::paintSelection ( QImage &  img,
Q_INT32  x,
Q_INT32  y,
Q_INT32  w,
Q_INT32  h 
) [virtual]

paints a mask where the selection on this layer resides

Reimplemented from KisLayer.

Definition at line 126 of file kis_part_layer.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys