00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <qpainter.h>
00021
00022 #include "errorelement.h"
00023
00024 KFORMULA_NAMESPACE_BEGIN
00025
00026 ErrorElement::ErrorElement( BasicElement* parent ) : SequenceElement( parent ) {
00027 }
00028
00034 void ErrorElement::draw( QPainter& painter, const LuPixelRect& r,
00035 const ContextStyle& context,
00036 ContextStyle::TextStyle tstyle,
00037 ContextStyle::IndexStyle istyle,
00038 StyleAttributes& style,
00039 const LuPixelPoint& parentOrigin )
00040 {
00041 LuPixelPoint myPos( parentOrigin.x()+getX(), parentOrigin.y()+getY() );
00042
00043 painter.fillRect( context.layoutUnitToPixelX( myPos.x() ),
00044 context.layoutUnitToPixelY( myPos.y() ),
00045 context.layoutUnitToPixelX( getWidth() ),
00046 context.layoutUnitToPixelY( getHeight() ),
00047 context.getErrorColor() );
00048 inherited::draw( painter, r, context, tstyle, istyle, style, parentOrigin );
00049 }
00050
00051 KFORMULA_NAMESPACE_END