libs/flake

KoShapeBorderModel Class Reference

A model for borders around KoShapes. More...

#include <KoShapeBorderModel.h>

Inheritance diagram for KoShapeBorderModel:

List of all members.

Public Member Functions

 KoShapeBorderModel ()
virtual ~KoShapeBorderModel ()
void addUser ()
virtual void borderInsets (const KoShape *shape, KoInsets &insets)=0
KoInsets borderInsets (const KoShape *shape)
virtual void fillStyle (KoGenStyle &style, KoShapeSavingContext &context)=0
virtual bool hasTransparency ()=0
virtual void paintBorder (KoShape *shape, QPainter &painter, const KoViewConverter &converter, const QColor &color)=0
virtual void paintBorder (KoShape *shape, QPainter &painter, const KoViewConverter &converter)=0
bool removeUser ()
int useCount () const

Detailed Description

A model for borders around KoShapes.

Classes that implement this model will be allowed to draw a border on the outline of a shape. Note that since the important members take a KoShape as argument it is possible, and preferred behavior, to have one instance of a border that is reused on several objects.

Definition at line 43 of file KoShapeBorderModel.h.


Constructor & Destructor Documentation

KoShapeBorderModel::KoShapeBorderModel (  ) 

Definition at line 29 of file KoShapeBorderModel.cpp.

KoShapeBorderModel::~KoShapeBorderModel (  )  [virtual]

Definition at line 34 of file KoShapeBorderModel.cpp.


Member Function Documentation

void KoShapeBorderModel::addUser (  ) 

refcounting

Definition at line 46 of file KoShapeBorderModel.cpp.

virtual void KoShapeBorderModel::borderInsets ( const KoShape shape,
KoInsets insets 
) [pure virtual]

Return a borderInsets object filled with the size inside the shape that this border takes.

Parameters:
shape the shape the insets will be calculated for
insets the insets object that will be filled and returned.

Implemented in KoLineBorder.

KoInsets KoShapeBorderModel::borderInsets ( const KoShape shape  ) 

Return a borderInsets object filled with the size around the shape that this border takes.

Parameters:
shape the shape the insets will be calculated for

Definition at line 39 of file KoShapeBorderModel.cpp.

virtual void KoShapeBorderModel::fillStyle ( KoGenStyle &  style,
KoShapeSavingContext context 
) [pure virtual]

Fill the style object.

Parameters:
style object
context used for saving

Implemented in KoLineBorder.

virtual bool KoShapeBorderModel::hasTransparency (  )  [pure virtual]

Returns true if there is some transparency, false if the border is fully opaque.

Returns:
if the border is transparent.

Implemented in KoLineBorder.

virtual void KoShapeBorderModel::paintBorder ( KoShape shape,
QPainter painter,
const KoViewConverter converter,
const QColor color 
) [pure virtual]

Paint the border in the given color.

This method should paint the border around the shape in the given color.

Parameters:
shape the shape to paint around
painter the painter to paint to, the painter will have the topleft of the shape as its start coordinate.
converter to convert between internal and view coordinates.
color to use to paint the border.

Implemented in KoLineBorder.

virtual void KoShapeBorderModel::paintBorder ( KoShape shape,
QPainter painter,
const KoViewConverter converter 
) [pure virtual]

Paint the border.

This method should paint the border around shape.

Parameters:
shape the shape to paint around
painter the painter to paint to, the painter will have the topleft of the shape as its start coordinate.
converter to convert between internal and view coordinates.

Implemented in KoLineBorder.

bool KoShapeBorderModel::removeUser (  ) 

refcounting

Definition at line 51 of file KoShapeBorderModel.cpp.

int KoShapeBorderModel::useCount (  )  const

refcounting

Definition at line 56 of file KoShapeBorderModel.cpp.


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