class KFontChooser

Widget for interactive font selection. More...

Definition#include <kfontdialog.h>
InheritsQWidget (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Public Static Methods

Protected Methods

Protected Static Methods

Protected Members


Detailed Description

Widget for interactive font selection.

 KFontChooser (QWidget *parent = 0L, const char *name = 0L, bool onlyFixed = false, const QStringList &fontList = QStringList(), bool makeFrame = true, int visibleListSize=8 )

Constructor. Create a new font picker dialog.

Parameters:
parentThe parent widget.
nameThe widget name.
onlyFixedFontsonly display fonts which have fixed-width character sizes.
fontListA list of fonts to display, in XLFD format. If no list is formatted, the internal KDE font list is used. If that has not been created, X is queried, and all fonts available on the system are displayed.
visibleListSizeThe minimum number of visible entries in the fontlists.

void  setFont ( const QFont &font, bool onlyFixed = false )

Set the currently selected font in the chooser.

Parameters:
fontThe font to select.
onlyFixedReadjust the font list to display only fixed width fonts if true, or vice-versa.

Reimplemented from QWidget

QFont  font ()

Returns: The currently selected font in the chooser.

Reimplemented from QWidget

QString  sampleText ()

Returns: The current text in the sample text input area.

void  setSampleText ( const QString &text )

Set the sample text. Normally you should not change this text, but it can be better to do this if the default text is too large for the edit area when using the default font of your application.

Parameters:
textThe new sample text. The current will be removed.

QString  getXLFD ( const QFont &theFont )

[static]

Convert a QFont into the corresponding X Logical Font Description (XLFD).

Parameters:
theFontThe font to convert.

Returns: A string representing the given font in XLFD format.

void  getFontList ( QStringList &list, const char *pattern )

[static]

Construct a list of font strings that matches the pattern.

Parameters:
listThe list is returned here.
patternThe font pattern.

void  fontSelected ( const QFont &font )

[signal]

connect to this to monitor the font as it is selected.