class KFontChooser

Widget for interactive font selection. 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

Protected Methods

Protected Static Methods

Protected Members


Detailed Description

Widget for interactive font selection.

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 )

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  enableColumn ( int column, bool state )

Enables or disables a font column in the chooser. Use this function if your application does not need or supports all font properties.

Parameters:
fontSpecifies the columns. An or'ed combination of FamilyList, StyleList and SizeList is possible.
stateIf false the columns are disabled.

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.

QFont  font ()

Returns: The currently selected font in the chooser.

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.

QSize  sizeHint ( void )

[const virtual]

Returns the preferred size of the widget

void  fontSelected ( const QFont &font )

[signal]

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