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

KDEUI

Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KFontComboBox Class Reference

#include <kfontcombobox.h>

Inheritance diagram for KFontComboBox:
Inheritance graph
[legend]

Public Slots

void setCurrentFont (const QFont &font)
 
- Public Slots inherited from KComboBox
void rotateText (KCompletionBase::KeyBindingType type)
 
void setCompletedItems (const QStringList &items, bool autosubject=true)
 
virtual void setCompletedText (const QString &)
 
void setCurrentItem (const QString &item, bool insert=false, int index=-1)
 

Signals

void currentFontChanged (const QFont &font)
 
- Signals inherited from KComboBox
void aboutToShowContextMenu (QMenu *p)
 
void completion (const QString &)
 
void completionModeChanged (KGlobalSettings::Completion)
 
void returnPressed ()
 
void returnPressed (const QString &)
 
void substringCompletion (const QString &)
 
void textRotation (KCompletionBase::KeyBindingType)
 

Public Member Functions

 KFontComboBox (QWidget *parent=0)
 
virtual ~KFontComboBox ()
 
QFont currentFont () const
 
void setFontList (const QStringList &fontList)
 
void setOnlyFixed (bool onlyFixed)
 
virtual QSize sizeHint () const
 
- Public Member Functions inherited from KComboBox
 KComboBox (QWidget *parent=0)
 
 KComboBox (bool rw, QWidget *parent=0)
 
virtual ~KComboBox ()
 
void addUrl (const KUrl &url)
 
void addUrl (const QIcon &icon, const KUrl &url)
 
bool autoCompletion () const
 
void changeURL (const KUrl &url, int index)
 
void changeURL (const QPixmap &pixmap, const KUrl &url, int index)
 
void changeUrl (int index, const KUrl &url)
 
void changeUrl (int index, const QIcon &icon, const KUrl &url)
 
KCompletionBox * completionBox (bool create=true)
 
bool contains (const QString &text) const
 
int cursorPosition () const
 
virtual bool eventFilter (QObject *, QEvent *)
 
void insertURL (const KUrl &url, int index=-1)
 
void insertURL (const QPixmap &pixmap, const KUrl &url, int index=-1)
 
void insertUrl (int index, const KUrl &url)
 
void insertUrl (int index, const QIcon &icon, const KUrl &url)
 
virtual void setAutoCompletion (bool autocomplete)
 
virtual void setContextMenuEnabled (bool showMenu)
 
void setEditable (bool editable)
 
void setEditUrl (const KUrl &url)
 
virtual void setLineEdit (QLineEdit *)
 
void setTrapReturnKey (bool trap)
 
void setUrlDropsEnabled (bool enable)
 
bool trapReturnKey () const
 
bool urlDropsEnabled () const
 
- Public Member Functions inherited from KCompletionBase
 KCompletionBase ()
 
virtual ~KCompletionBase ()
 
KGlobalSettings::Completion completionMode () const
 
KCompletion * completionObject (bool hsig=true)
 
KCompletion * compObj () const
 
bool emitSignals () const
 
KShortcut getKeyBinding (KeyBindingType item) const
 
bool handleSignals () const
 
bool isCompletionObjectAutoDeleted () const
 
void setAutoDeleteCompletionObject (bool autoDelete)
 
virtual void setCompletedItems (const QStringList &items, bool autoSuggest=true)=0
 
virtual void setCompletedText (const QString &text)=0
 
virtual void setCompletionMode (KGlobalSettings::Completion mode)
 
virtual void setCompletionObject (KCompletion *compObj, bool hsig=true)
 
void setEnableSignals (bool enable)
 
virtual void setHandleSignals (bool handle)
 
bool setKeyBinding (KeyBindingType item, const KShortcut &key)
 
void useGlobalKeyBindings ()
 

Protected Member Functions

bool event (QEvent *e)
 
- Protected Member Functions inherited from KComboBox
virtual void create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
 
virtual QSize minimumSizeHint () const
 
virtual void setCompletedText (const QString &, bool)
 
virtual void wheelEvent (QWheelEvent *ev)
 
- Protected Member Functions inherited from KCompletionBase
KCompletionBase * delegate () const
 
KeyBindingMap getKeyBindings () const
 
void setDelegate (KCompletionBase *delegate)
 
virtual void virtual_hook (int id, void *data)
 

Properties

QFont currentFont
 
- Properties inherited from KComboBox
bool autoCompletion
 
bool trapReturnKey
 
bool urlDropsEnabled
 

Additional Inherited Members

- Public Types inherited from KCompletionBase
typedef QMap< KeyBindingType,
KShortcut > 
KeyBindingMap
 
enum  KeyBindingType { TextCompletion, PrevCompletionMatch, NextCompletionMatch, SubstringCompletion }
 
- Protected Slots inherited from KComboBox
virtual void makeCompletion (const QString &)
 

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 312 of file kfontcombobox.cpp.

KFontComboBox::~KFontComboBox ( )
virtual

Destructor.

Definition at line 333 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 368 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 359 of file kfontcombobox.cpp.

void KFontComboBox::setFontList ( const QStringList &  fontList)

Set selectable fonts to be only those present in the list.

Parameters
fontLista list of fonts as returned by QFontDatabase::families() or QFontChooser::getFontList(). If this is empty (default), then the list of fonts is constructed according to the onlyFixed setting.
Since
4.9.2

Definition at line 346 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 338 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 396 of file kfontcombobox.cpp.

Property Documentation

QFont KFontComboBox::currentFont
readwrite

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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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