lib Library API Documentation

EmptyElement Class Reference

An element that represents an empty box. More...

#include <textelement.h>

Inheritance diagram for EmptyElement:

BasicElement List of all members.

Public Member Functions

 EmptyElement (BasicElement *parent=0)
 EmptyElement (const EmptyElement &)
virtual EmptyElementclone ()
virtual bool accept (ElementVisitor *visitor)
virtual QChar getCharacter () const
virtual void calcSizes (const ContextStyle &context, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle)
virtual void draw (QPainter &painter, const LuPixelRect &r, const ContextStyle &context, ContextStyle::TextStyle tstyle, ContextStyle::IndexStyle istyle, const LuPixelPoint &parentOrigin)
virtual QString toLatex ()

Protected Member Functions

virtual QString getTagName () const

Detailed Description

An element that represents an empty box.

Definition at line 209 of file textelement.h.


Member Function Documentation

bool EmptyElement::accept ElementVisitor visitor  )  [virtual]
 

Visit this element.

An implementation of the visitor pattern.

Implements BasicElement.

Definition at line 481 of file textelement.cc.

References accept(), and ElementVisitor::visit().

Referenced by accept().

virtual QChar EmptyElement::getCharacter  )  const [inline, virtual]
 

Returns:
the character that represents this element. Used for parsing a sequence. Here we use a dummy so an EmptyElement pretends to be a letter.

Reimplemented from BasicElement.

Definition at line 227 of file textelement.h.

void EmptyElement::calcSizes const ContextStyle context,
ContextStyle::TextStyle  tstyle,
ContextStyle::IndexStyle  istyle
[virtual]
 

Calculates our width and height and our children's parentPosition.

Implements BasicElement.

Definition at line 487 of file textelement.cc.

References calcSizes(), ContextStyle::getAdjustedSize(), ContextStyle::getDefaultFont(), KoTextZoomHandler::layoutUnitPtToPt(), and KoTextZoomHandler::ptToLayoutUnitPt().

Referenced by calcSizes().

void EmptyElement::draw QPainter painter,
const LuPixelRect r,
const ContextStyle context,
ContextStyle::TextStyle  tstyle,
ContextStyle::IndexStyle  istyle,
const LuPixelPoint parentOrigin
[virtual]
 

Draws the whole element including its children.

The `parentOrigin' is the point this element's parent starts. We can use our parentPosition to get our own origin then.

Implements BasicElement.

Definition at line 505 of file textelement.cc.

References draw(), ContextStyle::edit(), ContextStyle::getHelpColor(), KoZoomHandler::layoutUnitToPixelX(), and KoZoomHandler::layoutUnitToPixelY().

Referenced by draw().

QString EmptyElement::toLatex  )  [virtual]
 

Returns:
the latex representation of the element and of the element's children

Reimplemented from BasicElement.

Definition at line 526 of file textelement.cc.

virtual QString EmptyElement::getTagName  )  const [inline, protected, virtual]
 

Returns:
the tag name of this element type.

Reimplemented from BasicElement.

Definition at line 260 of file textelement.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:30 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003