• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties
KFontComboBox Class Reference

#include <kfontcombobox.h>

Inheritance diagram for KFontComboBox:
Inheritance graph
[legend]

List of all members.

Public Slots

void setCurrentFont (const QFont &font)

Signals

void currentFontChanged (const QFont &font)

Public Member Functions

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

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.
kfontcombobox.png
KDE Font Combo Box
Author:
Chusslove Illich <casla.nosp@m.v.il.nosp@m.ic@gm.nosp@m.x.ne.nosp@m.t>
See also:
KFontAction
KFontChooser
Since:
4.1

Definition at line 49 of file kfontcombobox.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
parentthe 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:
fontthe 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:
fontthe 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:
onlyFixedonly 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 385 of file kfontcombobox.cpp.


Property Documentation

QFont KFontComboBox::currentFont [read, write]

Definition at line 53 of file kfontcombobox.h.


The documentation for this class was generated from the following files:
  • kfontcombobox.h
  • kfontcombobox.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:53:12 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal