KDEUI
KFontComboBox Class Reference
A lightweight font selection widget. More...
#include <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 |
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.
- See also:
- KFontAction
- Since:
- 4.1
Definition at line 47 of file kfontcombobox.h.
Constructor & Destructor Documentation
KFontComboBox::KFontComboBox | ( | QWidget * | parent = 0 |
) | [explicit] |
KFontComboBox::~KFontComboBox | ( | ) | [virtual] |
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 whenfalse
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 385 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: