Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FontDatabase Class Reference

The FontDatabase class provides information about available fonts. More...

#include </home/clem/local/src/opie/library/fontdatabase.h>

Collaboration diagram for FontDatabase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FontDatabase ()
QStringList families () const

Static Public Member Functions

static void loadRenderers ()

Static Private Member Functions

static void readFonts (QFontFactory *factory)

Static Private Attributes

static QValueList< FontFactory > * factoryList = 0

Detailed Description

The FontDatabase class provides information about available fonts.

Most often you will simply want to query the database for the available font families().

Use FontDatabase rather than QFontDatabase when you may need access to fonts that are not normally available. For example, if the freetype library and the Qtopia freetype plugin are installed, TrueType fonts will be available to your application. Font renderer plugins have greater resource requirements than system fonts so they should be used only when necessary. You can force the loading of font renderer plugins with loadRenderers().

Definition at line 40 of file fontdatabase.h.


Constructor & Destructor Documentation

FontDatabase::FontDatabase  ) 
 

Constructs a FontDatabase object.

Definition at line 76 of file fontdatabase.cpp.


Member Function Documentation

QStringList FontDatabase::families  )  const
 

Returns a list of names of all the available font families.

Definition at line 88 of file fontdatabase.cpp.

References QValueList< T >::append(), QDir::count(), QDict< type >::find(), fontDir(), i, QDict< type >::insert(), list, and qt_fontmanager.

Referenced by CellFormat::createFontCombo(), and FontDialog::populateLists().

void FontDatabase::loadRenderers  )  [static]
 

Load any font renderer plugins that are available and make the fonts that the plugins can read available.

Definition at line 149 of file fontdatabase.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::clear(), QValueList< T >::end(), QDir::entryList(), QDir::exists(), FontFactory::factory, factoryList, FontFactoryInterface::fontFactory(), IID_FontFactory, FontFactory::interface, FontFactory::library, list, QLibrary, QPEApplication::qpeDir(), QS_OK, qt_fontmanager, QLibrary::queryInterface(), and readFonts().

Referenced by CellFormat::CellFormat(), and QPEApplication::QPEApplication().

void FontDatabase::readFonts QFontFactory factory  )  [static, private]
 

For internal use only.

Definition at line 204 of file fontdatabase.cpp.

References buf, QFile::exists(), flags, fontDir(), QString::local8Bit(), name, qt_fontmanager, qWarning(), and size.

Referenced by loadRenderers().


Member Data Documentation

QValueList< FontFactory > * FontDatabase::factoryList = 0 [static, private]
 

Definition at line 54 of file fontdatabase.cpp.

Referenced by loadRenderers().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:33:10 2005 for OPIE by  doxygen 1.4.2