class KFontCombo

# class KFontCombo | A combobox to choose a font. More...
Definition | `#include <kfontcombo.h>`
Inherits | KComboBox [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KFontCombo (QWidget *parent, const char *name = 0)
- KFontCombo (const QStringList &fonts, QWidget *parent, const char *name = 0)
- virtual ~KFontCombo ()
- void setFonts (const QStringList &fonts)
- void setCurrentFont (const QString &family)
- QString currentFont () const
- void setBold (bool bold)
- bool bold () const
- void setItalic (bool bold)
- bool italic () const
- void setUnderline (bool bold)
- bool underline () const
- void setStrikeOut (bool bold)
- bool strikeOut () const
- void setSize (int size)
- int size () const
- virtual void setCurrentItem (int i)

#### Public Static Methods

- static bool displayFonts ()

#### Protected Methods

- void updateFonts ()
- virtual void virtual_hook ( int id, void* data )

## Detailed Description

A combobox that lists the available fonts.

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.

KFontCombo (QWidget *parent, const char *name = 0) | ### KFontCombo

Constructor

Parameters:

parent | The parent widget
name | The object name for the widget

KFontCombo (const QStringList &fonts, QWidget *parent, const char *name = 0) | ### KFontCombo

Constructor that takes an already initialzed font list

Parameters:

fonts | A list of fonts to show
parent | The parent widget
name | The object name for the widget

~KFontCombo () | ### ~KFontCombo

[virtual]

Destructor

void setFonts (const QStringList &fonts) | ### setFonts

Sets the font list.

Parameters:

fonts | Font list to show

void setCurrentFont (const QString &family) | ### setCurrentFont

Sets the currently selected font.

Parameters:

family | Font to select.

QString currentFont () | ### currentFont

[const]

Returns: the currently selected font.

void setBold (bool bold) | ### setBold

Sets the listed fonts to bold or normal.

Parameters:

bold | Set to true to display fonts in bold

bool bold () | ### bold

[const]

Returns the current bold status.

Returns: true if fonts are bold

void setItalic (bool bold) | ### setItalic

Sets the listed fonts to italic or regular.

Parameters:

italic | Set to true to display fonts italic

bool italic () | ### italic

[const]

Returns the current italic status

Returns: True if fonts are italic

void setUnderline (bool bold) | ### setUnderline

Sets the listed fonts to underlined or not underlined

Parameters:

underline | Set to true to display fonts underlined

bool underline () | ### underline

[const]

Returns the current underline status

Returns: True if fonts are underlined

void setStrikeOut (bool bold) | ### setStrikeOut

Sets the listed fonts to striked out or not

Parameters:

strikeOut | Set to true to display fonts striked out

bool strikeOut () | ### strikeOut

[const]

Returns the current strike out status

Returns: True if fonts are striked out

void setSize (int size) | ### setSize

Sets the listed fonts' size

Parameters:

size | Set to the point size to display the fonts in

int size () | ### size

[const]

Returns the current font size

Returns: The point size of the fonts

bool displayFonts () | ### displayFonts

[static]

Returns the user's setting of whether the items should be painted in the respective fonts or not

Returns: True if the respective fonts are used for painting

void setCurrentItem (int i) | ### setCurrentItem

[virtual]

Reimplemented from KComboBox.

void updateFonts () | ### updateFonts

[protected]

Updated the combo's listBox() to reflect changes made to the fonts' attributed

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from KComboBox.

- Version: $Id: kfontcombo.h,v 1.8.4.1 2003/07/14 02:48:17 bmeyer Exp $
- Author: Malte Starostik
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.