KDEUI
#include <kfontcombobox.h>
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.
- See also
- KFontAction
- KFontChooser
- Since
- 4.1
Definition at line 49 of file kfontcombobox.h.
Constructor & Destructor Documentation
|
explicit |
|
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
|
signal |
Emitted when a new font has been selected, either through user input or by setFont().
- Parameters
-
font the new font
|
protected |
Definition at line 368 of file kfontcombobox.cpp.
|
slot |
Set the font to show as selected in the combobox.
- Parameters
-
font the 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
-
fontList a 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
-
onlyFixed only fixed width fonts when true
, all fonts whenfalse
Definition at line 338 of file kfontcombobox.cpp.
|
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
|
readwrite |
Definition at line 53 of file kfontcombobox.h.
The documentation for this class was generated from the following files:
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.