All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::Font Class Reference

Class specifies a font. More...

#include <Font.h>

Public Member Functions

 Font ()
 Constructor. More...
 
virtual void fromString (std::string font)
 Sets this object state from a string. More...
 
std::string getFamily ()
 Sets font family name. More...
 
int getPointSize ()
 Returns point size of the font. More...
 
bool isBold ()
 Returns true if font use bold, false otherwise. More...
 
bool isItalic ()
 Returns true if font use italic, false otherwise. More...
 
bool isKerning ()
 Returns true if font use kerning, false otherwise. More...
 
bool isStrikeout ()
 Returns true if font use strikeout, false otherwise. More...
 
bool isUnderline ()
 Returns true if font use underline, false otherwise. More...
 
void setBold (bool bold)
 Sets font with bold style. More...
 
void setFamily (std::string family)
 Returns font family name. More...
 
void setItalic (bool italic)
 Sets font with italic style. More...
 
void setKerning (bool kerning)
 Sets font with kerning style. More...
 
void setPointSize (int point)
 Sets point size of the font. More...
 
void setStrikeout (bool strikeout)
 Sets font with strikeout style. More...
 
void setUnderline (bool underline)
 Sets font with underline style. More...
 
virtual std::string toString ()
 Serialize font object. More...
 
virtual ~Font ()
 Destructor. More...
 

Protected Member Functions

virtual bool toBool (std::string str)
 State string to boolean. More...
 
virtual std::string toString (bool flag)
 State boolean to string. More...
 

Protected Attributes

bool m_bold
 true if font use bold, false otherwise More...
 
std::string m_family
 font family name More...
 
bool m_italic
 true if font use italic, false otherwise More...
 
bool m_kerning
 true if font use kerning, false otherwise More...
 
int m_pointSize
 point size of the font More...
 
bool m_strikeout
 true if font use strikeout, false otherwise More...
 
LayoutAlign m_textAlign
 
bool m_underline
 true if font use underline, false otherwise More...
 

Detailed Description

Class specifies a font.

Definition at line 46 of file Font.h.

Constructor & Destructor Documentation

te::layout::Font::Font ( )

Constructor.

Definition at line 38 of file Font.cpp.

te::layout::Font::~Font ( )
virtual

Destructor.

Definition at line 51 of file Font.cpp.

Member Function Documentation

void te::layout::Font::fromString ( std::string  font)
virtual

Sets this object state from a string.

Parameters
fontobject serialized

Definition at line 150 of file Font.cpp.

bool te::layout::Font::isBold ( )

Returns true if font use bold, false otherwise.

Returns
true if font use bold, false otherwise

Definition at line 81 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::changeQtVariantPropertyValue(), te::layout::MenuBuilder::onShowFontDlg(), and te::layout::TextItem::updateTextConfig().

bool te::layout::Font::isItalic ( )

Returns true if font use italic, false otherwise.

Returns
true if font use italic, false otherwise

Definition at line 91 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::changeQtVariantPropertyValue(), te::layout::MenuBuilder::onShowFontDlg(), and te::layout::TextItem::updateTextConfig().

bool te::layout::Font::isKerning ( )

Returns true if font use kerning, false otherwise.

Returns
true if font use kerning, false otherwise

Definition at line 121 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::changeQtVariantPropertyValue(), te::layout::MenuBuilder::onShowFontDlg(), and te::layout::TextItem::updateTextConfig().

bool te::layout::Font::isStrikeout ( )

Returns true if font use strikeout, false otherwise.

Returns
true if font use strikeout, false otherwise

Definition at line 111 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::changeQtVariantPropertyValue(), te::layout::MenuBuilder::onShowFontDlg(), te::layout::LegendItem::paint(), and te::layout::TextItem::updateTextConfig().

bool te::layout::Font::isUnderline ( )

Returns true if font use underline, false otherwise.

Returns
true if font use underline, false otherwise

Definition at line 101 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::changeQtVariantPropertyValue(), te::layout::MenuBuilder::onShowFontDlg(), te::layout::LegendItem::paint(), and te::layout::TextItem::updateTextConfig().

void te::layout::Font::setBold ( bool  bold)

Sets font with bold style.

Parameters
trueif font use bold, false otherwise

Definition at line 76 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::getProperty(), and te::layout::MenuBuilder::onShowFontDlg().

void te::layout::Font::setItalic ( bool  italic)

Sets font with italic style.

Parameters
trueif font use italic, false otherwise

Definition at line 86 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::getProperty(), and te::layout::MenuBuilder::onShowFontDlg().

void te::layout::Font::setKerning ( bool  kerning)

Sets font with kerning style.

Parameters
trueif font use kerning, false otherwise

Definition at line 116 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::getProperty(), and te::layout::MenuBuilder::onShowFontDlg().

void te::layout::Font::setStrikeout ( bool  strikeout)

Sets font with strikeout style.

Parameters
trueif font use strikeout, false otherwise

Definition at line 106 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::getProperty(), and te::layout::MenuBuilder::onShowFontDlg().

void te::layout::Font::setUnderline ( bool  underline)

Sets font with underline style.

Parameters
trueif font use underline, false otherwise

Definition at line 96 of file Font.cpp.

Referenced by te::layout::VariantPropertiesBrowser::getProperty(), and te::layout::MenuBuilder::onShowFontDlg().

bool te::layout::Font::toBool ( std::string  str)
protectedvirtual

State string to boolean.

Parameters
fontstyle option

Definition at line 177 of file Font.cpp.

std::string te::layout::Font::toString ( void  )
virtual

Serialize font object.

Returns
font object serialized

Definition at line 126 of file Font.cpp.

std::string te::layout::Font::toString ( bool  flag)
protectedvirtual

State boolean to string.

Parameters
fontstyle option

Definition at line 172 of file Font.cpp.

Member Data Documentation

bool te::layout::Font::m_bold
protected

true if font use bold, false otherwise

Definition at line 190 of file Font.h.

std::string te::layout::Font::m_family
protected

font family name

Definition at line 188 of file Font.h.

bool te::layout::Font::m_italic
protected

true if font use italic, false otherwise

Definition at line 191 of file Font.h.

bool te::layout::Font::m_kerning
protected

true if font use kerning, false otherwise

Definition at line 194 of file Font.h.

int te::layout::Font::m_pointSize
protected

point size of the font

Definition at line 189 of file Font.h.

bool te::layout::Font::m_strikeout
protected

true if font use strikeout, false otherwise

Definition at line 193 of file Font.h.

LayoutAlign te::layout::Font::m_textAlign
protected

Definition at line 195 of file Font.h.

bool te::layout::Font::m_underline
protected

true if font use underline, false otherwise

Definition at line 192 of file Font.h.


The documentation for this class was generated from the following files: