| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | 
|---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qfontdatabase.h:1 --> | 
|---|
| 3 | <html> | 
|---|
| 4 | <head> | 
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 
|---|
| 6 | <title>qfontdatabase.h Include File</title> | 
|---|
| 7 | <style type="text/css"><!-- | 
|---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; } | 
|---|
| 9 | a:link { color: #004faf; text-decoration: none } | 
|---|
| 10 | a:visited { color: #672967; text-decoration: none } | 
|---|
| 11 | body { background: #ffffff; color: black; } | 
|---|
| 12 | --></style> | 
|---|
| 13 | </head> | 
|---|
| 14 | <body> | 
|---|
| 15 |  | 
|---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> | 
|---|
| 17 | <tr bgcolor="#E5E5E5"> | 
|---|
| 18 | <td valign=center> | 
|---|
| 19 | <a href="index.html"> | 
|---|
| 20 | <font color="#004faf">Home</font></a> | 
|---|
| 21 | | <a href="classes.html"> | 
|---|
| 22 | <font color="#004faf">All Classes</font></a> | 
|---|
| 23 | | <a href="mainclasses.html"> | 
|---|
| 24 | <font color="#004faf">Main Classes</font></a> | 
|---|
| 25 | | <a href="annotated.html"> | 
|---|
| 26 | <font color="#004faf">Annotated</font></a> | 
|---|
| 27 | | <a href="groups.html"> | 
|---|
| 28 | <font color="#004faf">Grouped Classes</font></a> | 
|---|
| 29 | | <a href="functions.html"> | 
|---|
| 30 | <font color="#004faf">Functions</font></a> | 
|---|
| 31 | </td> | 
|---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qfontdatabase.h</h1> | 
|---|
| 33 |  | 
|---|
| 34 | <p>This is the verbatim text of the qfontdatabase.h include file. It is provided only for illustration; the copyright remains with Trolltech. | 
|---|
| 35 | <hr> | 
|---|
| 36 | <pre> | 
|---|
| 37 | /**************************************************************************** | 
|---|
| 38 | ** $Id: qfontdatabase-h.html 2051 2007-02-21 10:04:20Z chehrlic $ | 
|---|
| 39 | ** | 
|---|
| 40 | ** Definition of the QFontDatabase class | 
|---|
| 41 | ** | 
|---|
| 42 | ** Created : 981126 | 
|---|
| 43 | ** | 
|---|
| 44 | ** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved. | 
|---|
| 45 | ** | 
|---|
| 46 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 
|---|
| 47 | ** | 
|---|
| 48 | ** This file may be distributed under the terms of the Q Public License | 
|---|
| 49 | ** as defined by Trolltech ASA of Norway and appearing in the file | 
|---|
| 50 | ** LICENSE.QPL included in the packaging of this file. | 
|---|
| 51 | ** | 
|---|
| 52 | ** This file may be distributed and/or modified under the terms of the | 
|---|
| 53 | ** GNU General Public License version 2 as published by the Free Software | 
|---|
| 54 | ** Foundation and appearing in the file LICENSE.GPL included in the | 
|---|
| 55 | ** packaging of this file. | 
|---|
| 56 | ** | 
|---|
| 57 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 
|---|
| 58 | ** licenses may use this file in accordance with the Qt Commercial License | 
|---|
| 59 | ** Agreement provided with the Software. | 
|---|
| 60 | ** | 
|---|
| 61 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 
|---|
| 62 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 
|---|
| 63 | ** | 
|---|
| 64 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 
|---|
| 65 | **   information about Qt Commercial License Agreements. | 
|---|
| 66 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 
|---|
| 67 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 
|---|
| 68 | ** | 
|---|
| 69 | ** Contact info@trolltech.com if any conditions of this licensing are | 
|---|
| 70 | ** not clear to you. | 
|---|
| 71 | ** | 
|---|
| 72 | **********************************************************************/ | 
|---|
| 73 |  | 
|---|
| 74 | #ifndef QFONTDATABASE_H | 
|---|
| 75 | #define QFONTDATABASE_H | 
|---|
| 76 |  | 
|---|
| 77 | #ifndef QT_H | 
|---|
| 78 | #include "qwindowdefs.h" | 
|---|
| 79 | #include "qstring.h" | 
|---|
| 80 | #include "qstringlist.h" | 
|---|
| 81 | #include "qfont.h" | 
|---|
| 82 | #include "qvaluelist.h" | 
|---|
| 83 | #endif // QT_H | 
|---|
| 84 |  | 
|---|
| 85 |  | 
|---|
| 86 | #ifndef QT_NO_FONTDATABASE | 
|---|
| 87 |  | 
|---|
| 88 | class QFontStylePrivate; /* Don't touch! */ | 
|---|
| 89 | struct QtFontStyle; | 
|---|
| 90 | struct QtFontFamily; | 
|---|
| 91 | struct QtFontFoundry; | 
|---|
| 92 | struct QFontDef; | 
|---|
| 93 | class QFontEngine; | 
|---|
| 94 | #ifdef Q_WS_QWS | 
|---|
| 95 | class QDiskFont; | 
|---|
| 96 | #endif | 
|---|
| 97 |  | 
|---|
| 98 | class QFontDatabasePrivate; | 
|---|
| 99 |  | 
|---|
| 100 | class Q_EXPORT QFontDatabase | 
|---|
| 101 | { | 
|---|
| 102 | public: | 
|---|
| 103 | static QValueList<int> standardSizes(); | 
|---|
| 104 |  | 
|---|
| 105 | QFontDatabase(); | 
|---|
| 106 |  | 
|---|
| 107 | QStringList families() const; | 
|---|
| 108 | QStringList families( QFont::Script ) const; | 
|---|
| 109 | QStringList styles( const QString & ) const; | 
|---|
| 110 | QValueList<int> pointSizes( const QString &, const QString & = QString::null); | 
|---|
| 111 | QValueList<int> smoothSizes( const QString &, const QString &); | 
|---|
| 112 | QString styleString( const QFont &); | 
|---|
| 113 |  | 
|---|
| 114 | QFont font( const QString &, const QString &, int); | 
|---|
| 115 |  | 
|---|
| 116 | bool isBitmapScalable( const QString &, const QString & = QString::null) const; | 
|---|
| 117 | bool isSmoothlyScalable( const QString &, const QString & = QString::null) const; | 
|---|
| 118 | bool isScalable( const QString &, const QString & = QString::null) const; | 
|---|
| 119 | bool isFixedPitch( const QString &, const QString & = QString::null) const; | 
|---|
| 120 |  | 
|---|
| 121 | bool italic( const QString &, const QString &) const; | 
|---|
| 122 | bool bold( const QString &, const QString &) const; | 
|---|
| 123 | int weight( const QString &, const QString &) const; | 
|---|
| 124 |  | 
|---|
| 125 | static QString scriptName(QFont::Script); | 
|---|
| 126 | static QString scriptSample(QFont::Script); | 
|---|
| 127 |  | 
|---|
| 128 | #ifdef Q_WS_QWS | 
|---|
| 129 | static void qwsAddDiskFont( QDiskFont *qdf ); | 
|---|
| 130 | #endif | 
|---|
| 131 |  | 
|---|
| 132 | // For source compatibility with < 3.0 | 
|---|
| 133 | #ifndef QT_NO_COMPAT | 
|---|
| 134 |  | 
|---|
| 135 | QStringList families(bool) const; | 
|---|
| 136 | QStringList styles( const QString &, const QString & ) const; | 
|---|
| 137 | QValueList<int> pointSizes( const QString &, const QString &, const QString & ); | 
|---|
| 138 | QValueList<int> smoothSizes( const QString &, const QString &, const QString & ); | 
|---|
| 139 |  | 
|---|
| 140 | QFont font( const QString &, const QString &, int, const QString &); | 
|---|
| 141 |  | 
|---|
| 142 | bool isBitmapScalable( const QString &, const QString &, const QString & ) const; | 
|---|
| 143 | bool isSmoothlyScalable( const QString &, const QString &, const QString & ) const; | 
|---|
| 144 | bool isScalable( const QString &, const QString &, const QString & ) const; | 
|---|
| 145 | bool isFixedPitch( const QString &, const QString &, const QString & ) const; | 
|---|
| 146 |  | 
|---|
| 147 | bool italic( const QString &, const QString &, const QString & ) const; | 
|---|
| 148 | bool bold( const QString &, const QString &, const QString & ) const; | 
|---|
| 149 | int weight( const QString &, const QString &, const QString & ) const; | 
|---|
| 150 |  | 
|---|
| 151 | #endif // QT_NO_COMPAT | 
|---|
| 152 |  | 
|---|
| 153 | private: | 
|---|
| 154 | #if defined(Q_WS_X11) || defined(Q_WS_WIN) | 
|---|
| 155 | static QFontEngine *findFont( QFont::Script script, const QFontPrivate *fp, | 
|---|
| 156 | const QFontDef &request, int force_encoding_id = -1 ); | 
|---|
| 157 | #endif // Q_WS_X11 | 
|---|
| 158 |  | 
|---|
| 159 | static void createDatabase(); | 
|---|
| 160 |  | 
|---|
| 161 | static void parseFontName(const QString &name, QString &foundry, QString &family); | 
|---|
| 162 |  | 
|---|
| 163 | friend struct QFontDef; | 
|---|
| 164 | friend class QFontPrivate; | 
|---|
| 165 | friend class QFontDialog; | 
|---|
| 166 | friend class QFontEngineLatinXLFD; | 
|---|
| 167 |  | 
|---|
| 168 | QFontDatabasePrivate *d; | 
|---|
| 169 | }; | 
|---|
| 170 |  | 
|---|
| 171 |  | 
|---|
| 172 | #ifndef QT_NO_COMPAT | 
|---|
| 173 |  | 
|---|
| 174 | inline QStringList QFontDatabase::families( bool ) const | 
|---|
| 175 | { | 
|---|
| 176 | return families(); | 
|---|
| 177 | } | 
|---|
| 178 |  | 
|---|
| 179 | inline QStringList QFontDatabase::styles( const QString &family, | 
|---|
| 180 | const QString & ) const | 
|---|
| 181 | { | 
|---|
| 182 | return styles(family); | 
|---|
| 183 | } | 
|---|
| 184 |  | 
|---|
| 185 | inline QValueList<int> QFontDatabase::pointSizes( const QString &family, | 
|---|
| 186 | const QString &style , | 
|---|
| 187 | const QString & ) | 
|---|
| 188 | { | 
|---|
| 189 | return pointSizes(family, style); | 
|---|
| 190 | } | 
|---|
| 191 |  | 
|---|
| 192 | inline QValueList<int> QFontDatabase::smoothSizes( const QString &family, | 
|---|
| 193 | const QString &style, | 
|---|
| 194 | const QString & ) | 
|---|
| 195 | { | 
|---|
| 196 | return smoothSizes(family, style); | 
|---|
| 197 | } | 
|---|
| 198 |  | 
|---|
| 199 | inline QFont QFontDatabase::font( const QString &familyName, | 
|---|
| 200 | const QString &style, | 
|---|
| 201 | int pointSize, | 
|---|
| 202 | const QString &) | 
|---|
| 203 | { | 
|---|
| 204 | return font(familyName, style, pointSize); | 
|---|
| 205 | } | 
|---|
| 206 |  | 
|---|
| 207 | inline bool QFontDatabase::isBitmapScalable( const QString &family, | 
|---|
| 208 | const QString &style, | 
|---|
| 209 | const QString & ) const | 
|---|
| 210 | { | 
|---|
| 211 | return isBitmapScalable(family, style); | 
|---|
| 212 | } | 
|---|
| 213 |  | 
|---|
| 214 | inline bool QFontDatabase::isSmoothlyScalable( const QString &family, | 
|---|
| 215 | const QString &style, | 
|---|
| 216 | const QString & ) const | 
|---|
| 217 | { | 
|---|
| 218 | return isSmoothlyScalable(family, style); | 
|---|
| 219 | } | 
|---|
| 220 |  | 
|---|
| 221 | inline bool QFontDatabase::isScalable( const QString &family, | 
|---|
| 222 | const QString &style, | 
|---|
| 223 | const QString & ) const | 
|---|
| 224 | { | 
|---|
| 225 | return isScalable(family, style); | 
|---|
| 226 | } | 
|---|
| 227 |  | 
|---|
| 228 | inline bool QFontDatabase::isFixedPitch( const QString &family, | 
|---|
| 229 | const QString &style, | 
|---|
| 230 | const QString & ) const | 
|---|
| 231 | { | 
|---|
| 232 | return isFixedPitch(family, style); | 
|---|
| 233 | } | 
|---|
| 234 |  | 
|---|
| 235 | inline bool QFontDatabase::italic( const QString &family, | 
|---|
| 236 | const QString &style, | 
|---|
| 237 | const QString & ) const | 
|---|
| 238 | { | 
|---|
| 239 | return italic(family, style); | 
|---|
| 240 | } | 
|---|
| 241 |  | 
|---|
| 242 | inline bool QFontDatabase::bold( const QString &family, | 
|---|
| 243 | const QString &style, | 
|---|
| 244 | const QString & ) const | 
|---|
| 245 | { | 
|---|
| 246 | return bold(family, style); | 
|---|
| 247 | } | 
|---|
| 248 |  | 
|---|
| 249 | inline int QFontDatabase::weight( const QString &family, | 
|---|
| 250 | const QString &style, | 
|---|
| 251 | const QString & ) const | 
|---|
| 252 | { | 
|---|
| 253 | return weight(family, style); | 
|---|
| 254 | } | 
|---|
| 255 |  | 
|---|
| 256 | #endif // QT_NO_COMPAT | 
|---|
| 257 |  | 
|---|
| 258 | #endif // QT_NO_FONTDATABASE | 
|---|
| 259 |  | 
|---|
| 260 | #endif // QFONTDATABASE_H | 
|---|
| 261 | </pre> | 
|---|
| 262 | <!-- eof --> | 
|---|
| 263 | <p><address><hr><div align=center> | 
|---|
| 264 | <table width=100% cellspacing=0 border=0><tr> | 
|---|
| 265 | <td>Copyright © 2007 | 
|---|
| 266 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a> | 
|---|
| 267 | <td align=right><div align=right>Qt 3.3.8</div> | 
|---|
| 268 | </table></div></address></body> | 
|---|
| 269 | </html> | 
|---|