chalk

KisPartLayerImpl Class Reference

#include <kis_part_layer.h>

Inheritance diagram for KisPartLayerImpl:
KisPartLayer KisLayer

Public Member Functions

 KisPartLayerImpl (KisImageSP img, KisChildDoc *doc)
virtual KisLayerSP clone () const
virtual void activate ()
virtual void deactivate ()
virtual KisChildDoc * childDoc () const
void setDocType (const TQString &type)
TQString docType () const
virtual void setX (TQ_INT32 x)
virtual void setY (TQ_INT32 y)
virtual TQ_INT32 x () const
virtual TQ_INT32 y () const
virtual TQRect extent () const
virtual TQRect exactBounds () const
virtual TQImage createThumbnail (TQ_INT32 w, TQ_INT32 h)
virtual bool accept (KisLayerVisitor &visitor)
virtual KisPaintDeviceSP prepareProjection (KisPaintDeviceSP projection, const TQRect &r)
virtual void paintSelection (TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)
virtual bool saveToXML (TQDomDocument doc, TQDomElement elem)
Public Member Functions inherited from KisPartLayer
 KisPartLayer (KisImage *img, const TQString &name, TQ_UINT8 opacity)
Public Member Functions inherited from KisLayer
 KisLayer (KisImage *img, const TQString &name, TQ_UINT8 opacity)
 KisLayer (const KisLayer &rhs)
virtual void setClean (const TQRect &rect)
virtual bool dirty ()
virtual bool dirty (const TQRect &rc)
virtual TQRect dirtyRect () const
virtual void setDirty (bool propagate=true)
virtual void setDirty (const TQRect &rect, bool propagate=true)
int id () const
virtual int index () const
virtual void setIndex (int index)
virtual KisGroupLayerSP parent () const
virtual KisLayerSP prevSibling () const
virtual KisLayerSP nextSibling () const
KisLayerSP siblingAbove () const
KisLayerSP siblingBelow () const
virtual uint childCount () const
virtual KisLayerSP firstChild () const
virtual KisLayerSP lastChild () const
virtual KisLayerSP findLayer (const TQString &name) const
virtual KisLayerSP findLayer (int id) const
virtual int numLayers (int type=0) const
virtual KNamedCommand * moveCommand (TQPoint oldPosition, TQPoint newPosition)
virtual const bool visible () const
virtual void setVisible (bool v)
KNamedCommand * setVisibleCommand (bool visiblel)
TQ_UINT8 opacity () const
void setOpacity (TQ_UINT8 val)
KNamedCommand * setOpacityCommand (TQ_UINT8 val)
KNamedCommand * setOpacityCommand (TQ_UINT8 prevOpacity, TQ_UINT8 newOpacity)
bool locked () const
void setLocked (bool l)
KNamedCommand * setLockedCommand (bool locked)
void notifyPropertyChanged ()
bool temporary () const
void setTemporary (bool t)
virtual TQString name () const
virtual void setName (const TQString &name)
KisCompositeOp compositeOp ()
void setCompositeOp (const KisCompositeOp &compositeOp)
KNamedCommand * setCompositeOpCommand (const KisCompositeOp &compositeOp)
KisImage * image () const
virtual void setImage (KisImage *image)
KisUndoAdapter * undoAdapter () const
virtual void paintSelection (TQImage &img, const TQRect &scaledImageRect, const TQSize &scaledImageSize, const TQSize &imageSize)
virtual void paintMaskInactiveLayers (TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h)

Additional Inherited Members

Public Types inherited from KisLayer
enum  { Visible = 1 , Hidden = 2 , Locked = 4 , Unlocked = 8 }

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 Chalk Fileformat natively.

Definition at line 74 of file kis_part_layer.h.

Constructor & Destructor Documentation

◆ KisPartLayerImpl()

KisPartLayerImpl::KisPartLayerImpl ( KisImageSP img,
KisChildDoc * doc )

Definition at line 62 of file kis_part_layer.cpp.

◆ ~KisPartLayerImpl()

KisPartLayerImpl::~KisPartLayerImpl ( )
virtual

Definition at line 70 of file kis_part_layer.cpp.

Member Function Documentation

◆ accept()

virtual bool KisPartLayerImpl::accept ( KisLayerVisitor & )
inlinevirtual

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 105 of file kis_part_layer.h.

◆ activate()

virtual void KisPartLayerImpl::activate ( )
inlinevirtual

Called when the layer is made active.

Reimplemented from KisLayer.

Definition at line 85 of file kis_part_layer.h.

◆ childDoc()

virtual KisChildDoc * KisPartLayerImpl::childDoc ( ) const
inlinevirtual

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

Definition at line 91 of file kis_part_layer.h.

◆ clone()

KisLayerSP KisPartLayerImpl::clone ( ) const
virtual

Return a copy of this layer.

Implements KisLayer.

Definition at line 74 of file kis_part_layer.cpp.

◆ createThumbnail()

TQImage KisPartLayerImpl::createThumbnail ( TQ_INT32 w,
TQ_INT32 h )
virtual

Returns a thumbnail in requested size.

The TQImage may have transparent parts. May also return 0

Reimplemented from KisLayer.

Definition at line 189 of file kis_part_layer.cpp.

◆ deactivate()

virtual void KisPartLayerImpl::deactivate ( )
inlinevirtual

Called when another layer is made inactive.

Reimplemented from KisLayer.

Definition at line 88 of file kis_part_layer.h.

◆ docType()

TQString KisPartLayerImpl::docType ( ) const
inline

Definition at line 94 of file kis_part_layer.h.

◆ exactBounds()

virtual TQRect KisPartLayerImpl::exactBounds ( ) const
inlinevirtual

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

Implements KisLayer.

Definition at line 101 of file kis_part_layer.h.

◆ extent()

virtual TQRect KisPartLayerImpl::extent ( ) const
inlinevirtual

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

Implements KisLayer.

Definition at line 100 of file kis_part_layer.h.

◆ paintSelection()

void KisPartLayerImpl::paintSelection ( TQImage & img,
TQ_INT32 x,
TQ_INT32 y,
TQ_INT32 w,
TQ_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.cpp.

◆ prepareProjection()

KisPaintDeviceSP KisPartLayerImpl::prepareProjection ( KisPaintDeviceSP projection,
const TQRect & r )
virtual

Implements KisPartLayer.

Definition at line 144 of file kis_part_layer.cpp.

◆ saveToXML()

bool KisPartLayerImpl::saveToXML ( TQDomDocument doc,
TQDomElement elem )
virtual

Implements KisPartLayer.

Definition at line 203 of file kis_part_layer.cpp.

◆ setDocType()

void KisPartLayerImpl::setDocType ( const TQString & type)
inline

Definition at line 93 of file kis_part_layer.h.

◆ setX()

void KisPartLayerImpl::setX ( TQ_INT32 x)
virtual

Implements KisLayer.

Definition at line 108 of file kis_part_layer.cpp.

◆ setY()

void KisPartLayerImpl::setY ( TQ_INT32 y)
virtual

Implements KisLayer.

Definition at line 117 of file kis_part_layer.cpp.

◆ x()

virtual TQ_INT32 KisPartLayerImpl::x ( ) const
inlinevirtual

Implements KisLayer.

Definition at line 98 of file kis_part_layer.h.

◆ y()

virtual TQ_INT32 KisPartLayerImpl::y ( ) const
inlinevirtual

Implements KisLayer.

Definition at line 99 of file kis_part_layer.h.


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