kpresenter

KPrShadowObject Class Reference

#include <KPrObject.h>

Inheritance diagram for KPrShadowObject:

KPrObject KPr2DObject KPrLineObject KPrPointObject KPrAutoformObject KPrClosedLineObject KPrEllipseObject KPrPartObject KPrPieObject KPrPixmapObject KPrPolygonObject KPrRectObject KPrTextObject KPrBezierCurveObject KPrFreehandObject KPrPolylineObject List of all members.

Detailed Description

Base class for objects with a pen and a brush, and which takes care of painting the shadow in draw() (by calling paint() twice).

Definition at line 406 of file KPrObject.h.


Public Member Functions

 KPrShadowObject ()
 KPrShadowObject (const KoPen &_pen)
KPrShadowObjectoperator= (const KPrShadowObject &)
virtual void setPen (const KoPen &_pen)
virtual KoPen getPen () const
virtual QDomDocumentFragment save (QDomDocument &doc, double offset)
virtual double load (const QDomElement &element)
virtual void loadOasis (const QDomElement &element, KoOasisContext &context, KPrLoadingInfo *info)
virtual void draw (QPainter *_painter, KoTextZoomHandler *_zoomHandler, int pageNum, SelectionMode selectionMode, bool drawContour=FALSE)
virtual void saveOasisStrokeElement (KoGenStyles &mainStyles, KoGenStyle &styleobjectauto) const
QString saveOasisStrokeStyle (KoGenStyles &mainStyles) const

Protected Member Functions

bool loadOasisDrawPoints (KoPointArray &points, const QDomElement &element, KoOasisContext &context, KPrLoadingInfo *info)
bool loadOasisApplyViewBox (const QDomElement &element, KoPointArray &points)
virtual void fillStyle (KoGenStyle &styleObjectAuto, KoGenStyles &mainStyles) const
virtual KoPen defaultPen () const
virtual void paint (QPainter *, KoTextZoomHandler *, int, bool drawingShadow, bool=FALSE)

Static Protected Member Functions

static bool saveOasisDrawPoints (const KoPointArray &points, KPOasisSaveContext &sc)

Protected Attributes

KoPen pen

Member Function Documentation

bool KPrShadowObject::saveOasisDrawPoints ( const KoPointArray points,
KPOasisSaveContext &  sc 
) [static, protected]

Helper method for saving draw:points.

The svg:viewBox is also saved.

Definition at line 1733 of file KPrObject.cpp.

bool KPrShadowObject::loadOasisDrawPoints ( KoPointArray points,
const QDomElement &  element,
KoOasisContext &  context,
KPrLoadingInfo info 
) [protected]

Helper method for loading draw:points.

The svg:viewBox is taken into account.

Definition at line 1757 of file KPrObject.cpp.

bool KPrShadowObject::loadOasisApplyViewBox ( const QDomElement &  element,
KoPointArray points 
) [protected]

Apply the svg:viewBox attribute to the points.

This calculates the points of the object. It uses the size of the object and the viewBox attribute to calculate the object points. When no svg:viewBox is specified it is calculated form the supplied points.

Parameters:
element the xml element from which the viewBox attribute should be read.
points which should be updated.

Definition at line 1774 of file KPrObject.cpp.

KoPen KPrShadowObject::defaultPen (  )  const [protected, virtual]

save() only saves if the pen is different from the default pen.

The default pen can vary depending on the subclass of KPrShadowObject (e.g. it's a black solidline for lines and rects, but it's NoPen for text objects

Reimplemented in KPrTextObject.

Definition at line 1962 of file KPrObject.cpp.

void KPrShadowObject::paint ( QPainter *  ,
KoTextZoomHandler *  ,
int  ,
bool  drawingShadow,
bool  = FALSE 
) [protected, virtual]

This method is to be implemented by all KPShadowObjects, to draw themselves.

draw() took care of the shadow and of preparing painter for rotation. paint() must take care of the gradient itself!

Parameters:
drawingShadow true if called to draw the shadow of the object. Usually objects will want to draw a simpler version of themselves in that case.
This method isn't pure virtual because some objects implement draw() directly.

Reimplemented in KPrAutoformObject, KPrClosedLineObject, KPrEllipseObject, KPrLineObject, KPrPartObject, KPrPieObject, KPrPointObject, KPrPolygonObject, KPrRectObject, and KPrTextObject.

Definition at line 1967 of file KPrObject.cpp.


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