class KFontChooser

A font selection widget. More...

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

Public Types

Public Methods

Signals

Public Static Methods


Detailed Description

A widget for interactive font selection.

While KFontChooser as an ordinary widget can be embedded in custom dialogs and therefore is very flexible, in most cases it is preferable to use the convenience functions in KFontDialog.

enum FontColumn {FamilyList=0x01, StyleList=0x02, SizeList=0x04 }

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

Constructs a font picker widget.

Parameters:

void  enableColumn ( int column, bool state )

Enable or disable a font column in the chooser.

Use this function if your application does not need or supports all font properties.

Parameters:

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

Set the currently selected font in the chooser.

Parameters:

QFont  font ()

[const]

Returns: The currently selected font in the chooser.

void  setCharset ( const QString & charset )

Set the currently selected charset in the chooser.

QString  charset ()

[const]

Returns: The currently selected charset in the dialog.

QString  sampleText ()

[const]

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:

QString  getXLFD ( const QFont &theFont )

[static]

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

Parameters:

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

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

[static]

Create a list of font strings that match pattern.

Parameters:

void  getFontList ( QStringList &list, bool fixed )

[static]

Create a list of font strings.

Parameters:

QSize  sizeHint ( void )

[const virtual]

Reimplemented for internal reasons.

void  fontSelected ( const QFont &font )

[signal]

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