Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

QFont Class Reference

Font class for drawing text. More...

#include <QFont.h>

Collaboration diagram for QFont:

Collaboration graph
[legend]

Public Methods

void draw (const char *aText, int maxLength)
 draws the text with maximum length)

void drawInternal (const char *aText, int maxLength)
 draws the text and ajust the matrix

void drawAtPos (const char *aText, int x, int y, int maxLength)
 draws the text at given position

float getTextWidth (const char *aText)
 returns width of text

int getLengthForWidth (const char *aText, int aWidth)
 returns length of string which can be drawn whithin the given width

virtual void Init ()
 initialization code

virtual void CleanUp ()
 clean up code

virtual int getSize ()
 getter method for Size

virtual void setSize (int newValue)
 setter method for Size

virtual bool getBold ()
 getter method for Bold

virtual void setBold (bool newValue)
 setter method for Bold

QColorgetColor ()
 getter method for Color

void copyFrom (QFont *from)
 copy itself from another instance

void print ()
 prints itself to the cout

 QFont ()
 Constructor.

virtual ~QFont ()
 Destructor.

void draw (const char *aText, int maxLength)
 draws the text with maximum length)

void drawInternal (const char *aText, int maxLength)
 draws the text and ajust the matrix

void drawAtPos (const char *aText, int x, int y, int maxLength)
 draws the text at given position

float getTextWidth (const char *aText)
 returns width of text

int getLengthForWidth (const char *aText, int aWidth)
 returns length of string which can be drawn whithin the given width

virtual void Init ()
 initialization code

virtual void CleanUp ()
 clean up code

virtual int getSize ()
 getter method for Size

virtual void setSize (int newValue)
 setter method for Size

virtual bool getBold ()
 getter method for Bold

virtual void setBold (bool newValue)
 setter method for Bold

QColorgetColor ()
 getter method for Color

void copyFrom (QFont *from)
 copy itself from another instance

void print ()
 prints itself to the cout

 QFont ()
 Constructor.

virtual ~QFont ()
 Destructor.


Protected Attributes

int Size
 Font size.

bool Bold
 defines whether font is bold

QColorColor
 color of the font

QColorColor
 color of the font


Detailed Description

Font class for drawing text.

Definition at line 17 of file QFont.h.


Constructor & Destructor Documentation

QFont::QFont  
 

Constructor.

Definition at line 126 of file QFont.cpp.

QFont::~QFont   [virtual]
 

Destructor.

Definition at line 136 of file QFont.cpp.

QFont::QFont  
 

Constructor.

virtual QFont::~QFont   [virtual]
 

Destructor.


Member Function Documentation

virtual void QFont::CleanUp   [virtual]
 

clean up code

void QFont::CleanUp   [virtual]
 

clean up code

Definition at line 68 of file QFont.cpp.

void QFont::copyFrom QFont *    from
 

copy itself from another instance

void QFont::copyFrom QFont *    from
 

copy itself from another instance

Definition at line 106 of file QFont.cpp.

References QColor::copyFrom().

Referenced by QTextEdit::Init(), QCheckBox::Init(), and QCaptionButton::Init().

void QFont::draw const char *    aText,
int    maxLength
 

draws the text with maximum length)

void QFont::draw const char *    aText,
int    maxLength
 

draws the text with maximum length)

Definition at line 17 of file QFont.cpp.

References drawInternal().

void QFont::drawAtPos const char *    aText,
int    x,
int    y,
int    maxLength
 

draws the text at given position

void QFont::drawAtPos const char *    aText,
int    x,
int    y,
int    maxLength
 

draws the text at given position

Definition at line 35 of file QFont.cpp.

References drawInternal().

Referenced by QCaptionButton::draw(), QWindow::drawCoordInfos(), and QWindow::drawFrame().

void QFont::drawInternal const char *    aText,
int    maxLength
 

draws the text and ajust the matrix

void QFont::drawInternal const char *    aText,
int    maxLength
 

draws the text and ajust the matrix

Definition at line 25 of file QFont.cpp.

References Bold, Color, QColor::setAsCurrent(), and Size.

Referenced by QTextEdit::draw(), QRadioButton::draw(), draw(), QCheckBox::draw(), and drawAtPos().

virtual bool QFont::getBold   [virtual]
 

getter method for Bold

bool QFont::getBold   [virtual]
 

getter method for Bold

Definition at line 86 of file QFont.cpp.

References Bold.

QColor* QFont::getColor  
 

getter method for Color

QColor * QFont::getColor  
 

getter method for Color

Definition at line 98 of file QFont.cpp.

References Color.

Referenced by QWindow::Init(), and QLookAndFeel::Init().

int QFont::getLengthForWidth const char *    aText,
int    aWidth
 

returns length of string which can be drawn whithin the given width

int QFont::getLengthForWidth const char *    aText,
int    aWidth
 

returns length of string which can be drawn whithin the given width

Definition at line 51 of file QFont.cpp.

References Size.

Referenced by QCaptionButton::draw(), and QWindow::drawFrame().

virtual int QFont::getSize   [virtual]
 

getter method for Size

int QFont::getSize   [virtual]
 

getter method for Size

Definition at line 74 of file QFont.cpp.

References Size.

Referenced by QRadioButton::draw(), QCheckBox::draw(), and QWindow::drawCoordInfos().

float QFont::getTextWidth const char *    aText
 

returns width of text

float QFont::getTextWidth const char *    aText
 

returns width of text

Definition at line 44 of file QFont.cpp.

References Size.

Referenced by QWindow::drawCoordInfos(), QCheckBox::setCaption(), QTextEdit::setText(), and QCaptionButton::updateCaptionPosition().

virtual void QFont::Init   [virtual]
 

initialization code

void QFont::Init   [virtual]
 

initialization code

Definition at line 62 of file QFont.cpp.

void QFont::print  
 

prints itself to the cout

void QFont::print  
 

prints itself to the cout

Definition at line 116 of file QFont.cpp.

virtual void QFont::setBold bool    newValue [virtual]
 

setter method for Bold

void QFont::setBold bool    newValue [virtual]
 

setter method for Bold

Definition at line 92 of file QFont.cpp.

References Bold.

Referenced by QWindow::drawFrame().

virtual void QFont::setSize int    newValue [virtual]
 

setter method for Size

void QFont::setSize int    newValue [virtual]
 

setter method for Size

Definition at line 80 of file QFont.cpp.

References Size.

Referenced by QWindow::Init(), QLookAndFeel::Init(), and MyWindow::MyWindow().


Field Documentation

bool QFont::Bold [protected]
 

defines whether font is bold

Definition at line 25 of file QFont.h.

Referenced by drawInternal(), getBold(), and setBold().

QColor* QFont::Color [protected]
 

color of the font

Definition at line 28 of file QFont.h.

QColor* QFont::Color [protected]
 

color of the font

Definition at line 27 of file QFont.h.

Referenced by drawInternal(), and getColor().

int QFont::Size [protected]
 

Font size.

Definition at line 22 of file QFont.h.

Referenced by drawInternal(), getLengthForWidth(), getSize(), getTextWidth(), and setSize().


The documentation for this class was generated from the following files:
Generated on Thu Mar 18 18:34:30 2004 for miniQT by doxygen1.2.18