kpresenter

#include <KPrObject.h>

Public Member Functions

 KPrShadowObject (const KoPen &_pen)
KPrShadowObject & operator= (const KPrShadowObject &)
virtual void setPen (const KoPen &_pen)
virtual KoPen getPen () const
virtual TQDomDocumentFragment save (TQDomDocument &doc, double offset)
virtual double load (const TQDomElement &element)
virtual void loadOasis (const TQDomElement &element, KoOasisContext &context, KPrLoadingInfo *info)
virtual void draw (TQPainter *_painter, KoTextZoomHandler *_zoomHandler, int pageNum, SelectionMode selectionMode, bool drawContour=false)
virtual void saveOasisStrokeElement (KoGenStyles &mainStyles, KoGenStyle &styleobjectauto) const
TQString saveOasisStrokeStyle (KoGenStyles &mainStyles) const

Protected Member Functions

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

Static Protected Member Functions

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

Protected Attributes

KoPen pen

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 405 of file KPrObject.h.

Constructor & Destructor Documentation

◆ KPrShadowObject() [1/2]

KPrShadowObject::KPrShadowObject ( )

Definition at line 1634 of file KPrObject.cpp.

◆ KPrShadowObject() [2/2]

KPrShadowObject::KPrShadowObject ( const KoPen & _pen)

Definition at line 1639 of file KPrObject.cpp.

Member Function Documentation

◆ defaultPen()

KoPen KPrShadowObject::defaultPen ( ) const
protectedvirtual

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

Definition at line 1961 of file KPrObject.cpp.

◆ draw()

void KPrShadowObject::draw ( TQPainter * _painter,
KoTextZoomHandler * _zoomHandler,
int pageNum,
SelectionMode selectionMode,
bool drawContour = false )
virtual

Definition at line 1916 of file KPrObject.cpp.

◆ fillStyle()

void KPrShadowObject::fillStyle ( KoGenStyle & styleObjectAuto,
KoGenStyles & mainStyles ) const
protectedvirtual

Definition at line 1832 of file KPrObject.cpp.

◆ getPen()

virtual KoPen KPrShadowObject::getPen ( ) const
inlinevirtual

Definition at line 416 of file KPrObject.h.

◆ load()

double KPrShadowObject::load ( const TQDomElement & element)
virtual

Definition at line 1905 of file KPrObject.cpp.

◆ loadOasis()

void KPrShadowObject::loadOasis ( const TQDomElement & element,
KoOasisContext & context,
KPrLoadingInfo * info )
virtual

Definition at line 1839 of file KPrObject.cpp.

◆ loadOasisApplyViewBox()

bool KPrShadowObject::loadOasisApplyViewBox ( const TQDomElement & 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
elementthe xml element from which the viewBox attribute should be read.
pointswhich should be updated.

Definition at line 1773 of file KPrObject.cpp.

◆ loadOasisDrawPoints()

bool KPrShadowObject::loadOasisDrawPoints ( KoPointArray & points,
const TQDomElement & element,
KoOasisContext & context,
KPrLoadingInfo * info )
protected

Helper method for loading draw:points.

The svg:viewBox is taken into account.

Definition at line 1756 of file KPrObject.cpp.

◆ operator=()

KPrShadowObject & KPrShadowObject::operator= ( const KPrShadowObject & )

Definition at line 1644 of file KPrObject.cpp.

◆ paint()

void KPrShadowObject::paint ( TQPainter * painter,
KoTextZoomHandler * zoomHandler,
int pageNum,
bool drawingShadow,
bool drawContour = false )
protectedvirtual

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
drawingShadowtrue 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.

Definition at line 1966 of file KPrObject.cpp.

◆ save()

TQDomDocumentFragment KPrShadowObject::save ( TQDomDocument & doc,
double offset )
virtual

Definition at line 1649 of file KPrObject.cpp.

◆ saveOasisDrawPoints()

bool KPrShadowObject::saveOasisDrawPoints ( const KoPointArray & points,
KPOasisSaveContext & sc )
staticprotected

Helper method for saving draw:points.

The svg:viewBox is also saved.

Definition at line 1732 of file KPrObject.cpp.

◆ saveOasisStrokeElement()

void KPrShadowObject::saveOasisStrokeElement ( KoGenStyles & mainStyles,
KoGenStyle & styleobjectauto ) const
virtual

Definition at line 1658 of file KPrObject.cpp.

◆ saveOasisStrokeStyle()

TQString KPrShadowObject::saveOasisStrokeStyle ( KoGenStyles & mainStyles) const

Definition at line 1686 of file KPrObject.cpp.

◆ setPen()

virtual void KPrShadowObject::setPen ( const KoPen & _pen)
inlinevirtual

Definition at line 413 of file KPrObject.h.

Member Data Documentation

◆ pen

KoPen KPrShadowObject::pen
protected

Definition at line 475 of file KPrObject.h.


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