📄 emb-classes.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/doc/embclasses.doc:37 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Qt/Embedded-specific classes</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 Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped 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>The Qt/Embedded-specific classes</h1> <p> Qt/Embedded classes fall into two classes - the majority are used byevery Qt/Embedded program, some are used only by the Qt/Embedded server. The Qt/Embedded server program can be a client as well, as in the case of asingle-process installation. All Qt/Embedded specific source files livein <tt>src/kernel</tt> and are suffixed <tt>_qws</tt>. --> indicates inheritance.<p> <!-- toc --><ul><li><a href="#1"> QFontManager</a><li><a href="#2"> QDiskFont</a><li><a href="#3"> QRenderedFont</a><li><a href="#4"> QFontFactory (and descendants QFontFactoryBDF, QFontFactoryTtf)</a><li><a href="#5"> QGlyph</a><li><a href="#6"> QMemoryManagerPixmap/QMemoryManager</a><li><a href="#7"> QScreen-->QLinuxFbScreen-->accelerated screens, QTransformedScreen-->QVfbScreen</a><li><a href="#8"> QScreenCursor-->accelerated cursor-->QVfbCursor</a><li><a href="#9"> QGfx-->RasterBase-->Raster-->accelerated driver--> QGfxVfb-->QGfxTransformedRaster</a><li><a href="#10"> QLock, QLockHolder</a><li><a href="#11"> QDirectPainter</a><li><a href="#12"> QWSSoundServer, Client</a><li><a href="#13"> QWSWindow</a><li><a href="#14"> QWSKeyboardHandler-->subtypes</a><li><a href="#15"> QWSMouseHandler-->QCalibratedMouseHandler-->mouse types</a><li><a href="#16"> QWSDisplay</a><li><a href="#17"> QWSServer </a><li><a href="#18"> QWSClient</a><li><a href="#19"> QWSDisplayData</a><li><a href="#20"> QWSCommands</a><li><a href="#21"> QCopChannel</a><li><a href="#22"> QWSManager</a><li><a href="#23"> QWSDecoration</a><li><a href="#24"> QWSPropertyManager</a><li><a href="#25"> QWSRegionManager</a><li><a href="#26"> QWSSocket, QWSServerSocket</a></ul><!-- endtoc --><p> <h2> <a href="qfontmanager.html">QFontManager</a></h2><a name="1"></a><p> There is one of these per application. At application startup time itreads the font definition file from <tt>$QTDIR/etc/fonts/fontdir</tt> (or <tt>/usr/local/etc/qt-embedded/fonts/fontdir</tt> if QTDIR is undefined). Itkeeps track of all font information and maintains a cache of renderedfonts. It also creates the font factories - QFontManager::QFontManageris the place to add constructors for new factories. It provides ahigh-level interface for requesting a particular font and callsQFontFactories to load fonts from disk on demand. Note that this onlyapplies to BDF and TrueType fonts; Qt/Embedded's optimised .qpf fontfile format bypasses the QFontManager mechanism altogether. <p> There should be no need to modify this class unless you wish to changefont matching or cacheing behaviour.<p> <h2> QDiskFont</h2><a name="2"></a><p> This contains information about a single on-disk font file (e.g./usr/local/etc/qt-embedded/times.ttf). It holds the file path,information about whether the font is scalable, its weight, size,Qt/Embedded name, etc. This information is used so that <a href="qfontmanager.html">QFontManager</a>can find the closest matching disk font (it uses a scoring mechanismweighted towards matching names, then whether the font's italic, thenweight). <p> There should be no reason to modify this class.<p> <h2> QRenderedFont</h2><a name="3"></a><p> There is one and only one QRenderedFont for every unique fontcurrently loaded by the system (that is, each unique combination ofname, size, weight, italic or not, anti-aliased or not).QRenderedFonts are reference counted; once no one is using theQRenderedFont it is deleted along with its cache of glyph bitmaps. TheQDiskFont it was loaded from remains opened by its QFontFactory.<p> There should be no reason to modify this class, unless you wish tochange the way in which glyphs are cached.<p> <h2> QFontFactory (and descendants QFontFactoryBDF, QFontFactoryTtf)</h2><a name="4"></a><p> These provide support for particular font formats, for instance thescalable Truetype and Type1 formats (both supported inQFontFactoryTtf, which uses Freetype 2) and the bitmap BDF format usedby X. It's called to open an on-disk font; once a font is opened itremains opened so that the creation of new font instances from thedisk font is fast. It can also create a QRenderedFont and convert fromUnicode values to an index into the font file. For compactness, glyphsare stored in the order and indexes they are defined in the fontrather than in Unicode order. <p> There should be no need to modify this class, but it should beinherited if you wish to add a different type of font renderer (e.g.for a custom vector font format).<p> <h2> QGlyph</h2><a name="5"></a><p> This describes a particular image of a character from a QRenderedFont -for example, the letter 'A' at 10 points in Times New Roman, bold italic,anti-aliased. It contains pointers to a QGlyphMetrics structure withinformation about the character and to the raw data for the glyph -this is either a 1-bit mask or an 8-bit alpha channel. Each QRenderedFontcreates these on demand and caches them once created (note that this isnot currently implemented for TrueType fonts). <p> You would only need to modify this class if you were, for example,modifying Qt/Embedded to support textured fonts, in which case youwould also need to modify QGfxRaster.<p> <h2> QMemoryManagerPixmap/QMemoryManager</h2><a name="6"></a><p> This handles requests for space for pixmaps and also keeps track ofQPF format fonts (these are small 'state dumps' of QRenderedFonts,typically 2-20K in size; they can be mmap'd direct from disk in orderto save memory). If a QPF font is found which matches a font requestno new QRenderedFont need be created for it. It's possible to strip outall QFontFactory support and simply use QPFs if your font needs are modest(for instance, if you only require a few fixed point sizes). Note thatno best-match loading is performed with QPFs, as opposed to thoseloaded via <a href="qfontmanager.html">QFontManager</a>, so if you don't have the correct QPF for a pointsize text in that size will simply not be displayed. <p> There should be no need to modify this class.<p> <h2> <a href="qscreen.html">QScreen</a>-->QLinuxFbScreen-->accelerated screens, QTransformedScreen-->QVfbScreen
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -