An implementation of FontBase that uses a Qt QFont as implementation. More...
#include <QtFont.h>


Public Member Functions | |
| virtual std::string | family () const |
| Get the family associated with the font. More... | |
| virtual const QFont & | font () const |
| Get the font object held in here. More... | |
| bool | isSet () |
| Is the font set ? More... | |
| virtual bool | italic () const |
Returns true if the font is italic, othwise returns false. More... | |
| virtual int | pointSize () const |
| Get the pointsize of the font. More... | |
| QtFont () | |
| The default constructor. More... | |
| QtFont (const std::string &family, int pointsize=12, int weight=QFont::Normal, bool italic=false) | |
| Constructor which is called to set the family. More... | |
| QtFont (const QFont &qfont) | |
| This constructor provides and way of creting QtFont from QFont. More... | |
| virtual void | setFamily (const std::string &family) |
| Set the family associated with the font. More... | |
| void | setFont (const QFont &qfont) |
| Set the font object of this class to be the one described by qfont. More... | |
| virtual void | setItalic (bool enable) |
| Set the font to be italic. More... | |
| virtual void | setPointSize (int pointsize) |
| Set the pointsize of the font. More... | |
| virtual void | setWeight (int weight) |
| Set the weight of the font. More... | |
| void | unsetFont () |
| Sets the font object of this class to be Null. More... | |
| virtual int | weight () const |
| Get the weight of the font. More... | |
| virtual | ~QtFont () |
| The destructor. More... | |
Private Attributes | |
| bool | m_flag |
| Keeps a track if the font is set of not. More... | |
| QFont | m_font |
| The font object. More... | |
| QtFont | ( | ) |
| QtFont | ( | const std::string & | family, |
| int | pointsize = 12, |
||
| int | weight = QFont::Normal, |
||
| bool | italic = false |
||
| ) |
Constructor which is called to set the family.
Definition at line 30 of file QtFont.cxx.
References QtFont::QtFont().
This constructor provides and way of creting QtFont from QFont.
Definition at line 37 of file QtFont.cxx.
References QtFont::m_flag, QtFont::m_font, and QtFont::~QtFont().
|
virtual |
The destructor.
Definition at line 44 of file QtFont.cxx.
References QtFont::family().
Referenced by QtFont::QtFont().
|
virtual |
Get the family associated with the font.
Implements FontBase.
Definition at line 50 of file QtFont.cxx.
References QFont::family(), QString::latin1(), QtFont::m_font, and QtFont::setFamily().
Referenced by QtFont::~QtFont().
|
virtual |
Get the font object held in here.
Definition at line 108 of file QtFont.cxx.
References QtFont::m_font, and QtFont::setFont().
Referenced by QtFont::setItalic().
| bool isSet | ( | ) |
Is the font set ?
Definition at line 130 of file QtFont.cxx.
References QtFont::m_flag.
Referenced by QtFont::unsetFont().
|
virtual |
Returns true if the font is italic, othwise returns false.
Implements FontBase.
Definition at line 94 of file QtFont.cxx.
References QFont::italic(), QtFont::m_font, and QtFont::setItalic().
Referenced by QtFont::setWeight().
|
virtual |
Get the pointsize of the font.
Implements FontBase.
Definition at line 66 of file QtFont.cxx.
References QtFont::m_font, QFont::pointSize(), and QtFont::setPointSize().
Referenced by QtFont::setFamily().
|
virtual |
Set the family associated with the font.
Implements FontBase.
Definition at line 59 of file QtFont.cxx.
References QtFont::m_font, QtFont::pointSize(), and QFont::setFamily().
Referenced by QtFont::family().
| void setFont | ( | const QFont & | qfont | ) |
Set the font object of this class to be the one described by qfont.
Definition at line 115 of file QtFont.cxx.
References QtFont::m_flag, QtFont::m_font, and QtFont::unsetFont().
Referenced by QtFont::font().
|
virtual |
Set the font to be italic.
Implements FontBase.
Definition at line 101 of file QtFont.cxx.
References QtFont::font(), QtFont::m_font, and QFont::setItalic().
Referenced by QtFont::italic().
|
virtual |
Set the pointsize of the font.
Implements FontBase.
Definition at line 73 of file QtFont.cxx.
References QtFont::m_font, QFont::setPointSize(), and QtFont::weight().
Referenced by QtFont::pointSize().
|
virtual |
Set the weight of the font.
Implements FontBase.
Definition at line 87 of file QtFont.cxx.
References QtFont::italic(), QtFont::m_font, and QFont::setWeight().
Referenced by QtFont::weight().
| void unsetFont | ( | ) |
Sets the font object of this class to be Null.
i.e. programs using this class should have a logic built into it which now will start using default font for drawing. Sets the object m_flag as false.
Definition at line 123 of file QtFont.cxx.
References QtFont::isSet(), and QtFont::m_flag.
Referenced by QtFont::setFont().
|
virtual |
Get the weight of the font.
Implements FontBase.
Definition at line 80 of file QtFont.cxx.
References QtFont::m_font, QtFont::setWeight(), and QFont::weight().
Referenced by QtFont::setPointSize().
|
private |
Keeps a track if the font is set of not.
Definition at line 36 of file QtFont.h.
Referenced by QtFont::isSet(), QtFont::QtFont(), QtFont::setFont(), and QtFont::unsetFont().
|
private |
The font object.
Definition at line 33 of file QtFont.h.
Referenced by QtFont::family(), QtFont::font(), QtFont::italic(), QtFont::pointSize(), QtFont::QtFont(), QtFont::setFamily(), QtFont::setFont(), QtFont::setItalic(), QtFont::setPointSize(), QtFont::setWeight(), and QtFont::weight().