karbon

VGroup Class Reference

#include <vgroup.h>

Inheritance diagram for VGroup:

VObject VClipGroup VLayer List of all members.

Detailed Description

Base class for all sort of VObject conglomerats.

Definition at line 34 of file vgroup.h.


Public Member Functions

 VGroup (VObject *parent, VState state=normal)
 VGroup (const VGroup &group)
virtual ~VGroup ()
virtual void draw (VPainter *painter, const KoRect *rect=0L) const
virtual const KoRect & boundingBox () const
virtual void setStroke (const VStroke &stroke)
virtual void setFill (const VFill &fill)
virtual void setState (const VState state)
virtual void save (QDomElement &element) const
virtual void saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const
virtual void load (const QDomElement &element)
virtual bool loadOasis (const QDomElement &element, KoOasisLoadingContext &context)
virtual VGroupclone () const
virtual void accept (VVisitor &visitor)
void take (const VObject &object)
void append (VObject *object)
virtual void insertInfrontOf (VObject *newObject, VObject *oldObject)
void clear ()
const VObjectList & objects () const

Protected Attributes

VObjectList m_objects

Constructor & Destructor Documentation

VGroup::VGroup VObject parent,
VState  state = normal
 

Constructs a new group object that is child of parent and has the given state.

The object's fill and stroke are created here.

Parameters:
parent the new object's parent
state the new object's state

Definition at line 54 of file vgroup.cc.

VGroup::VGroup const VGroup group  ) 
 

Copy constructor.

Parameters:
group the group to copy properties from

Definition at line 61 of file vgroup.cc.

VGroup::~VGroup  )  [virtual]
 

Destroys the group and all of the child objects.

Definition at line 73 of file vgroup.cc.


Member Function Documentation

void VGroup::accept VVisitor visitor  )  [virtual]
 

Accept a VVisitor.

Reimplemented from VObject.

Reimplemented in VLayer.

Definition at line 353 of file vgroup.cc.

void VGroup::append VObject object  ) 
 

Appends a new child object.

Parameters:
object the object to append

Definition at line 368 of file vgroup.cc.

const KoRect & VGroup::boundingBox  )  const [virtual]
 

Calculates the tightest bounding box around the object.

Returns:
the bounding box.

Reimplemented from VObject.

Definition at line 100 of file vgroup.cc.

void VGroup::clear  ) 
 

Clears the group, without destroying the grouped objects.

Definition at line 388 of file vgroup.cc.

VGroup * VGroup::clone  )  const [virtual]
 

Create an exact copy of this object.

Returns:
the exact object copy

Implements VObject.

Reimplemented in VClipGroup, and VLayer.

Definition at line 120 of file vgroup.cc.

void VGroup::draw VPainter painter,
const KoRect *  rect = 0L
const [virtual]
 

Draw the object to a painting device.

Parameters:
painter abstraction that is used to render to a painting device.
rect represents the visible rectangular area. If this object doesn't intersect with this area it is not drawn.

Reimplemented from VObject.

Reimplemented in VClipGroup, and VLayer.

Definition at line 83 of file vgroup.cc.

void VGroup::insertInfrontOf VObject newObject,
VObject oldObject
[virtual]
 

This function is important for undo/redo.

It inserts newObject in front of oldObject.

Parameters:
newObject the new object to insert
oldObject the old object the new object is inserted in front of

Reimplemented from VObject.

Definition at line 378 of file vgroup.cc.

void VGroup::load const QDomElement &  element  )  [virtual]
 

Load this object's state from xml and initialize this object accordingly.

Parameters:
element the DOM element from which the attributes are read

Reimplemented from VObject.

Reimplemented in VClipGroup, and VLayer.

Definition at line 259 of file vgroup.cc.

bool VGroup::loadOasis const QDomElement &  element,
KoOasisLoadingContext &  context
[virtual]
 

Load this object's state from OpenDocument and initialize this object accordingly.

Parameters:
element the DOM element to read attributes from
context FIXME

Reimplemented from VObject.

Definition at line 192 of file vgroup.cc.

const VObjectList& VGroup::objects  )  const [inline]
 

Read only access to the grouped objects.

Returns:
reference to the list of grouped objects

Definition at line 110 of file vgroup.h.

void VGroup::save QDomElement &  element  )  const [virtual]
 

Save this object's state to xml.

Parameters:
element the DOM element to which the attributes are saved

Reimplemented from VObject.

Reimplemented in VClipGroup, and VLayer.

Definition at line 160 of file vgroup.cc.

void VGroup::saveOasis KoStore *  store,
KoXmlWriter *  docWriter,
KoGenStyles &  mainStyles,
int &  index
const [virtual]
 

Save this object's state to OpenDocument.

Parameters:
store FIXME
docWriter FIXME
mainStyles FIXME

Reimplemented from VObject.

Reimplemented in VLayer.

Definition at line 178 of file vgroup.cc.

void VGroup::setFill const VFill fill  )  [virtual]
 

Sets the fill to a given new fill.

Parameters:
fill the new fill

Reimplemented from VObject.

Definition at line 126 of file vgroup.cc.

void VGroup::setState const VState  state  )  [virtual]
 

Sets the state to a specified new state.

Note that this will not have any visual effect until draw() is called on this object.

Parameters:
state the new state.

Reimplemented from VObject.

Definition at line 148 of file vgroup.cc.

void VGroup::setStroke const VStroke stroke  )  [virtual]
 

Sets the stroke to a given new stroke.

Parameters:
stroke the new stroke

Reimplemented from VObject.

Definition at line 137 of file vgroup.cc.

void VGroup::take const VObject object  ) 
 

Removes the reference to child object, not the object itself.

Parameters:
object the child object to remove

Definition at line 360 of file vgroup.cc.


Member Data Documentation

VObjectList VGroup::m_objects [protected]
 

the list of grouped objects

Definition at line 113 of file vgroup.h.


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