Font Class Reference

Provides a font for widget text. More...

#include <Font.h>

List of all members.

Public Member Functions

virtual void setFace (const std::string &face)=0
virtual std::string getFace () const =0
virtual void setPointSize (int iSize)=0
virtual int getPointSize () const =0
virtual void setBold (bool bBold)=0
virtual bool getBold () const =0
virtual void setItalic (bool bItalic)=0
virtual bool getItalic () const =0
virtual void setUnderline (bool bUnderline)=0
virtual bool getUnderline () const =0
virtual void setQFont (const QFont &font)=0
virtual QFont & getQFont ()=0
virtual const QFont & getQFont () const =0

Protected Member Functions

virtual ~Font ()


Detailed Description

Provides a font for widget text.

This class provides basic capabilities to set the display format of text in a widget. The following settings can be set in the font:

Additional properties can be set on the font by creating a Qt font object calling setQFont(). The font's properties can also be returned as a QFont by calling getQFont() to provide flexibility for connecting to other widgets.

Definition at line 33 of file Font.h.


Constructor & Destructor Documentation

virtual Font::~Font (  )  [protected, virtual]

This object should be destroyed by calling ObjectFactory::destroyObject().

Definition at line 149 of file Font.h.


Member Function Documentation

virtual void Font::setFace ( const std::string &  face  )  [pure virtual]

Sets the font name.

Parameters:
face The font name, which should be one of the valid system fonts. This method does nothing if an empty string is passed in.

virtual std::string Font::getFace (  )  const [pure virtual]

Returns the font name.

Returns:
The font name.

virtual void Font::setPointSize ( int  iSize  )  [pure virtual]

Sets the point size for the font.

Parameters:
iSize The font point size.

virtual int Font::getPointSize (  )  const [pure virtual]

Returns the font point size.

Returns:
The font point size.

virtual void Font::setBold ( bool  bBold  )  [pure virtual]

Sets the bold state for the font.

Parameters:
bBold Pass in true to display bold text or false to display normal text.

virtual bool Font::getBold (  )  const [pure virtual]

Returns the bold state of the font.

Returns:
Returns true if the font displays bold text or false if the font displays normal text.

virtual void Font::setItalic ( bool  bItalic  )  [pure virtual]

Sets the italics state for the font.

Parameters:
bItalic Pass in true to display italicized text or false to display normal text.

virtual bool Font::getItalic (  )  const [pure virtual]

Returns the italics state of the font.

Returns:
Returns true if the font displays italicized text or false if the font displays normal text.

virtual void Font::setUnderline ( bool  bUnderline  )  [pure virtual]

Sets the underline state for the font.

Parameters:
bUnderline Pass in true to display underlined text or false to display normal text.

virtual bool Font::getUnderline (  )  const [pure virtual]

Returns the underline state of a text object.

Returns:
Returns true if the font displays underlined text or false if the font displays normal text.

virtual void Font::setQFont ( const QFont &  font  )  [pure virtual]

Sets the values of this font to those of a given Qt font.

Parameters:
font The Qt font object from which to set this font's values. All values in the font are used to display text, not just the face, point size, bold, italic, and underline.

virtual QFont& Font::getQFont (  )  [pure virtual]

Returns the values in the font as a Qt font.

Returns:
Returns a reference to a Qt font. Modifying the values in the QFont will also modify the values in this font.

virtual const QFont& Font::getQFont (  )  const [pure virtual]

Returns read-only access to the values in the font as a Qt font.

Returns:
Returns a const reference to a Qt font. To modify the values in the font call the non-const version of getQFont() or call one of the specific set methods to set a certain value.


Software Development Kit - Opticks 4.9.0 Build 16218