• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KFontComboBox Class Reference

#include <kfontcombobox.h>

Inheritance diagram for KFontComboBox:

Inheritance graph
[legend]

List of all members.


Detailed Description

A lightweight font selection widget.

A combobox to select the font from. Lightweight counterpart to KFontChooser, for situations where only the font family should be selected, while the font style and size are handled by other means. Like in KFontChooser, this widget will show the font previews in the unrolled dropdown list.

Note:
The class is similar to QFontComboBox, but more tightly integrated with KDE desktop. Use it instead of QFontComboBox by default in KDE code.
Author:
Chusslove Illich <caslav.ilic@gmx.net>
See also:
KFontAction

KFontChooser

Since:
4.1

Definition at line 47 of file kfontcombobox.h.


Public Slots

void setCurrentFont (const QFont &font)

Signals

void currentFontChanged (const QFont &font)

Public Member Functions

QFont currentFont () const
 KFontComboBox (QWidget *parent=0)
void setOnlyFixed (bool onlyFixed)
virtual QSize sizeHint () const
virtual ~KFontComboBox ()

Protected Member Functions

bool event (QEvent *e)

Properties

QFont currentFont

Constructor & Destructor Documentation

KFontComboBox::KFontComboBox ( QWidget *  parent = 0  )  [explicit]

Constructor.

Parameters:
parent the parent widget

Definition at line 309 of file kfontcombobox.cpp.

KFontComboBox::~KFontComboBox (  )  [virtual]

Destructor.

Definition at line 330 of file kfontcombobox.cpp.


Member Function Documentation

QFont KFontComboBox::currentFont (  )  const

The font currently selected from the list.

Returns:
the selected font

void KFontComboBox::currentFontChanged ( const QFont &  font  )  [signal]

Emitted when a new font has been selected, either through user input or by setFont().

Parameters:
font the new font

bool KFontComboBox::event ( QEvent *  e  )  [protected]

Definition at line 357 of file kfontcombobox.cpp.

void KFontComboBox::setCurrentFont ( const QFont &  font  )  [slot]

Set the font to show as selected in the combobox.

Parameters:
font the new font

Definition at line 348 of file kfontcombobox.cpp.

void KFontComboBox::setOnlyFixed ( bool  onlyFixed  ) 

Toggle selectable fonts to be only those of fixed width or all.

Parameters:
onlyFixed only fixed width fonts when true, all fonts when false

Definition at line 335 of file kfontcombobox.cpp.

QSize KFontComboBox::sizeHint ( void   )  const [virtual]

The recommended size of the widget.

Reimplemented to make the recommended width independent of the particular fonts installed.

Returns:
recommended size

Definition at line 386 of file kfontcombobox.cpp.


Property Documentation

QFont KFontComboBox::currentFont [read, write]

Definition at line 51 of file kfontcombobox.h.


The documentation for this class was generated from the following files:
  • kfontcombobox.h
  • kfontcombobox.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal