⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qfont-h.html

📁 QT 下载资料仅供参考
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/include/qfont.h:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>qfont.h Include File</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">Home</font></a> | <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a> | <a href="functions.html"><font color="#004faf">Functions</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qfont.h</h1><p>This is the verbatim text of the qfont.h include file. It is provided only for illustration; the copyright remains with Trolltech.<hr><pre>/****************************************************************************** $Id$**** Definition of QFont class**** Created : 940514**** Copyright (C) 1992-2002 Trolltech AS.  All rights reserved.**** This file is part of the kernel module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QFONT_H#define QFONT_H#ifndef QT_H#include "qwindowdefs.h"#include "qstring.h"#endif // QT_Hclass QFontPrivate;                                     /* don't touch */class QStringList;class Q_EXPORT QFont{public:    enum StyleHint {	Helvetica,  SansSerif = Helvetica,	Times,      Serif = Times,	Courier,    TypeWriter = Courier,	OldEnglish, Decorative = OldEnglish,	System,	AnyStyle    };    enum StyleStrategy {	PreferDefault = 0x0001,	PreferBitmap  = 0x0002,	PreferDevice  = 0x0004,	PreferOutline = 0x0008,	ForceOutline  = 0x0010,	PreferMatch   = 0x0020,	PreferQuality = 0x0040,	PreferAntialias = 0x0080,	NoAntialias = 0x0100    };    enum Weight {	Light    = 25,	Normal   = 50,	DemiBold = 63,	Bold     = 75,	Black	 = 87    };    // default font    QFont();    // specific font    QFont( const QString &amp;family, int pointSize = 12, int weight = Normal,	   bool italic = FALSE );    // copy constructor    QFont( const QFont &amp; );    ~QFont();    QString family() const;    void setFamily( const QString &amp;);    int pointSize() const;    float pointSizeFloat() const;    void setPointSize( int );    void setPointSizeFloat( float );    int pixelSize() const;    void setPixelSize( int );    void setPixelSizeFloat( float );    int weight() const;    void setWeight( int );    bool bold() const;    void setBold( bool );    bool italic() const;    void setItalic( bool );    bool underline() const;    void setUnderline( bool );    bool strikeOut() const;    void setStrikeOut( bool );    bool fixedPitch() const;    void setFixedPitch( bool );    StyleHint styleHint() const;    StyleStrategy styleStrategy() const;    void setStyleHint( StyleHint, StyleStrategy = PreferDefault );    void setStyleStrategy( StyleStrategy s );    // is raw mode still needed?    bool rawMode() const;    void setRawMode( bool );    // dupicated from QFontInfo    bool exactMatch() const;    QFont &amp;operator=( const QFont &amp; );    bool operator==( const QFont &amp; ) const;    bool operator!=( const QFont &amp; ) const;    bool isCopyOf( const QFont &amp; ) const;#ifdef Q_WS_WIN    HFONT handle() const;#else // !Q_WS_WIN    Qt::HANDLE handle() const;#endif // Q_WS_WIN    // needed for X11    void setRawName( const QString &amp; );    QString rawName() const;    QString key() const;#ifndef QT_NO_STRINGLIST    QString toString() const;    bool fromString(const QString &amp;);    static QString substitute(const QString &amp;);    static QStringList substitutes(const QString &amp;);    static QStringList substitutions();    static void insertSubstitution(const QString&amp;, const QString &amp;);    static void insertSubstitutions(const QString&amp;, const QStringList &amp;);    static void removeSubstitution(const QString &amp;);#endif //QT_NO_STRINGLIST    static void initialize();    static void cleanup();    static void cacheStatistics();#if defined(Q_WS_QWS)    void qwsRenderToDisk(bool all=TRUE);#endif    enum Script {	// European Alphabetic Scripts	Latin,	Greek,	Cyrillic,	Armenian,	Georgian,	Runic,	Ogham,	SpacingModifiers,	CombiningMarks,	// Middle Eastern Scripts	Hebrew,	Arabic,	Syriac,	Thaana,	// South and Southeast Asian Scripts	Devanagari,	Bengali,	Gurmukhi,	Gujarati,	Oriya,	Tamil,	Telugu,	Kannada,	Malayalam,	Sinhala,	Thai,	Lao,	Tibetan,	Myanmar,	Khmer,	// East Asian Scripts	Han,	Hiragana,	Katakana,	Hangul,	Bopomofo,	Yi,	// Additional Scripts	Ethiopic,	Cherokee,	CanadianAboriginal,	Mongolian,	// Symbols	CurrencySymbols,	LetterlikeSymbols,	NumberForms,	MathematicalOperators,	TechnicalSymbols,	GeometricSymbols,	MiscellaneousSymbols,	EnclosedAndSquare,	Braille,	Unicode,	// End	NScripts,	UnknownScript = NScripts,	NoScript,	// ----------------------------------------	// Dear User, you can see values &gt; Unicode,	// but they are internal - do not touch.       	// only used on X11 to get some char displayed for all of the Han area.	HanX11,	LatinBasic = Latin,             // from ISO-8859-1	LatinExtendedA_2 = HanX11 + 1,  // from ISO-8859-2	LatinExtendedA_3,               // from ISO-8859-3	LatinExtendedA_4,               // from ISO-8859-4	LatinExtendedA_14,              // from ISO-8859-14	LatinExtendedA_15,              // from ISO-8859-15	LastPrivateScript    };    QString defaultFamily() const;    QString lastResortFamily() const;    QString lastResortFont() const;#ifndef QT_NO_COMPAT    static QFont defaultFont();    static void setDefaultFont( const QFont &amp; );#endif // QT_NO_COMPATprotected:    // why protected?    bool dirty() const;    int deciPointSize() const;private:    QFont( QFontPrivate *, bool deep = TRUE );    QFont( QFontPrivate *, QPaintDevice *pd );    void detach();#if defined(Q_WS_MAC)    void macSetFont(QPaintDevice *);#endif#if defined(Q_WS_WIN)    void *textMetric() const;#endif    friend class QFontMetrics;    friend class QFontInfo;    friend class QPainter;    friend class QPSPrinterFont;#ifndef QT_NO_DATASTREAM    friend Q_EXPORT QDataStream &amp;operator&lt;&lt;( QDataStream &amp;, const QFont &amp; );    friend Q_EXPORT QDataStream &amp;operator&gt;&gt;( QDataStream &amp;, QFont &amp; );#endif    QFontPrivate *d;};inline bool QFont::bold() const{ return weight() &gt; Normal; }inline void QFont::setBold( bool enable ){ setWeight( enable ? Bold : Normal ); }/*****************************************************************************  QFont stream functions *****************************************************************************/#ifndef QT_NO_DATASTREAMQ_EXPORT QDataStream &amp;operator&lt;&lt;( QDataStream &amp;, const QFont &amp; );Q_EXPORT QDataStream &amp;operator&gt;&gt;( QDataStream &amp;, QFont &amp; );#endif#endif // QFONT_H</pre><!-- eof --><p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright &copy; 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -