source: trunk/doc/html/qfontdatabase-h.html@ 203

Last change on this file since 203 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 8.9 KB
Line 
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"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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
88class QFontStylePrivate; /* Don't touch! */
89struct QtFontStyle;
90struct QtFontFamily;
91struct QtFontFoundry;
92struct QFontDef;
93class QFontEngine;
94#ifdef Q_WS_QWS
95class QDiskFont;
96#endif
97
98class QFontDatabasePrivate;
99
100class Q_EXPORT QFontDatabase
101{
102public:
103 static QValueList&lt;int&gt; standardSizes();
104
105 QFontDatabase();
106
107 QStringList families() const;
108 QStringList families( QFont::Script ) const;
109 QStringList styles( const QString &amp; ) const;
110 QValueList&lt;int&gt; pointSizes( const QString &amp;, const QString &amp; = QString::null);
111 QValueList&lt;int&gt; smoothSizes( const QString &amp;, const QString &amp;);
112 QString styleString( const QFont &amp;);
113
114 QFont font( const QString &amp;, const QString &amp;, int);
115
116 bool isBitmapScalable( const QString &amp;, const QString &amp; = QString::null) const;
117 bool isSmoothlyScalable( const QString &amp;, const QString &amp; = QString::null) const;
118 bool isScalable( const QString &amp;, const QString &amp; = QString::null) const;
119 bool isFixedPitch( const QString &amp;, const QString &amp; = QString::null) const;
120
121 bool italic( const QString &amp;, const QString &amp;) const;
122 bool bold( const QString &amp;, const QString &amp;) const;
123 int weight( const QString &amp;, const QString &amp;) 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 &lt; 3.0
133#ifndef QT_NO_COMPAT
134
135 QStringList families(bool) const;
136 QStringList styles( const QString &amp;, const QString &amp; ) const;
137 QValueList&lt;int&gt; pointSizes( const QString &amp;, const QString &amp;, const QString &amp; );
138 QValueList&lt;int&gt; smoothSizes( const QString &amp;, const QString &amp;, const QString &amp; );
139
140 QFont font( const QString &amp;, const QString &amp;, int, const QString &amp;);
141
142 bool isBitmapScalable( const QString &amp;, const QString &amp;, const QString &amp; ) const;
143 bool isSmoothlyScalable( const QString &amp;, const QString &amp;, const QString &amp; ) const;
144 bool isScalable( const QString &amp;, const QString &amp;, const QString &amp; ) const;
145 bool isFixedPitch( const QString &amp;, const QString &amp;, const QString &amp; ) const;
146
147 bool italic( const QString &amp;, const QString &amp;, const QString &amp; ) const;
148 bool bold( const QString &amp;, const QString &amp;, const QString &amp; ) const;
149 int weight( const QString &amp;, const QString &amp;, const QString &amp; ) const;
150
151#endif // QT_NO_COMPAT
152
153private:
154#if defined(Q_WS_X11) || defined(Q_WS_WIN)
155 static QFontEngine *findFont( QFont::Script script, const QFontPrivate *fp,
156 const QFontDef &amp;request, int force_encoding_id = -1 );
157#endif // Q_WS_X11
158
159 static void createDatabase();
160
161 static void parseFontName(const QString &amp;name, QString &amp;foundry, QString &amp;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
174inline QStringList QFontDatabase::families( bool ) const
175{
176 return families();
177}
178
179inline QStringList QFontDatabase::styles( const QString &amp;family,
180 const QString &amp; ) const
181{
182 return styles(family);
183}
184
185inline QValueList&lt;int&gt; QFontDatabase::pointSizes( const QString &amp;family,
186 const QString &amp;style ,
187 const QString &amp; )
188{
189 return pointSizes(family, style);
190}
191
192inline QValueList&lt;int&gt; QFontDatabase::smoothSizes( const QString &amp;family,
193 const QString &amp;style,
194 const QString &amp; )
195{
196 return smoothSizes(family, style);
197}
198
199inline QFont QFontDatabase::font( const QString &amp;familyName,
200 const QString &amp;style,
201 int pointSize,
202 const QString &amp;)
203{
204 return font(familyName, style, pointSize);
205}
206
207inline bool QFontDatabase::isBitmapScalable( const QString &amp;family,
208 const QString &amp;style,
209 const QString &amp; ) const
210{
211 return isBitmapScalable(family, style);
212}
213
214inline bool QFontDatabase::isSmoothlyScalable( const QString &amp;family,
215 const QString &amp;style,
216 const QString &amp; ) const
217{
218 return isSmoothlyScalable(family, style);
219}
220
221inline bool QFontDatabase::isScalable( const QString &amp;family,
222 const QString &amp;style,
223 const QString &amp; ) const
224{
225 return isScalable(family, style);
226}
227
228inline bool QFontDatabase::isFixedPitch( const QString &amp;family,
229 const QString &amp;style,
230 const QString &amp; ) const
231{
232 return isFixedPitch(family, style);
233}
234
235inline bool QFontDatabase::italic( const QString &amp;family,
236 const QString &amp;style,
237 const QString &amp; ) const
238{
239 return italic(family, style);
240}
241
242inline bool QFontDatabase::bold( const QString &amp;family,
243 const QString &amp;style,
244 const QString &amp; ) const
245{
246 return bold(family, style);
247}
248
249inline int QFontDatabase::weight( const QString &amp;family,
250 const QString &amp;style,
251 const QString &amp; ) 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 &copy; 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>
Note: See TracBrowser for help on using the repository browser.