KFontCombo Class Reference
A combobox that lists the available fonts. A combobox to choose a font. More...
#include <kfontcombo.h>
Inheritance diagram for KFontCombo:

Public Methods | |
KFontCombo (QWidget *parent, const char *name=0) | |
Constructor. | |
KFontCombo (const QStringList &fonts, QWidget *parent, const char *name=0) | |
Constructor that takes an already initialzed font list. | |
virtual | ~KFontCombo () |
Destructor. | |
void | setFonts (const QStringList &fonts) |
Sets the font list. | |
void | setCurrentFont (const QString &family) |
Sets the currently selected font. | |
QString | currentFont () const |
void | setBold (bool bold) |
Sets the listed fonts to bold or normal. | |
bool | bold () const |
Returns the current bold status. | |
void | setItalic (bool bold) |
Sets the listed fonts to italic or regular. | |
bool | italic () const |
Returns the current italic status. | |
void | setUnderline (bool bold) |
Sets the listed fonts to underlined or not underlined. | |
bool | underline () const |
Returns the current underline status. | |
void | setStrikeOut (bool bold) |
Sets the listed fonts to striked out or not. | |
bool | strikeOut () const |
Returns the current strike out status. | |
void | setSize (int size) |
Sets the listed fonts' size. | |
int | size () const |
Returns the current font size. | |
virtual void | setCurrentItem (int i) |
Static Public Methods | |
bool | displayFonts () |
Returns the user's setting of whether the items should be painted in the respective fonts or not. | |
Protected Methods | |
void | updateFonts () |
Updated the combo's listBox() to reflect changes made to the fonts' attributed. | |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
A combobox that lists the available fonts. A combobox to choose a font.The items are painted using the respective font itself, so the user can easily choose a font based on its look. This can be turned off globally if the user wishes so.
- Author:
- Malte Starostik <malte@kde.org>
- Version:
- Id:
- kfontcombo.h,v 1.8 2002/03/13 21:37:53 malte Exp
Definition at line 37 of file kfontcombo.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 163 of file kfontcombo.cpp. References KFontChooser::getFontList(), and setFonts(). |
|
Constructor that takes an already initialzed font list.
Definition at line 172 of file kfontcombo.cpp. References setFonts(). |
|
Destructor.
Definition at line 252 of file kfontcombo.cpp. |
Member Function Documentation
|
Sets the font list.
Definition at line 179 of file kfontcombo.cpp. References QComboBox::clear(). Referenced by KFontCombo(). |
|
Sets the currently selected font.
Definition at line 189 of file kfontcombo.cpp. References QComboBox::count(), QString::find(), QString::left(), QString::lower(), KComboBox::setCurrentItem(), and QComboBox::text(). |
|
Definition at line 230 of file kfontcombo.cpp. References QComboBox::currentText(). |
|
Sets the listed fonts to bold or normal.
Definition at line 257 of file kfontcombo.cpp. References bold(), and updateFonts(). |
|
Returns the current bold status.
Definition at line 265 of file kfontcombo.cpp. Referenced by setBold(). |
|
Sets the listed fonts to italic or regular.
Definition at line 270 of file kfontcombo.cpp. References italic(), and updateFonts(). |
|
Returns the current italic status.
Definition at line 278 of file kfontcombo.cpp. Referenced by setItalic(). |
|
Sets the listed fonts to underlined or not underlined.
Definition at line 283 of file kfontcombo.cpp. References underline(), and updateFonts(). |
|
Returns the current underline status.
Definition at line 291 of file kfontcombo.cpp. Referenced by setUnderline(). |
|
Sets the listed fonts to striked out or not.
Definition at line 296 of file kfontcombo.cpp. References strikeOut(), and updateFonts(). |
|
Returns the current strike out status.
Definition at line 304 of file kfontcombo.cpp. Referenced by setStrikeOut(). |
|
Sets the listed fonts' size.
Definition at line 309 of file kfontcombo.cpp. References QFontMetrics::lineSpacing(), QFont::setPointSize(), size(), and updateFonts(). |
|
Returns the current font size.
Definition at line 321 of file kfontcombo.cpp. Referenced by setSize(). |
|
Returns the user's setting of whether the items should be painted in the respective fonts or not.
Definition at line 338 of file kfontcombo.cpp. References KGlobal::config(). |
|
Updated the combo's listBox() to reflect changes made to the fonts' attributed.
Definition at line 326 of file kfontcombo.cpp. References QComboBox::listBox(). Referenced by setBold(), setItalic(), setSize(), setStrikeOut(), and setUnderline(). |
The documentation for this class was generated from the following files: