karbon

VLayer Class Reference

#include <vlayer.h>

Inheritance diagram for VLayer:
VGroup VObject

Public Member Functions

 VLayer (VObject *parent, VState state=normal)
 
 VLayer (const VLayer &layer)
 
virtual DCOPObject * dcopObject ()
 
virtual void draw (VPainter *painter, const KoRect *rect=0L) const
 
virtual void save (TQDomElement &element) const
 
virtual void saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const
 
virtual void load (const TQDomElement &element)
 
virtual VLayer * clone () const
 
virtual void accept (VVisitor &visitor)
 
void bringToFront (const VObject &object)
 
void upwards (const VObject &object)
 
void downwards (const VObject &object)
 
void sendToBack (const VObject &object)
 
void setSelected (bool state)
 
bool selected ()
 
- Public Member Functions inherited from VGroup
 VGroup (VObject *parent, VState state=normal)
 
 VGroup (const VGroup &group)
 
virtual ~VGroup ()
 
virtual const KoRect & boundingBox () const
 
virtual void setStroke (const VStroke &stroke)
 
virtual void setFill (const VFill &fill)
 
virtual void setState (const VState state)
 
virtual bool loadOasis (const TQDomElement &element, KoOasisLoadingContext &context)
 
void take (const VObject &object)
 
void append (VObject *object)
 
virtual void insertInfrontOf (VObject *newObject, VObject *oldObject)
 
void clear ()
 
const VObjectList & objects () const
 
- Public Member Functions inherited from VObject
 VObject (VObject *parent, VState state=edit)
 
 VObject (const VObject &obj)
 
virtual ~VObject ()
 
bool boundingBoxIsInvalid () const
 
void invalidateBoundingBox ()
 
void setParent (VObject *parent)
 
VObject * parent () const
 
VState state () const
 
virtual VStroke * stroke () const
 
virtual VFill * fill () const
 
virtual TQString name () const
 
void setName (const TQString &s)
 
VDocument * document () const
 

Additional Inherited Members

- Public Types inherited from VObject
enum  VState {
  normal = 0 , normal_locked = 1 , hidden = 2 , hidden_locked = 3 ,
  deleted = 4 , selected = 5 , edit = 6
}
 
- Protected Member Functions inherited from VObject
void addStyles (const TQDomElement *style, KoOasisLoadingContext &context)
 
virtual void saveOasisFill (KoGenStyles &mainStyles, KoGenStyle &stylesojectauto) const
 
- Protected Attributes inherited from VGroup
VObjectList m_objects
 
- Protected Attributes inherited from VObject
KoRect m_boundingBox
 
VState m_state: 8
 
bool m_boundingBoxIsInvalid: 1
 
VStroke * m_stroke
 
VFill * m_fill
 
DCOPObject * m_dcop
 

Detailed Description

VLayer manages a set of vobjects.

It keeps the objects from bottom to top in a list, ie. objects higher in the list are drawn above lower objects. Objects in a layer can be manipulated and worked on independant of objects in other layers.

Definition at line 36 of file vlayer.h.

Constructor & Destructor Documentation

◆ VLayer() [1/2]

VLayer::VLayer ( VObject *  parent,
VState  state = normal 
)

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

Parameters
parentthe new object's parent
statethe new object's state

Definition at line 38 of file vlayer.cpp.

◆ VLayer() [2/2]

VLayer::VLayer ( const VLayer &  layer)

Copy constructor.

Parameters
layerthe layer to copy properties from

Definition at line 49 of file vlayer.cpp.

◆ ~VLayer()

VLayer::~VLayer ( )
virtual

Definition at line 54 of file vlayer.cpp.

Member Function Documentation

◆ accept()

void VLayer::accept ( VVisitor &  )
virtual

Accept a VVisitor.

Reimplemented from VGroup.

Definition at line 182 of file vlayer.cpp.

◆ bringToFront()

void VLayer::bringToFront ( const VObject &  object)

Moves the object to the top of the list.

When the object is at the top this method has no effect.

Parameters
objectthe object to move

Definition at line 84 of file vlayer.cpp.

◆ clone()

VLayer * VLayer::clone ( ) const
virtual

Create an exact copy of this object.

Returns
the exact object copy

Reimplemented from VGroup.

Definition at line 176 of file vlayer.cpp.

◆ dcopObject()

DCOPObject * VLayer::dcopObject ( )
virtual

Returns pointer to internal DCOP object.

If no internal DCOP object exist yet, it is created.

Reimplemented from VObject.

Definition at line 58 of file vlayer.cpp.

◆ downwards()

void VLayer::downwards ( const VObject &  object)

Moves the object one step down the list.

When the object is at the bottom this method has no effect.

Parameters
objectthe object to move

Definition at line 110 of file vlayer.cpp.

◆ draw()

void VLayer::draw ( VPainter *  painter,
const KoRect *  rect = 0L 
) const
virtual

Draw the object to a painting device.

Parameters
painterabstraction that is used to render to a painting device.
rectrepresents the visible rectangular area. If this object doesn't intersect with this area it is not drawn.

Reimplemented from VGroup.

Definition at line 67 of file vlayer.cpp.

◆ load()

void VLayer::load ( const TQDomElement &  element)
virtual

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

Parameters
elementthe DOM element from which the attributes are read

Reimplemented from VGroup.

Definition at line 168 of file vlayer.cpp.

◆ save()

void VLayer::save ( TQDomElement &  element) const
virtual

Save this object's state to xml.

Parameters
elementthe DOM element to which the attributes are saved

Reimplemented from VGroup.

Definition at line 134 of file vlayer.cpp.

◆ saveOasis()

void VLayer::saveOasis ( KoStore *  store,
KoXmlWriter *  docWriter,
KoGenStyles &  mainStyles,
int &  index 
) const
virtual

Save this object's state to OpenDocument.

Parameters
storeFIXME
docWriterFIXME
mainStylesFIXME

Reimplemented from VGroup.

Definition at line 154 of file vlayer.cpp.

◆ selected()

bool VLayer::selected ( )
inline

Returns the selection state of the layer.

Returns
the actual selection state

Definition at line 115 of file vlayer.h.

◆ sendToBack()

void VLayer::sendToBack ( const VObject &  object)

Moves the object to the end of the list.

When the object is at the bottom this method has no effect.

Parameters
objectthe object to move

Definition at line 124 of file vlayer.cpp.

◆ setSelected()

void VLayer::setSelected ( bool  state)
inline

Selects or unselects the layer.

Parameters
statethe new selection state

Definition at line 108 of file vlayer.h.

◆ upwards()

void VLayer::upwards ( const VObject &  object)

Moves the object one step up the list.

When the object is at the top this method has no effect.

Parameters
objectthe object to move

Definition at line 94 of file vlayer.cpp.


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