# class KFontRequester

###

Module | kdeui
Namespace |
Class | KFontRequester
Inherits | QWidget

This class provides a widget with a lineedit and a button, which invokes a font dialog (KFontDialog).

The lineedit provides a preview of the selected font. The preview text can be customized. You can also have the font dialog show only the fixed fonts.

Author Nadeem Hasan <nhasan@kde.org>

### methods

- KFontRequester (parent, onlyFixed)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  onlyFixed | bool | 0

  Constructs a font requester widget.

  parent - The parent widget.

  onlyFixed - Only display fonts which have fixed-width character sizes.

- KFontRequester (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KFontRequester |

- KFontRequester (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | bool | 0

- button ( )

  returns QPushButton

  Returns Pointer to the pushbutton in the widget.

- font ( )

  returns QFont

  Returns The currently selected font in the requester.

- fontSelected (font)

  returns Nothing
  SIGNAL ("fontSelected (const QFont&)")

  Argument | Type | Default
  --- | --- | ---
  font | QFont |

  Emitted when a new font has been selected in the underlying dialog

- isFixedOnly ( )

  returns bool

  Returns Returns true if only fixed fonts are displayed.

- label ( )

  returns QLabel

  Returns Pointer to the label used for preview.

- sampleText ( )

  returns QString

  Returns The current text in the sample text input area.

- setFont (font, onlyFixed)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  font | QFont |
  onlyFixed | bool | 0

  Sets the currently selected font in the requester.

  font - The font to select.

  onlyFixed - Display only fixed-width fonts in the font dialog if true, or vice-versa.

- setSampleText (text)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | QString |

  Sets 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. Default text is current font name and size. Setting the text to QString() will restore the default.

  text - The new sample text. The current will be removed.

- setTitle (title)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  title | QString |

  Set the title for the widget that will be used in the tooltip and what's this text.

  title - The title to be set.

- title ( )

  returns QString

  Returns The current title of the widget.