#include <vobject.h>
|
| void | addStyles (const TQDomElement *style, KoOasisLoadingContext &context) |
| |
| virtual void | saveOasisFill (KoGenStyles &mainStyles, KoGenStyle &stylesojectauto) const |
| |
The base class for all karbon objects.
Every object should have the ability to draw itself using a painter, perform hit detection, transform on demand, clone and load/save itself. Also each object manages its own bounding box and keeps track of its parent object.
Definition at line 49 of file vobject.h.
◆ VState
| Enumerator |
|---|
| normal | visible, not active
|
| normal_locked | visible, but locked (r/o)
|
| hidden | hidden
|
| hidden_locked | hidden and locked (r/o)
|
| deleted | deleted, nearly dead
|
| selected | visible, active and can be manipulated by tools
|
| edit | visible, active and is currently manipulated by a tool
|
Definition at line 52 of file vobject.h.
◆ VObject() [1/2]
Constructs a new object that is child of parent and has the given state.
- Parameters
-
| parent | the new object's parent |
| state | the new object's state |
Definition at line 36 of file vobject.cpp.
◆ VObject() [2/2]
| VObject::VObject |
( |
const VObject & |
obj | ) |
|
Copy constructor.
Copies parent, state and name of given object.
- Parameters
-
| obj | the object to copy properties from |
Definition at line 47 of file vobject.cpp.
◆ ~VObject()
Destroys the object and deletes the stroke, fill and DCOP-object.
Definition at line 67 of file vobject.cpp.
◆ accept()
| virtual void VObject::accept |
( |
VVisitor & |
| ) |
|
|
inlinevirtual |
◆ addStyles()
| void VObject::addStyles |
( |
const TQDomElement * |
style, |
|
|
KoOasisLoadingContext & |
context |
|
) |
| |
|
protected |
Adds a new given style to the specified OASIS context.
- Parameters
-
Definition at line 204 of file vobject.cpp.
◆ boundingBox()
| virtual const KoRect & VObject::boundingBox |
( |
| ) |
const |
|
inlinevirtual |
◆ boundingBoxIsInvalid()
| bool VObject::boundingBoxIsInvalid |
( |
| ) |
const |
|
inline |
Checks if the bounding box is invalid and needs to be recalculated.
- Returns
- true if bounding box is invalid.
Definition at line 119 of file vobject.h.
◆ clone()
| virtual VObject * VObject::clone |
( |
| ) |
const |
|
pure virtual |
◆ dcopObject()
| DCOPObject * VObject::dcopObject |
( |
| ) |
|
|
virtual |
Returns pointer to internal DCOP object.
If no internal DCOP object exist yet, it is created.
Reimplemented in VPath, and VLayer.
Definition at line 75 of file vobject.cpp.
◆ document()
Return document the object belongs to.
- Returns
- pointer to parent document or 0 if object does not belong to a document
Definition at line 216 of file vobject.cpp.
◆ draw()
| virtual void VObject::draw |
( |
VPainter * |
painter, |
|
|
const KoRect * |
rect = 0L |
|
) |
| const |
|
inlinevirtual |
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 in VDocument, VClipGroup, VPath, VGroup, and VLayer.
Definition at line 100 of file vobject.h.
◆ fill()
| virtual VFill * VObject::fill |
( |
| ) |
const |
|
inlinevirtual |
Gets the object's actual fill.
- Returns
- pointer to the object's fill
Definition at line 177 of file vobject.h.
◆ insertInfrontOf()
| virtual void VObject::insertInfrontOf |
( |
VObject * |
newObject, |
|
|
VObject * |
oldObject |
|
) |
| |
|
inlinevirtual |
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 in VGroup.
Definition at line 246 of file vobject.h.
◆ invalidateBoundingBox()
| void VObject::invalidateBoundingBox |
( |
| ) |
|
|
inline |
Invalidates the bounding box, so it has to be recalculated.
This function is public so visitors can access it themself at the right time when they manipulate many VSegments.
Definition at line 127 of file vobject.h.
◆ load()
| void VObject::load |
( |
const TQDomElement & |
element | ) |
|
|
virtual |
◆ loadOasis()
| bool VObject::loadOasis |
( |
const TQDomElement & |
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 in VPath, VDocument, and VGroup.
Definition at line 181 of file vobject.cpp.
◆ name()
| TQString VObject::name |
( |
| ) |
const |
|
virtual |
Returns the name of the object.
- Returns
- the object's name
Reimplemented in VStar.
Definition at line 225 of file vobject.cpp.
◆ parent()
| VObject * VObject::parent |
( |
| ) |
const |
|
inline |
Returns pointer to current parent object.
- Returns
- pointer to current parent object or 0 if no parent object is set
Definition at line 147 of file vobject.h.
◆ save()
| void VObject::save |
( |
TQDomElement & |
element | ) |
const |
|
virtual |
◆ saveOasis()
| void VObject::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 in VPath, VGroup, and VLayer.
Definition at line 116 of file vobject.cpp.
◆ saveOasisFill()
| void VObject::saveOasisFill |
( |
KoGenStyles & |
mainStyles, |
|
|
KoGenStyle & |
stylesojectauto |
|
) |
| const |
|
protectedvirtual |
◆ setFill()
| void VObject::setFill |
( |
const VFill & |
fill | ) |
|
|
virtual |
Sets the fill to a given new fill.
- Parameters
-
Reimplemented in VGroup.
Definition at line 93 of file vobject.cpp.
◆ setName()
| void VObject::setName |
( |
const TQString & |
s | ) |
|
Sets the object's name to a given new name.
- Parameters
-
Definition at line 231 of file vobject.cpp.
◆ setParent()
| void VObject::setParent |
( |
VObject * |
parent | ) |
|
|
inline |
Sets a new parent object.
- Parameters
-
| parent | the new parent object |
Definition at line 140 of file vobject.h.
◆ setState()
| virtual void VObject::setState |
( |
const VState |
state | ) |
|
|
inlinevirtual |
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
-
Reimplemented in VGroup.
Definition at line 163 of file vobject.h.
◆ setStroke()
| void VObject::setStroke |
( |
const VStroke & |
stroke | ) |
|
|
virtual |
Sets the stroke to a given new stroke.
- Parameters
-
Reimplemented in VGroup.
Definition at line 84 of file vobject.cpp.
◆ state()
| VState VObject::state |
( |
| ) |
const |
|
inline |
Get the state the object is in.
- Returns
- the object state at time of calling.
Definition at line 154 of file vobject.h.
◆ stroke()
| virtual VStroke * VObject::stroke |
( |
| ) |
const |
|
inlinevirtual |
Gets the object's actual stroke.
- Returns
- pointer to the object's stroke
Definition at line 170 of file vobject.h.
◆ m_boundingBox
| KoRect VObject::m_boundingBox |
|
mutableprotected |
the object's bounding box
Definition at line 285 of file vobject.h.
◆ m_boundingBoxIsInvalid
| bool VObject::m_boundingBoxIsInvalid |
|
mutableprotected |
the flag stating if the bounding box is valid
Definition at line 287 of file vobject.h.
◆ m_dcop
| DCOPObject* VObject::m_dcop |
|
protected |
the object's DCOP object
Definition at line 292 of file vobject.h.
◆ m_fill
◆ m_state
the object's state
Definition at line 286 of file vobject.h.
◆ m_stroke
the object's stroke
Definition at line 289 of file vobject.h.
The documentation for this class was generated from the following files:
|