krita

KisGroupLayer Class Reference

#include <kis_group_layer.h>

Inheritance diagram for KisGroupLayer:

KisLayer

List of all members.


Detailed Description

A KisLayer that bundles child layers into a single layer.

The top layer is firstChild(), with index 0; the bottommost lastChild() with index childCount() - 1. KisLayer::nextSibling() moves towards higher indices, from the top to the bottom layer; prevSibling() the reverse. (Implementation detail: internally, the indices are reversed, for speed.)

Definition at line 36 of file kis_group_layer.h.


Signals

void sigDirty (QRect rc)

Public Member Functions

 KisGroupLayer (KisImage *img, const QString &name, Q_UINT8 opacity)
 KisGroupLayer (const KisGroupLayer &rhs)
virtual KisLayerSP clone () const
virtual void setDirty (bool propagate=true)
virtual void setDirty (const QRect &rect, bool propagate=true)
virtual void activate ()
virtual void deactivate ()
virtual Q_INT32 x () const
virtual void setX (Q_INT32)
virtual Q_INT32 y () const
virtual void setY (Q_INT32)
virtual void setImage (KisImage *image)
virtual QRect extent () const
virtual QRect exactBounds () const
virtual bool accept (KisLayerVisitor &v)
virtual void resetProjection (KisPaintDevice *to=0)
virtual KisPaintDeviceSP projection (const QRect &rect)
virtual uint childCount () const
virtual KisLayerSP firstChild () const
virtual KisLayerSP lastChild () const
virtual KisLayerSP at (int index) const
virtual int index (KisLayerSP layer) const
virtual void setIndex (KisLayerSP layer, int index)
virtual bool addLayer (KisLayerSP newLayer, int index)
virtual bool addLayer (KisLayerSP newLayer, KisLayerSP aboveThis)
virtual bool removeLayer (int index)
virtual bool removeLayer (KisLayerSP layer)
virtual QImage createThumbnail (Q_INT32 w, Q_INT32 h)
virtual bool paintLayerInducesProjectionOptimization (KisPaintLayer *l)

Member Function Documentation

KisLayerSP KisGroupLayer::clone (  )  const [virtual]

Return a copy of this layer.

Implements KisLayer.

Definition at line 55 of file kis_group_layer.cc.

void KisGroupLayer::setDirty ( bool  propagate = true  )  [virtual]

Set the entire layer extent dirty; this percolates up to parent layers all the way to the root layer.

Reimplemented from KisLayer.

Definition at line 66 of file kis_group_layer.cc.

void KisGroupLayer::setDirty ( const QRect &  rect,
bool  propagate = true 
) [virtual]

Add the given rect to the set of dirty rects for this layer; this percolates up to parent layers all the way to the root layer.

Reimplemented from KisLayer.

Definition at line 72 of file kis_group_layer.cc.

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

Called when the layer is made active.

Reimplemented from KisLayer.

Definition at line 62 of file kis_group_layer.h.

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

Called when another layer is made active.

Reimplemented from KisLayer.

Definition at line 64 of file kis_group_layer.h.

QRect KisGroupLayer::extent (  )  const [virtual]

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

Implements KisLayer.

Definition at line 240 of file kis_group_layer.cc.

QRect KisGroupLayer::exactBounds (  )  const [virtual]

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

Implements KisLayer.

Definition at line 252 of file kis_group_layer.cc.

virtual bool KisGroupLayer::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 78 of file kis_group_layer.h.

void KisGroupLayer::resetProjection ( KisPaintDevice to = 0  )  [virtual]

XXX ### look into Copy on Write here (CoW)

Definition at line 78 of file kis_group_layer.cc.

KisPaintDeviceSP KisGroupLayer::projection ( const QRect &  rect  )  [virtual]

will copy from to, if !0, CoW!!

Definition at line 91 of file kis_group_layer.cc.

uint KisGroupLayer::childCount (  )  const [virtual]

Returns how many direct child layers this layer has (not recursive).

Reimplemented from KisLayer.

Definition at line 125 of file kis_group_layer.cc.

KisLayerSP KisGroupLayer::firstChild (  )  const [virtual]

Returns the first child layer of this layer (if it supports that).

Reimplemented from KisLayer.

Definition at line 130 of file kis_group_layer.cc.

KisLayerSP KisGroupLayer::lastChild (  )  const [virtual]

Returns the last child layer of this layer (if it supports that).

Reimplemented from KisLayer.

Definition at line 135 of file kis_group_layer.cc.

KisLayerSP KisGroupLayer::at ( int  index  )  const [virtual]

Returns the layer at the specified index.

Definition at line 140 of file kis_group_layer.cc.

int KisGroupLayer::index ( KisLayerSP  layer  )  const [virtual]

Returns the index of the layer if it's in this group, or -1 otherwise.

Definition at line 147 of file kis_group_layer.cc.

void KisGroupLayer::setIndex ( KisLayerSP  layer,
int  index 
) [virtual]

Moves the specified layer to the specified index in the group, if it's already a member of this group.

Definition at line 154 of file kis_group_layer.cc.

bool KisGroupLayer::addLayer ( KisLayerSP  newLayer,
int  index 
) [virtual]

Adds the layer to this group at the specified index.

childCount() is a valid index and appends to the end. Fails and returns false if the layer is already in this group or any other (remove it first.)

Definition at line 163 of file kis_group_layer.cc.

bool KisGroupLayer::addLayer ( KisLayerSP  newLayer,
KisLayerSP  aboveThis 
) [virtual]

Add the specified layer above the specified layer (if aboveThis == 0, the bottom is used).

Definition at line 186 of file kis_group_layer.cc.

bool KisGroupLayer::removeLayer ( int  index  )  [virtual]

Removes the layer at the specified index from the group.

Definition at line 196 of file kis_group_layer.cc.

bool KisGroupLayer::removeLayer ( KisLayerSP  layer  )  [virtual]

Removes the layer from this group. Fails if there's no such layer in this group.

Definition at line 220 of file kis_group_layer.cc.

QImage KisGroupLayer::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 299 of file kis_group_layer.cc.

bool KisGroupLayer::paintLayerInducesProjectionOptimization ( KisPaintLayer l  )  [virtual]

Returns if the layer will induce the projection hack (if the only layer in this group).

Definition at line 86 of file kis_group_layer.cc.


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