Main Page | Class Hierarchy | Class List | File List | Class Members

Canvas::Text Class Reference

Text. More...

#include <canvas.h>

Inheritance diagram for Canvas::Text:

Inheritance graph
[legend]
Collaboration diagram for Canvas::Text:

Collaboration graph
[legend]
List of all members.

Public Types

enum  HPos { HStart, HLeft, HRight, HCenter }
enum  VPos { VBaseline, VTop, VBottom, VCenter }

Public Member Functions

 Text (const QString &text, const QColor &color, const QFont &font, HPos hp, VPos vp, Abstract *canvas=NULL)
 Text (Abstract *canvas=NULL)
QString text () const
void setText (const QString &text)
QColor color () const
void setColor (const QColor &color)
QFont font () const
void setFont (const QFont &font)
HPos hPositioning () const
VPos vPositioning () const
void setPositioning (HPos hp, VPos vp)
void setSize (QSize size)
virtual void paint (QPainter *p)
virtual QRect rect () const

Detailed Description

Text.

A Text is a text that can be put in the canvas.


Member Enumeration Documentation

enum Canvas::Text::HPos
 

Specifies the meaning of the x coordinate of the item. It can refer to the start of the text, of the left, center, right of the bounding rectangle.

enum Canvas::Text::VPos
 

Specifies the meaning of the y coordinate of the item. It can refer to the baseline of the text, of the top, center, bottom of the bounding rectangle.


Constructor & Destructor Documentation

Canvas::Text::Text const QString &  text,
const QColor &  color,
const QFont &  font,
HPos  hp,
VPos  vp,
Abstract canvas = NULL
 

Constructor, specifying the text and the parameters to use

Canvas::Text::Text Abstract canvas = NULL  ) 
 

Constructor, creating with an empty text


Member Function Documentation

QColor Canvas::Text::color  )  const [inline]
 

Returns the color

QFont Canvas::Text::font  )  const [inline]
 

Returns the font

HPos Canvas::Text::hPositioning  )  const [inline]
 

Returns the horizontal positioning style

void Canvas::Text::paint QPainter *  p  )  [virtual]
 

Override this function to draw the item with the painter

Implements Canvas::Item.

QRect Canvas::Text::rect  )  const [virtual]
 

Override this function to return the rect the item will be drawn into

Implements Canvas::Item.

void Canvas::Text::setColor const QColor &  color  ) 
 

Sets the color

void Canvas::Text::setFont const QFont &  font  ) 
 

Sets the font

void Canvas::Text::setPositioning HPos  hp,
VPos  vp
 

Sets the positioning style

void Canvas::Text::setSize QSize  size  ) 
 

Sets the size

void Canvas::Text::setText const QString &  text  ) 
 

Sets the text

QString Canvas::Text::text  )  const [inline]
 

Returns the text

VPos Canvas::Text::vPositioning  )  const [inline]
 

Returns the vertical positioning style


The documentation for this class was generated from the following files:
Generated on Thu Aug 10 03:19:40 2006 for kboard by  doxygen 1.4.3-20050530