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

📄 embedclasses.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Qt Toolkit -  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: white; color: black; }--></style></head><body bgcolor="#ffffff"><p><table width="100%"><tr><td><a href="index.html"><img width="100" height="100" src="qtlogo.png"alt="Home" border="0"><img width="100"height="100" src="face.png" alt="Home" border="0"></a><td valign="top"><div align="right"><img src="dochead.png" width="472" height="27"><br><a href="classes.html"><b>Classes</b></a>- <a href="annotated.html">Annotated</a>- <a href="hierarchy.html">Tree</a>- <a href="functions.html">Functions</a>- <a href="index.html">Home</a>- <a href="topicals.html"><b>Structure</b>  <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qte</font></a></div></table><h1 align="center"> The Qt/Embedded-specific classes</h1><br clear="all"><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 src/kernel and are suffixed _qws. -> indicates inheritance.<p>Client classes:<p>QFontManager  There is one of these per application. At application startup timeit reads the font definition file from $QTDIR/etc/fonts/fontdir(or /usr/local/etc/qt-embedded/fonts/fontdir if QTDIR is undefined). It keepstrack of all font information and holds a cache of rendered fonts.It also creates the font factories - QFontManager::QFontManager is the placeto add constructors for new factories. It provides a high-level interfaceto requesting a particular font and calls QFontFactories to load fontsfrom disk on demand. Note that this only applies to BDF and Truetype fonts;Qt/Embedded's optimised .qpf font file format bypasses the QFontManagermechanism altogether.<p>QDiskFont  This contains information about a single on-disk font file (e.g./usr/local/etc/qt-embedded/times.ttf, would be an example). It holds the file path, information about whether the font is scalable, its weight, size andQt/Embedded name and so on. This information is used so that QFontManagercan find the closest match disk font (it uses a scoring mechanismweighted towards matching names, then whether the font's italic, thenweight)<p>QRenderedFontThere is one and only one QRenderedFont for every unique font currentlyloaded by the system (that is, each unique combination of name,size, weight, italic or not, anti-aliased or not)QRenderedFonts are reference counted; once noone is using the QRenderedFontit is deleted along with its cache of glyph bitmaps. The QDiskFontit was loaded from remains opened by its QFontFactory however.<p>QFontFactory (and descendants QFontFactoryBDF,QFontFactoryTtf)These provide support for particular font formats, for instance thescalable Truetype and Type1 formats (both supported in QFontFactoryTtf,which uses Freetype 2) and the bitmap BDF format used by X.It's called to open an on-disk font; once a font is opened it remainsopened, for quickness in creating new font instances from the disk font.It can also create a QRenderedFont and convert from unicode valuesto an index into the font file - glyphs are stored in the order and indexes they are defined in the font rather than in unicode order for compactness.<p>QGlyphThis 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>QMemoryManagerPixmap/QMemoryManagerThis 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 usage). 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 QFontManager, so if you don't have the correct QPF for a pointsize text in that size will simply not be displayed.<p>QScreen -> QLinuxFbScreen -> accelerated screens, QTransformedScreen        -> QVfbScreen<p>These encapsulate the framebuffer Qt/Embedded is drawing to, providesupport for mapping of coordinates for rotating framebuffers, allowmanipulation of the colour palette and provide access to offscreengraphics memory for devices with separate framebuffer memories.This is used for cacheing pixmaps and allowing accelerated pixmap->screenblt's. QLinuxFbScreen and the accelerated screens use the Linux /dev/fbinterface to get access to graphics memory and information about thecharacteristics of the device. The framebuffer device to open is specifiedby QWS_DISPLAY. Only QTransformedScreen implements the support for rotatedframebuffers. QVfbScreen provides an X window containing an emulatedframebuffer (a chunk of shared memory is set aside as the 'framebuffer'and blt'd into the X window) - this is intended as a debugging deviceallowing users to debug their applications under Qt/Embedded without leaving X. The accelerated screen drivers check to see if they can drive thedevice specified by QWS_CARD_SLOT (which defaults to the usual positionof an AGP slot if not specified) and mmap its on-chip registers from/dev/mem. They may also do chip-specific setup (initialising registers toknown values and so on). Finally, QScreen's are used to create newQScreenCursors and QGfxes.<p>QScreenCursor -> accelerated cursor              -> QVfbCursorThis handles drawing the on-screen mouse cursor, saving and restoringthe screen under it for the non-accelerated cursor types.<p>QGfx -> RasterBase -> Raster -> accelerated driver                             -> QGfxVfb                             -> QGfxTransformedRasterThis class encapsulates drawing operations, a little like a low-levelQPainter. QGfxRaster and its descendants are specifically intendedfor drawing into a raw framebuffer. They can take an offset for drawingoperations and a clipping region in order to support drawing into windows.<p>QLock, QLockHolderThis encapsulates a System V semaphore, used for synchronising accessto memory shared between Qt/Embedded clients. QLockHolder is a utility classto make managing and destroying QLocks easier.<p>QDirectPainterThis is a QPainter which also gives you a pointer to the framebufferof the window it's pointing to, the window's clip region and so on.It's intended to easily allow you to do your own pixel-level manipulationof window contents<p>QWSSoundServer,ClientThe Qt/Embedded server contains a simple sound player and mixer. Clientscan request the server play sounds specified as files.<p>QWSWindowThis contains the server's notion of an individual top level window -the region of the framebuffer it's allocated, the client that created itand so forth<p>QWSKeyboardHandler->subtypesThis handles keyboard/button input. QWSKeyboardHandler is subclassedto provide for reading /dev/tty, an arbitrary low-level USB event device(for USB keyboards) and some PDA button devices.<p>QWSMouseHandler->QCalibratedMouseHandler->mouse types               ->mouse typesThis handles mouse/touchpanel input. Descendants of QCalibratedMouseHandlermake use of filtering code which pretends 'jittering' of the pointer ontouchscreens; some embedded devices do this filtering in the kernel inwhich case the driver doesn't need to inherit from QCalibratedMouseHandler.<p>QWSDisplayThis class exists only in the Qt/Embedded server and keeps track ofall the top-level windows in the system, as well as the keyboard and mouse.<p>QWSServer This manages the Qt/Embedded server's Unix-domain socket connections toclients. It sends and receives QWS protocol events and calls QWSDisplayin order to do such things as change the allocation region of windows.<p>QWSClientThis encapsulates the client side of a Qt/Embedded connection and canmarshal and demarshal events.<p>QWSDisplayDataThis manages a client's QWSClient, reading and interpreting eventsfrom the QWS server. It connects to the QWS server on application startup,getting information about the framebuffer and creating the memory manager.Other information about the framebuffer comes directly from /dev/fbin QLinuxFbScreen.<p>QWSCommandsThese encapsulate the data sent to and from the QWS server<p>QCopChannelQCop is a simple IPC mechanism for communication between Qt/Embeddedapplications. String messages with optional binary data can be sentto different channels.<p>QWSManagerThis provides Qt/Embedded window management, drawing a title barand handling user requests to move, resize the window and so on.<p>QWSDecorationDescendants of this class are different styles for the Qt/Embeddedwindow manager, for instance QWSWindowsDecoration draws Qt/Embeddedwindow frames in the style of Windows CE.<p>QWSPropertyManagerThis provides the QWS client's interface to the QWS property system(a simpler version of the X property system, it allows you to attacharbitrary data to top-level windows, keyed by an integer)<p>QWSRegionManagerUsed by both client and server to help manage top-level window regions<p>QWSSocket, QWSServerSocketProvide Unix-domain sockets<p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright 

⌨️ 快捷键说明

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