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/doc/embclasses.doc:36 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>The Qt/Embedded-specific classes</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>The Qt/Embedded-specific classes</h1>
|
---|
33 |
|
---|
34 |
|
---|
35 |
|
---|
36 | <p> Qt/Embedded classes fall into two groups: the majority are used by
|
---|
37 | every Qt/Embedded program, and some are used only by the Qt/Embedded server.
|
---|
38 | The Qt/Embedded server program can also be a client, as in the case of a
|
---|
39 | single-process installation. All Qt/Embedded specific source files live
|
---|
40 | in <tt>src/kernel</tt> and are suffixed <tt>_qws</tt>. The » symbol
|
---|
41 | indicates inheritance.
|
---|
42 | <p> <!-- toc -->
|
---|
43 | <ul>
|
---|
44 | <li><a href="#1"> QFontManager
|
---|
45 | </a>
|
---|
46 | <li><a href="#2"> QDiskFont
|
---|
47 | </a>
|
---|
48 | <li><a href="#3"> QRenderedFont
|
---|
49 | </a>
|
---|
50 | <li><a href="#4"> QFontFactory (and descendants QFontFactoryBDF, QFontFactoryTtf)
|
---|
51 | </a>
|
---|
52 | <li><a href="#5"> QGlyph
|
---|
53 | </a>
|
---|
54 | <li><a href="#6"> QMemoryManagerPixmap/QMemoryManager
|
---|
55 | </a>
|
---|
56 | <li><a href="#7"> QScreen » QLinuxFbScreen » accelerated screens, QTransformedScreen » QVfbScreen
|
---|
57 | </a>
|
---|
58 | <li><a href="#8"> QScreenCursor » accelerated cursor » QVfbCursor
|
---|
59 | </a>
|
---|
60 | <li><a href="#9"> QGfx » RasterBase » Raster » accelerated driver » QGfxVfb » QGfxTransformedRaster
|
---|
61 | </a>
|
---|
62 | <li><a href="#10"> QLock, QLockHolder
|
---|
63 | </a>
|
---|
64 | <li><a href="#11"> QDirectPainter
|
---|
65 | </a>
|
---|
66 | <li><a href="#12"> QWSSoundServer, Client
|
---|
67 | </a>
|
---|
68 | <li><a href="#13"> QWSWindow
|
---|
69 | </a>
|
---|
70 | <li><a href="#14"> QWSKeyboardHandler » subtypes
|
---|
71 | </a>
|
---|
72 | <li><a href="#15"> QWSMouseHandler » QWSCalibratedMouseHandler » mouse types
|
---|
73 | </a>
|
---|
74 | <li><a href="#16"> QWSDisplay
|
---|
75 | </a>
|
---|
76 | <li><a href="#17"> QWSServer
|
---|
77 | </a>
|
---|
78 | <li><a href="#18"> QWSClient
|
---|
79 | </a>
|
---|
80 | <li><a href="#19"> QWSDisplayData
|
---|
81 | </a>
|
---|
82 | <li><a href="#20"> QWSCommands
|
---|
83 | </a>
|
---|
84 | <li><a href="#21"> QCopChannel
|
---|
85 | </a>
|
---|
86 | <li><a href="#22"> QWSManager
|
---|
87 | </a>
|
---|
88 | <li><a href="#23"> QWSDecoration
|
---|
89 | </a>
|
---|
90 | <li><a href="#24"> QWSPropertyManager
|
---|
91 | </a>
|
---|
92 | <li><a href="#25"> QWSRegionManager
|
---|
93 | </a>
|
---|
94 | <li><a href="#26"> QWSSocket, QWSServerSocket
|
---|
95 | </a>
|
---|
96 | </ul>
|
---|
97 | <!-- endtoc -->
|
---|
98 |
|
---|
99 | <p> <h2> <a href="qfontmanager.html">QFontManager</a>
|
---|
100 | </h2>
|
---|
101 | <a name="1"></a><p> There is one of these per application. At application startup time it
|
---|
102 | reads 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). It
|
---|
103 | keeps track of all font information and maintains a cache of rendered
|
---|
104 | fonts. It also creates the font factories: QFontManager::QFontManager
|
---|
105 | is the place to add constructors for new factories. It provides a
|
---|
106 | high-level interface for requesting a particular font and calls
|
---|
107 | QFontFactories to load fonts from disk on demand. Note that this only
|
---|
108 | applies to BDF and TrueType fonts; Qt/Embedded's optimised <tt>.qpf</tt>
|
---|
109 | font file format bypasses the QFontManager mechanism altogether.
|
---|
110 | <p> There should be no need to modify this class unless you wish to change
|
---|
111 | font matching or caching behaviour.
|
---|
112 | <p> <h2> QDiskFont
|
---|
113 | </h2>
|
---|
114 | <a name="2"></a><p> This contains information about a single on-disk font file (e.g.
|
---|
115 | <tt>/usr/local/etc/qt-embedded/times.ttf</tt>). It holds the file path,
|
---|
116 | information about whether the font is scalable, its weight, size,
|
---|
117 | Qt/Embedded name, etc. This information is used so that <a href="qfontmanager.html">QFontManager</a>
|
---|
118 | can find the closest matching disk font (it uses a scoring mechanism
|
---|
119 | weighted towards matching names, then whether the font's italic, then
|
---|
120 | its weight).
|
---|
121 | <p> There should be no reason to modify this class.
|
---|
122 | <p> <h2> QRenderedFont
|
---|
123 | </h2>
|
---|
124 | <a name="3"></a><p> There is one and only one QRenderedFont for every unique font
|
---|
125 | currently loaded by the system (that is, each unique combination of
|
---|
126 | name, size, weight, italic or not, anti-aliased or not).
|
---|
127 | QRenderedFonts are reference counted; once no one is using the
|
---|
128 | QRenderedFont it is deleted along with its cache of glyph bitmaps. The
|
---|
129 | QDiskFont it was loaded from remains opened by its QFontFactory.
|
---|
130 | <p> There should be no reason to modify this class, unless you wish to
|
---|
131 | change the way in which glyphs are cached.
|
---|
132 | <p> <h2> QFontFactory (and descendants QFontFactoryBDF, QFontFactoryTtf)
|
---|
133 | </h2>
|
---|
134 | <a name="4"></a><p> These provide support for particular font formats, for instance the
|
---|
135 | scalable Truetype and Type1 formats (both supported in
|
---|
136 | QFontFactoryTtf, which uses Freetype 2) and the bitmap BDF format used
|
---|
137 | by X. It's called to open an on-disk font; once a font is opened it
|
---|
138 | remains opened so that the creation of new font instances from the
|
---|
139 | disk font is fast. It can also create a QRenderedFont and convert from
|
---|
140 | Unicode values to an index into the font file. For compactness, glyphs
|
---|
141 | are stored in the order and indexes they are defined in the font
|
---|
142 | rather than in Unicode order.
|
---|
143 | <p> There should be no need to modify this class, but it should be
|
---|
144 | inherited if you wish to add a different type of font renderer (e.g.
|
---|
145 | for a custom vector font format).
|
---|
146 | <p> <h2> QGlyph
|
---|
147 | </h2>
|
---|
148 | <a name="5"></a><p> This describes a particular image of a character from a QRenderedFont:
|
---|
149 | for example, the letter 'A' at 10 points in Times New Roman, bold italic,
|
---|
150 | anti-aliased. It contains pointers to a QGlyphMetrics structure with
|
---|
151 | information about the character and to the raw data for the glyph:
|
---|
152 | this is either a 1-bit mask or an 8-bit alpha channel. Each QRenderedFont
|
---|
153 | creates these on demand and caches them once created (note that this is
|
---|
154 | not currently implemented for TrueType fonts).
|
---|
155 | <p> You would only need to modify this class if you were, for example,
|
---|
156 | modifying Qt/Embedded to support textured fonts, in which case you
|
---|
157 | would also need to modify QGfxRaster.
|
---|
158 | <p> <h2> QMemoryManagerPixmap/QMemoryManager
|
---|
159 | </h2>
|
---|
160 | <a name="6"></a><p> This handles requests for space for pixmaps and also keeps track of
|
---|
161 | QPF format fonts (these are small 'state dumps' of QRenderedFonts,
|
---|
162 | typically 2-20KB in size; they can be mmap'd direct from disk in order
|
---|
163 | to save memory). If a QPF font is found which matches a font request
|
---|
164 | no new QRenderedFont need be created for it. It's possible to strip out
|
---|
165 | all QFontFactory support and simply use QPFs if your font needs are modest
|
---|
166 | (for instance, if you only require a few fixed point sizes). Note that
|
---|
167 | no best-match loading is performed with QPFs, as opposed to those
|
---|
168 | loaded via <a href="qfontmanager.html">QFontManager</a>, so if you don't have the correct QPF for a point
|
---|
169 | size, text in that size will simply not be displayed.
|
---|
170 | <p> There should be no need to modify this class.
|
---|
171 | <p> <h2> <a href="qscreen.html">QScreen</a> » QLinuxFbScreen » accelerated screens, QTransformedScreen » QVfbScreen
|
---|
172 | </h2>
|
---|
173 | <a name="7"></a><p> These encapsulate the framebuffer Qt/Embedded is drawing to, provide
|
---|
174 | support for mapping of coordinates for rotating framebuffers, allow
|
---|
175 | manipulation of the colour palette and provide access to offscreen
|
---|
176 | graphics memory for devices with separate framebuffer memories.
|
---|
177 | <p> This is used for caching pixmaps and allowing accelerated pixmap=>screen
|
---|
178 | blt's. QLinuxFbScreen and the accelerated screens use the Linux <tt>/dev/fb</tt>
|
---|
179 | interface to get access to graphics memory and information about the
|
---|
180 | characteristics of the device. The framebuffer device to open is specified
|
---|
181 | by QWS_DISPLAY. Only QTransformedScreen implements the support for rotated
|
---|
182 | framebuffers. QVfbScreen provides an X window containing an emulated
|
---|
183 | framebuffer (a chunk of shared memory is set aside as the 'framebuffer'
|
---|
184 | and blt'd into the X window): this is intended as a debugging device
|
---|
185 | allowing users to debug their applications under Qt/Embedded without leaving
|
---|
186 | X. The accelerated screen drivers check to see if they can drive the
|
---|
187 | device specified by QWS_CARD_SLOT (which defaults to the usual position
|
---|
188 | of an AGP slot if not specified) and mmap its on-chip registers from
|
---|
189 | <tt>/dev/mem</tt>. They may also do chip-specific setup (initialising registers to
|
---|
190 | known values and so on). Finally, <a href="qscreen.html">QScreen</a>'s are used to create new
|
---|
191 | QScreenCursors and QGfxes.
|
---|
192 | <p> If you wish to modify the way pixmaps are allocated in memory,
|
---|
193 | subclass or modify QLinuxFbScreen. If you're writing an accelerated
|
---|
194 | driver you will need to subclass QScreen or QLinuxFbScreen.
|
---|
195 | <p> <h2> QScreenCursor » accelerated cursor » QVfbCursor
|
---|
196 | </h2>
|
---|
197 | <a name="8"></a><p> This handles drawing the on-screen mouse cursor, and saving and
|
---|
198 | restoring the screen under it for the non-accelerated cursor types.
|
---|
199 | <p> Subclassing QScreenCursor is optional in an accelerated driver (you
|
---|
200 | would only want to do so if the hardware supports a hardware cursor).
|
---|
201 | <p> <h2> QGfx » RasterBase » Raster » accelerated driver » QGfxVfb » QGfxTransformedRaster
|
---|
202 | </h2>
|
---|
203 | <a name="9"></a><p> This class encapsulates drawing operations, a little like a low-level
|
---|
204 | <a href="qpainter.html">QPainter</a>. QGfxRaster and its descendants are specifically intended
|
---|
205 | for drawing into a raw framebuffer. They can take an offset for drawing
|
---|
206 | operations and a clipping region in order to support drawing into windows.
|
---|
207 | You will need to subclass the QGfxRaster template in order to implement
|
---|
208 | an accelerated driver.
|
---|
209 | <p> If you're brave, modifying QGfxRaster would allow you to customise how
|
---|
210 | drawing is done or add support for a new bit depth/pixel format.
|
---|
211 | <p> <h2> QLock, QLockHolder
|
---|
212 | </h2>
|
---|
213 | <a name="10"></a><p> This encapsulates a System V semaphore, used for synchronising access
|
---|
214 | to memory shared between Qt/Embedded clients. QLockHolder is a utility class
|
---|
215 | to make managing and destroying QLocks easier.
|
---|
216 | <p> There should be no need to modify this class unless porting
|
---|
217 | Qt/Embedded to an operating system without System V IPC.
|
---|
218 | <p> <h2> <a href="qdirectpainter.html">QDirectPainter</a>
|
---|
219 | </h2>
|
---|
220 | <a name="11"></a><p> This is a QPainter which also gives you a pointer to the framebuffer
|
---|
221 | of the window it's pointing to, the window's clip region and so on.
|
---|
222 | It's intended to easily allow you to do your own pixel-level manipulation
|
---|
223 | of window contents.
|
---|
224 | <p> There should be no reason to modify this class.
|
---|
225 | <p> <h2> QWSSoundServer, Client
|
---|
226 | </h2>
|
---|
227 | <a name="12"></a><p> The Qt/Embedded server contains a simple sound player and mixer. Clients
|
---|
228 | can request the server play sounds specified as files.
|
---|
229 | <p> There should be no need to modify this class unless porting
|
---|
230 | Qt/Embedded to an operating system without a Linux-style <tt>/dev/dsp</tt>.
|
---|
231 | <p> <h2> <a href="qwswindow.html">QWSWindow</a>
|
---|
232 | </h2>
|
---|
233 | <a name="13"></a><p> This contains the server's notion of an individual top level window:
|
---|
234 | the region of the framebuffer it's allocated, the client that created it
|
---|
235 | and so forth.
|
---|
236 | <p> There should be no reason to modify this class.
|
---|
237 | <p> <h2> <a href="qwskeyboardhandler.html">QWSKeyboardHandler</a> » subtypes
|
---|
238 | </h2>
|
---|
239 | <a name="14"></a><p> This handles keyboard/button input. QWSKeyboardHandler is subclassed
|
---|
240 | to provide for reading <tt>/dev/tty</tt>, an arbitrary low-level USB event device
|
---|
241 | (for USB keyboards) and some PDA button devices.
|
---|
242 | <p> Modifying QWSKeyboardHandler would allow you to support different
|
---|
243 | types of keyboard (currently only a fairly standard US PC style
|
---|
244 | keyboard is supported); subclassing it is the preferred way to handle
|
---|
245 | non-pointer input devices.
|
---|
246 | <p> <h2> <a href="qwsmousehandler.html">QWSMouseHandler</a> » QWSCalibratedMouseHandler » mouse types
|
---|
247 | </h2>
|
---|
248 | <a name="15"></a><p> This handles mouse/touch-panel input. Descendants of QWSCalibratedMouseHandler
|
---|
249 | make use of filtering code which prevents 'jittering' of the pointer on
|
---|
250 | touchscreens; some embedded devices do this filtering in the kernel in
|
---|
251 | which case the driver doesn't need to inherit from QWSCalibratedMouseHandler.
|
---|
252 | <p> Subclassing QWSCalibratedMouseHandler is preferred for touch-panels without
|
---|
253 | kernel filtering; inheriting QWSMouseHandler is the way to add any other
|
---|
254 | type of pointing device (pen tablets, touchscreens, mice, trackballs
|
---|
255 | and so forth).
|
---|
256 | <p> <h2> QWSDisplay
|
---|
257 | </h2>
|
---|
258 | <a name="16"></a><p> This class exists only in the Qt/Embedded server and keeps track of
|
---|
259 | all the top-level windows in the system, as well as the keyboard and mouse.
|
---|
260 | <p> You would only want to modify this if making deep and drastic
|
---|
261 | modifications to Qt/Embedded window behaviour (alpha blended windows
|
---|
262 | for example).
|
---|
263 | <p> <h2> <a href="qwsserver.html">QWSServer</a>
|
---|
264 | </h2>
|
---|
265 | <a name="17"></a><p> This manages the Qt/Embedded server's Unix-domain socket connections to
|
---|
266 | clients. It sends and receives QWS protocol events and calls QWSDisplay
|
---|
267 | in order to do such things as change the allocation region of windows.
|
---|
268 | <p> The only reason to modify this would be to use something other than
|
---|
269 | some sort of socket-like mechanism to communicate between Qt/Embedded
|
---|
270 | applications (in which case modify QWSClient too). If you have
|
---|
271 | something like Unix domain sockets, modify QWSSocket/QWSServerSocket
|
---|
272 | instead. Don't add extra QWS events to communicate between
|
---|
273 | applications, use QCOP instead.
|
---|
274 | <p> <h2> QWSClient
|
---|
275 | </h2>
|
---|
276 | <a name="18"></a><p> This encapsulates the client side of a Qt/Embedded connection and can
|
---|
277 | marshal and demarshal events.
|
---|
278 | <p> There should be no reason to modify this except to use something
|
---|
279 | radically different from Unix domain sockets to communicate between
|
---|
280 | Qt/Embedded applications.
|
---|
281 | <p> <h2> QWSDisplayData
|
---|
282 | </h2>
|
---|
283 | <a name="19"></a><p> This manages a client's QWSClient, reading and interpreting events
|
---|
284 | from the QWS server. It connects to the QWS server on application
|
---|
285 | startup, getting information about the framebuffer and creating the
|
---|
286 | memory manager. Other information about the framebuffer comes directly
|
---|
287 | from <tt>/dev/fb</tt> in QLinuxFbScreen.
|
---|
288 | <p> There should be no reason to modify this.
|
---|
289 | <p> <h2> QWSCommands
|
---|
290 | </h2>
|
---|
291 | <a name="20"></a><p> These encapsulate the data sent to and from the QWS server.
|
---|
292 | <p> There should be no reason to modify them.
|
---|
293 | <p> <h2> <a href="qcopchannel.html">QCopChannel</a>
|
---|
294 | </h2>
|
---|
295 | <a name="21"></a><p> QCop is a simple IPC mechanism for communication between Qt/Embedded
|
---|
296 | applications. String messages with optional binary data can be sent
|
---|
297 | to different channels.
|
---|
298 | <p> The mechanism itself is designed to be bare-bones in order for users
|
---|
299 | to build whatever mechanism they like on top of it.
|
---|
300 | <p> <h2> QWSManager
|
---|
301 | </h2>
|
---|
302 | <a name="22"></a><p> This provides Qt/Embedded window management, drawing a title bar
|
---|
303 | and handling user requests to move, resize the window and so on.
|
---|
304 | <p> There should be no reason to modify it but you should subclass it
|
---|
305 | if you want to modify window behaviour (point to click versus
|
---|
306 | focus follows mouse, for instance).
|
---|
307 | <p> <h2> <a href="qwsdecoration.html">QWSDecoration</a>
|
---|
308 | </h2>
|
---|
309 | <a name="23"></a><p> Descendants of this class are different styles for the Qt/Embedded
|
---|
310 | window manager, for instance QWSWindowsDecoration draws Qt/Embedded
|
---|
311 | window frames in the style of Windows CE.
|
---|
312 | <p> Subclass it in order to provide a new window manager appearance (the
|
---|
313 | equivalent of a Windows XP or Enlightenment theme).
|
---|
314 | <p> <h2> QWSPropertyManager
|
---|
315 | </h2>
|
---|
316 | <a name="24"></a><p> This provides the QWS client's interface to the QWS property system
|
---|
317 | (a simpler version of the X property system, it allows you to attach
|
---|
318 | arbitrary data to top-level windows, keyed by an integer).
|
---|
319 | <p> There should be no reason to modify it.
|
---|
320 | <p> <h2> QWSRegionManager
|
---|
321 | </h2>
|
---|
322 | <a name="25"></a><p> Used by both client and server to help manage top-level window regions.
|
---|
323 | <p> There should be no reason to modify it.
|
---|
324 | <p> <h2> QWSSocket, QWSServerSocket
|
---|
325 | </h2>
|
---|
326 | <a name="26"></a><p> Provides Unix-domain sockets.
|
---|
327 | <p> Modify this if you're porting to a non-Unix OS but have something
|
---|
328 | analogous to Unix-domain sockets (a byte-oriented, reliable, ordered
|
---|
329 | transmission mechanism, although you can probably implement it with
|
---|
330 | something like a message queue as well).
|
---|
331 | <p>
|
---|
332 | <!-- eof -->
|
---|
333 | <p><address><hr><div align=center>
|
---|
334 | <table width=100% cellspacing=0 border=0><tr>
|
---|
335 | <td>Copyright © 2007
|
---|
336 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
337 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
338 | </table></div></address></body>
|
---|
339 | </html>
|
---|