• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

KFontCombo Class Reference

A combobox that lists the available fonts. More...

#include <kfontcombo.h>

Inheritance diagram for KFontCombo:

Inheritance graph
[legend]

List of all members.


Public Member Functions

bool bold () const
QString currentFont () const
bool italic () const
 KFontCombo (const QStringList &fonts, QWidget *parent, const char *name=0)
 KFontCombo (QWidget *parent, const char *name=0)
void setBold (bool bold)
void setCurrentFont (const QString &family)
virtual void setCurrentItem (int i)
void setFonts (const QStringList &fonts)
void setItalic (bool italic)
void setSize (int size)
void setStrikeOut (bool strikeOut)
void setUnderline (bool underline)
int size () const
bool strikeOut () const
bool underline () const
virtual ~KFontCombo ()

Static Public Member Functions

static bool displayFonts ()

Protected Slots

void slotModified (int i)

Protected Member Functions

void updateFonts ()
virtual void virtual_hook (int id, void *data)

Properties

bool bold
QString family
int fontSize
bool italic
bool strikeOut
bool underline

Detailed Description

A combobox that lists the available fonts.

The items are painted using the respective font itself, so the user can easily choose a font based on its look. This can be turned off globally if the user wishes so.

Author:
Malte Starostik <malte@kde.org>

Definition at line 35 of file kfontcombo.h.


Constructor & Destructor Documentation

KFontCombo::KFontCombo ( QWidget *  parent,
const char *  name = 0 
)

Constructor.

Parameters:
parent The parent widget
name The object name for the widget

Definition at line 163 of file kfontcombo.cpp.

KFontCombo::KFontCombo ( const QStringList &  fonts,
QWidget *  parent,
const char *  name = 0 
)

Constructor that takes an already initialzed font list.

Parameters:
fonts A list of fonts to show
parent The parent widget
name The object name for the widget

Definition at line 172 of file kfontcombo.cpp.

KFontCombo::~KFontCombo (  )  [virtual]

Destructor.

Definition at line 260 of file kfontcombo.cpp.


Member Function Documentation

bool KFontCombo::bold (  )  const

Returns the current bold status.

Returns:
true if fonts are bold

QString KFontCombo::currentFont (  )  const

Returns:
the currently selected font.

Definition at line 237 of file kfontcombo.cpp.

bool KFontCombo::displayFonts (  )  [static]

Returns the user's setting of whether the items should be painted in the respective fonts or not.

Returns:
True if the respective fonts are used for painting

Definition at line 346 of file kfontcombo.cpp.

bool KFontCombo::italic (  )  const

Returns the current italic status.

Returns:
True if fonts are italic

void KFontCombo::setBold ( bool  bold  ) 

Sets the listed fonts to bold or normal.

Parameters:
bold Set to true to display fonts in bold

Definition at line 265 of file kfontcombo.cpp.

void KFontCombo::setCurrentFont ( const QString &  family  ) 

Sets the currently selected font.

Parameters:
family Font to select.

Definition at line 189 of file kfontcombo.cpp.

void KFontCombo::setCurrentItem ( int  index  )  [virtual]

Simply calls QComboBox' implementation.

Only here to not become shadowed.

Reimplemented from KComboBox.

Definition at line 244 of file kfontcombo.cpp.

void KFontCombo::setFonts ( const QStringList &  fonts  ) 

Sets the font list.

Parameters:
fonts Font list to show

Definition at line 179 of file kfontcombo.cpp.

void KFontCombo::setItalic ( bool  italic  ) 

Sets the listed fonts to italic or regular.

Parameters:
italic Set to true to display fonts italic

Definition at line 278 of file kfontcombo.cpp.

void KFontCombo::setSize ( int  size  ) 

Sets the listed fonts' size.

Parameters:
size Set to the point size to display the fonts in

Definition at line 317 of file kfontcombo.cpp.

void KFontCombo::setStrikeOut ( bool  strikeOut  ) 

Sets the listed fonts to striked out or not.

Parameters:
strikeOut Set to true to display fonts striked out

Definition at line 304 of file kfontcombo.cpp.

void KFontCombo::setUnderline ( bool  underline  ) 

Sets the listed fonts to underlined or not underlined.

Parameters:
underline Set to true to display fonts underlined

Definition at line 291 of file kfontcombo.cpp.

int KFontCombo::size (  )  const

Returns the current font size.

Returns:
The point size of the fonts

Definition at line 329 of file kfontcombo.cpp.

void KFontCombo::slotModified ( int  i  )  [protected, slot]

For internal use only.

Listens to highlighted(int)

Definition at line 232 of file kfontcombo.cpp.

bool KFontCombo::strikeOut (  )  const

Returns the current strike out status.

Returns:
True if fonts are striked out

bool KFontCombo::underline (  )  const

Returns the current underline status.

Returns:
True if fonts are underlined

void KFontCombo::updateFonts (  )  [protected]

Updated the combo's listBox() to reflect changes made to the fonts' attributed.

Definition at line 334 of file kfontcombo.cpp.

void KFontCombo::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KComboBox.

Definition at line 352 of file kfontcombo.cpp.


Property Documentation

bool KFontCombo::bold [read, write]

Definition at line 39 of file kfontcombo.h.

QString KFontCombo::family [read, write]

Definition at line 38 of file kfontcombo.h.

int KFontCombo::fontSize [read, write]

Definition at line 43 of file kfontcombo.h.

bool KFontCombo::italic [read, write]

Definition at line 40 of file kfontcombo.h.

bool KFontCombo::strikeOut [read, write]

Definition at line 42 of file kfontcombo.h.

bool KFontCombo::underline [read, write]

Definition at line 41 of file kfontcombo.h.


The documentation for this class was generated from the following files:
  • kfontcombo.h
  • kfontcombo.cpp

kdeui

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal