KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KFontComboBox Class Reference

from PyKDE4.kdeui import *

Inherits: KComboBox → QComboBox → QWidget → QObject

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.

"KDE Font Combo Box"

Author:
Chusslove Illich <caslav.ilic@gmx.net>

See also:
KFontAction
See also:
KFontChooser

Since:
4.1


Signals

 currentFontChanged (QFont font)

Methods

 __init__ (self, QWidget parent=0)
 __init__ (self, KFontComboBox a0)
QFont currentFont (self)
bool event (self, QEvent e)
 setCurrentFont (self, QFont font)
 setOnlyFixed (self, bool onlyFixed)
QSize sizeHint (self)

Signal Documentation

currentFontChanged ( QFont  font
)

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

Parameters:
font  the new font

Signal syntax:
QObject.connect(source, SIGNAL("currentFontChanged(const QFont&)"), target_slot)

Method Documentation

__init__ (  self,
QWidget  parent=0
)

Constructor.

Parameters:
parent  the parent widget

__init__ (  self,
KFontComboBox  a0
)
QFont currentFont (   self )

The font currently selected from the list.

Returns:
the selected font

bool event (  self,
QEvent  e
)
setCurrentFont (  self,
QFont  font
)

Set the font to show as selected in the combobox.

Parameters:
font  the new font

setOnlyFixed (  self,
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

QSize sizeHint (   self )

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

Returns:
recommended size

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal