libs/flake

KoShapeContainerModel Class Reference

The interface for the container model. More...

#include <KoShapeContainerModel.h>

Inheritance diagram for KoShapeContainerModel:

List of all members.

Public Member Functions

 KoShapeContainerModel ()
virtual ~KoShapeContainerModel ()
virtual void add (KoShape *child)=0
virtual void childChanged (KoShape *child, KoShape::ChangeType type)
virtual bool childClipped (const KoShape *child) const =0
virtual QList< KoShape * > childShapes () const =0
virtual void containerChanged (KoShapeContainer *container)=0
virtual int count () const =0
virtual bool isChildLocked (const KoShape *child) const =0
virtual void proposeMove (KoShape *child, QPointF &move)
virtual void remove (KoShape *child)=0
virtual void setClipping (const KoShape *child, bool clipping)=0

Detailed Description

The interface for the container model.

This class has no implementation, but only pure virtual methods. Extending this class and implementing all methods allows you to implement a custom data-backend for the KoShapeContainer.

See also:
KoShapeContainer

Definition at line 39 of file KoShapeContainerModel.h.


Constructor & Destructor Documentation

KoShapeContainerModel::KoShapeContainerModel (  ) 

default constructor

Definition at line 24 of file KoShapeContainerModel.cpp.

KoShapeContainerModel::~KoShapeContainerModel (  )  [virtual]

destructor

Definition at line 28 of file KoShapeContainerModel.cpp.


Member Function Documentation

virtual void KoShapeContainerModel::add ( KoShape child  )  [pure virtual]

Add a child to this models store.

Parameters:
child the child to be managed in the container.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

void KoShapeContainerModel::childChanged ( KoShape child,
KoShape::ChangeType  type 
) [virtual]

This method is called when one of the child shapes has been modified.

When a child shape is rotated, moved or scaled/skewed this method will be called to inform the container of such a change. The change has already happened at the time this method is called. The base implementation notifies the grand parent of the child that there was a change in a child. A reimplentation if this function should call this method when overwriding the function.

Parameters:
child the child that has been changed
type this enum shows which change the child has had.

Definition at line 38 of file KoShapeContainerModel.cpp.

virtual bool KoShapeContainerModel::childClipped ( const KoShape child  )  const [pure virtual]

Returns if the argument child has its 'clipping' property set.

See KoShapeContainerModel for an explenation of what this bool is for.

Returns:
if the argument child has its 'clipping' property set.
Parameters:
child the child for which the property will be returned.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

virtual QList<KoShape*> KoShapeContainerModel::childShapes (  )  const [pure virtual]

Create and return an iterator over all child objects.

Returns:
an interator over all child objects.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

virtual void KoShapeContainerModel::containerChanged ( KoShapeContainer container  )  [pure virtual]

This method is called as a notification that one of the properties of the container changed.

This can be one of size, position, rotation and skew. Note that clipped children will automatically get all these changes, the model does not have to do anything for that.

Parameters:
container the actual container that changed.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

virtual int KoShapeContainerModel::count (  )  const [pure virtual]

Return the current number of children registered.

Returns:
the current number of children registered.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

virtual bool KoShapeContainerModel::isChildLocked ( const KoShape child  )  const [pure virtual]

Return wheather the child has the effective state of being locked for user modifications.

The model has to call KoShape::isGeometryProtected() and base its return value upon that, it can additionally find rules on wheather the child is locked based on the container state.

Parameters:
child the shape that the user wants to move.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

void KoShapeContainerModel::proposeMove ( KoShape child,
QPointF move 
) [virtual]

This method is called when the user tries to move a shape that is a child of the container this model represents.

The child itself is not yet moved; it is proposed to be moved over the param move distance. You can alter the value of the move to affect the actual distance moved. The default implementation does nothing.

Parameters:
child the child of this container that the user is trying to move.
move the distance that the user proposes to move child from the current position.

Reimplemented in KoChildrenData.

Definition at line 32 of file KoShapeContainerModel.cpp.

virtual void KoShapeContainerModel::remove ( KoShape child  )  [pure virtual]

Remove a child to be completely separated from the model.

Parameters:
child the child to be removed.

Implemented in KoChildrenData, and SimpleShapeContainerModel.

virtual void KoShapeContainerModel::setClipping ( const KoShape child,
bool  clipping 
) [pure virtual]

Set the argument child to have its 'clipping' property set.

Parameters:
child the child for which the property will be changed.
clipping the property; see KoShapeContainerModel for an explenation of what this bool is for.

Implemented in KoChildrenData, and SimpleShapeContainerModel.


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