File: qtextstream.html

package info (click to toggle)
qt1g 1%3A1.45-1.1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 17,436 kB
  • ctags: 20,174
  • sloc: cpp: 89,153; yacc: 1,273; ansic: 692; makefile: 479; lex: 326; sh: 150; perl: 94
file content (316 lines) | stat: -rw-r--r-- 22,973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta name="robots" content="noindex,noarchive">
<title>Qt Toolkit - QTextStream Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 15%; text-indent: -15%; }
a:link { text-decoration: none; }
--></style>
</head><body bgcolor="#ffffff">

<a href=index.html><img width=122 height=65 src=qtlogo.jpg alt="Qt logo" align=left border=0></a>
<center><img src=dochead.gif width=472 height=27></center>
<br clear=all>

<h1 align=center>QTextStream Class Reference</h1><br clear="all">
<p>
The QTextStream class provides basic functions for reading and writing text using a <a href="qiodevice.html">QIODevice</a>.
<a href="#details">More...</a>
<p>
<code>#include &lt;<a href="qtextstream-h.html">qtextstream.h</a>&gt;</code>
<p><a href="qtextstream-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><span class="fn"><a href="qtextstream.html#a0"><strong>QTextStream</strong></a>()</span>
<li><span class="fn"><a href="qtextstream.html#a1"><strong>QTextStream</strong></a>(QIODevice*)</span>
<li><span class="fn"><a href="qtextstream.html#a2"><strong>QTextStream</strong></a>(QByteArray, intmode)</span>
<li><span class="fn"><a href="qtextstream.html#a3"><strong>QTextStream</strong></a>(FILE*, intmode)</span>
<li><span class="fn">virtual<a href="qtextstream.html#a4"><strong>~QTextStream</strong></a>()</span>
<li><span class="fn">QIODevice*<a href="qtextstream.html#a5"><strong>device</strong></a>()const</span>
<li><span class="fn">void<a href="qtextstream.html#a6"><strong>setDevice</strong></a>(QIODevice*)</span>
<li><span class="fn">void<a href="qtextstream.html#a7"><strong>unsetDevice</strong></a>()</span>
<li><span class="fn">bool<a href="qtextstream.html#a8"><strong>eof</strong></a>()const</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#a9"><strong>operator&gt;&gt;</strong></a>(char&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b0"><strong>operator&gt;&gt;</strong></a>(signedshort&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b1"><strong>operator&gt;&gt;</strong></a>(unsignedshort&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b2"><strong>operator&gt;&gt;</strong></a>(signedint&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b3"><strong>operator&gt;&gt;</strong></a>(unsignedint&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b4"><strong>operator&gt;&gt;</strong></a>(signedlong&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b5"><strong>operator&gt;&gt;</strong></a>(unsignedlong&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b6"><strong>operator&gt;&gt;</strong></a>(float&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b7"><strong>operator&gt;&gt;</strong></a>(double&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b8"><strong>operator&gt;&gt;</strong></a>(char*)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#b9"><strong>operator&gt;&gt;</strong></a>(QString&amp;)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c0"><strong>operator&lt;&lt;</strong></a>(char)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c1"><strong>operator&lt;&lt;</strong></a>(signedshort)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c2"><strong>operator&lt;&lt;</strong></a>(unsignedshort)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c3"><strong>operator&lt;&lt;</strong></a>(signedint)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c4"><strong>operator&lt;&lt;</strong></a>(unsignedint)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c5"><strong>operator&lt;&lt;</strong></a>(signedlong)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c6"><strong>operator&lt;&lt;</strong></a>(unsignedlong)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c7"><strong>operator&lt;&lt;</strong></a>(float)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c8"><strong>operator&lt;&lt;</strong></a>(double)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#c9"><strong>operator&lt;&lt;</strong></a>(constchar*)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#d0"><strong>operator&lt;&lt;</strong></a>(void*)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#d1"><strong>readRawBytes</strong></a>(char*, uintlen)</span>
<li><span class="fn">QTextStream&amp;<a href="qtextstream.html#d2"><strong>writeRawBytes</strong></a>(constchar*, uintlen)</span>
<li><span class="fn">QString<a href="qtextstream.html#d3"><strong>readLine</strong></a>()</span>
<li><span class="fn">enum{skipws=0x0001, left=0x0002, right=0x0004, internal=0x0008, bin=0x0010, oct=0x0020, dec=0x0040, hex=0x0080, showbase=0x0100, showpoint=0x0200, uppercase=0x0400, showpos=0x0800, scientific=0x1000, fixed=0x2000}</span>
<li><span class="fn">int<a href="qtextstream.html#d4"><strong>flags</strong></a>()const</span>
<li><span class="fn">int<a href="qtextstream.html#d5"><strong>flags</strong></a>(intf)</span>
<li><span class="fn">int<a href="qtextstream.html#d6"><strong>setf</strong></a>(intbits)</span>
<li><span class="fn">int<a href="qtextstream.html#d7"><strong>setf</strong></a>(intbits, intmask)</span>
<li><span class="fn">int<a href="qtextstream.html#d8"><strong>unsetf</strong></a>(intbits)</span>
<li><span class="fn">void<a href="qtextstream.html#d9"><strong>reset</strong></a>()</span>
<li><span class="fn">int<a href="qtextstream.html#e0"><strong>width</strong></a>()const</span>
<li><span class="fn">int<a href="qtextstream.html#e1"><strong>width</strong></a>(int)</span>
<li><span class="fn">int<a href="qtextstream.html#e2"><strong>fill</strong></a>()const</span>
<li><span class="fn">int<a href="qtextstream.html#e3"><strong>fill</strong></a>(int)</span>
<li><span class="fn">int<a href="qtextstream.html#e4"><strong>precision</strong></a>()const</span>
<li><span class="fn">int<a href="qtextstream.html#e5"><strong>precision</strong></a>(int)</span>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QTextStream class provides basic functions for reading and writing text using a <a href="qiodevice.html">QIODevice</a>.
<p>
The text stream class has a functional interface that is very
similar to that of the standard C++ iostream class.  The difference
between iostream and QTextStream is that our stream operates on a
QIODevice, which is easily subclassed, while iostream operates on
FILE * pointers, which can not be subclassed.
<p>Qt provides several global functions similar to the ones in iostream:
<ul>
<li> <code>bin</code> sets the QTextStream to output binary numbers
<li> <code>oct</code> sets the QTextStream to output octal numbers
<li> <code>dec</code> sets the QTextStream to output decimal numbers
<li> <code>hex</code> sets the QTextStream to output hexadecimal numbers
<li> <code>endl</code> forces a line break
<li> <code>flush</code> forces the QIODevice to flush any buffered data
<li> <code>ws</code> eats any available white space (on input)
<li> <code>reset</code> resets the QTextStream to its default mode (see <a href="qtextstream.html#d9">reset</a>()).
</ul>
<p>The QTextStream class reads and writes ASCII text and it is not
appropriate for dealing with binary data (but <a href="qdatastream.html">QDataStream</a> is).
<p>See also:  <a href="qdatastream.html">QDataStream</a>.
<p>Examples:
 <a href="grapher-grapher-cpp.html#ws">grapher/grapher.cpp</a>
 <a href="application-application-cpp.html#QTextStream">application/application.cpp</a>

<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="a0"></a>QTextStream::QTextStream()</h3>
<p>Constructs a data stream that has no IO device.
<h3 class="fn"><a name="a2"></a>QTextStream::QTextStream(<a href="qbytearray.html">QByteArray</a>a, intmode)</h3>
<p>Constructs a text stream that operates on a byte array throught an
internal <a href="qbuffer.html">QBuffer</a> device.
<p>Example:
<pre>    <a href="qstring.html">QString</a> str;
    <a href="qtextstream.html">QTextStream</a> ts( str, IO_WriteOnly );
    ts &lt;&lt; "pi = " &lt;&lt; 3.14;                      // str == "pi = 3.14"
</pre>
<p>Writing data to the text stream will modify the contents of the string.
The string will be expanded when data is written beyond the end of the
string.
<p>Same example, using a QBuffer:
<pre>    <a href="qstring.html">QString</a> str;
    <a href="qbuffer.html">QBuffer</a> buf( str );
    buf.<a href="qbuffer.html#a5">open</a>( IO_WriteOnly );
    <a href="qtextstream.html">QTextStream</a> ts( &amp;buf );
    ts &lt;&lt; "pi = " &lt;&lt; 3.14;                      // str == "pi = 3.14"
    buf.<a href="qbuffer.html#a6">close</a>();
</pre>
<p>Note that QStrings created in this way will not have NUL terminators.
So unless you are using the string purely as an array of bytes, you
should terminate them:
<pre>    <a href="qstring.html">QString</a> str;
    ...
    ts &lt;&lt; "pi = " &lt;&lt; 3.14;                      // str == "pi = 3.14"
    ts &lt;&lt; '\0';
</pre>
<h3 class="fn"><a name="a1"></a>QTextStream::QTextStream(<a href="qiodevice.html">QIODevice</a>*d)</h3>
<p>Constructs a text stream that uses the IO device <em>d.</em>
<h3 class="fn"><a name="a3"></a>QTextStream::QTextStream(FILE*fh, intmode)</h3>
<p>Constructs a text stream that operates on an existing file handle <em>fh</em>
throught an internal <a href="qfile.html">QFile</a> device.
<p>Example:
<pre>    <a href="qtextstream.html">QTextStream</a> cout( stdout, IO_WriteOnly );
    <a href="qtextstream.html">QTextStream</a> cin ( stdin,  IO_ReadOnly );
    <a href="qtextstream.html">QTextStream</a> cerr( stderr, IO_WriteOnly );
</pre>
<h3 class="fn"><a name="a4"></a>QTextStream::~QTextStream() <code>[virtual]</code></h3>
<p>Destroys the text stream.
<p>The destructor will not affect the current IO device.
<h3 class="fn"><a href="qiodevice.html">QIODevice</a>*<a name="a5"></a>QTextStream::device()const</h3>
<p>Returns the IO device currently set.
<p>See also:  <a href="qtextstream.html#a6">setDevice</a>() and <a href="qtextstream.html#a7">unsetDevice</a>().
<h3 class="fn">bool<a name="a8"></a>QTextStream::eof()const</h3>
<p>Returns TRUE if the IO device has reached the end position (end of
stream or file) or if there is no IO device set.
<p>Returns FALSE if the current position of the read/write head of the IO
device is somewhere before the end position.
<p>See also:  <a href="qiodevice.html#c6">QIODevice::atEnd</a>().
<p>Examples:
 <a href="grapher-grapher-cpp.html#eof">grapher/grapher.cpp</a>
 <a href="application-application-cpp.html#eof">application/application.cpp</a>
<h3 class="fn">int<a name="e2"></a>QTextStream::fill()const</h3>
<p>Returns the fill character. The default value is ' ' (space).
<h3 class="fn">int<a name="e3"></a>QTextStream::fill(intf)</h3>
<p>Sets the fill character to <em>f.</em> Returns the previous fill character.
<h3 class="fn">int<a name="d4"></a>QTextStream::flags()const</h3>
<p>Returns the current stream flags. The default value is 0.
<p>The meaning of the flags are:
<ul>
<li> <em>skipws</em> - Not currently used - whitespace always skipped
<li> <em>left</em> - Numeric fields are left-aligned
<li> <em>right</em> - Not currently used (by default numerics are right aligned)
<li> <em>internal</em> - Put any padding spaces between +/- and value
<li> <em><a href="qtextstream.html">bin</a></em> - Output <em>and</em> input only in binary
<li> <em><a href="qtextstream.html">oct</a></em> - Output <em>and</em> input only in octal
<li> <em><a href="qtextstream.html">dec</a></em> - Output <em>and</em> input only in decimal
<li> <em><a href="qtextstream.html">hex</a></em> - Output <em>and</em> input only in hexadecimal
<li> <em>showbase</em> - Annotate numeric outputs with 0b, 0, or 0x if in
<em>bin, oct,</em> or <em>hex</em> format
<li> <em>showpoint</em> - Not currently used
<li> <em>uppercase</em> - Use 0B and 0X rather than 0b and 0x
<li> <em>showpos</em> - Show + for positive numeric values
<li> <em>scientific</em> - Use scientific notation for floating point values
<li> <em>fixed</em> - Use fixed-point notation for floating point values
</ul>
<p>Note that unless <em>bin, oct, dec,</em> or <em>hex</em> is set, the input base is
octal if the value starts with 0, hexadecimal if it starts with 0x, binary
if the value starts with 0b, and decimal otherwise.
<p>See also:  <a href="qtextstream.html#d6">setf</a>() and <a href="qtextstream.html#d8">unsetf</a>().
<h3 class="fn">int<a name="d5"></a>QTextStream::flags(intf)</h3>
<p>Sets the stream flags to <em>f.</em>
Returns the previous stream flags.
<p>See also:  <a href="qtextstream.html#d6">setf</a>(), <a href="qtextstream.html#d8">unsetf</a>() and <a href="qtextstream.html#d4">flags</a>().
<h3 class="fn">QTextStream&amp;<a name="c0"></a>QTextStream::operator&lt;&lt;(charc)</h3>
<p>Writes a <code>char</code> to the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="c9"></a>QTextStream::operator&lt;&lt;(constchar*s)</h3>
<p>Writes a string to the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="c8"></a>QTextStream::operator&lt;&lt;(doublef)</h3>
<p>Writes a <code>double</code> to the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="c7"></a>QTextStream::operator&lt;&lt;(floatf)</h3>
<p>Writes a <code>float</code> to the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="c3"></a>QTextStream::operator&lt;&lt;(signedinti)</h3>
<p>Writes an <code>int</code> to the stream and returns a reference to
the stream.
<h3 class="fn">QTextStream&amp;<a name="c5"></a>QTextStream::operator&lt;&lt;(signedlongi)</h3>
<p>Writes a <code>long int</code> to the stream and returns a reference to
the stream.
<h3 class="fn">QTextStream&amp;<a name="c1"></a>QTextStream::operator&lt;&lt;(signedshorti)</h3>
<p>Writes a <code>short</code> integer to the stream and returns a reference to
the stream.
<h3 class="fn">QTextStream&amp;<a name="c4"></a>QTextStream::operator&lt;&lt;(unsignedinti)</h3>
<p>Writes an <code>unsigned int</code> to the stream and returns a reference to
the stream.
<h3 class="fn">QTextStream&amp;<a name="c6"></a>QTextStream::operator&lt;&lt;(unsignedlongi)</h3>
<p>Writes an <code>unsigned long int</code> to the stream and returns a reference to
the stream.
<h3 class="fn">QTextStream&amp;<a name="c2"></a>QTextStream::operator&lt;&lt;(unsignedshorti)</h3>
<p>Writes an <code>unsigned short</code> integer to the stream and returns a reference
to the stream.
<h3 class="fn">QTextStream&amp;<a name="d0"></a>QTextStream::operator&lt;&lt;(void*ptr)</h3>
<p>Writes a pointer to the stream and returns a reference to the stream.
<p>The <em>ptr</em> is output as an unsigned long hexadecimal integer.
<h3 class="fn">QTextStream&amp;<a name="b9"></a>QTextStream::operator&gt;&gt;(<a href="qstring.html">QString</a>&amp;str)</h3>
<p>Reads a word from the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="a9"></a>QTextStream::operator&gt;&gt;(char&amp;c)</h3>
<p>Reads a <code>char</code> from the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="b8"></a>QTextStream::operator&gt;&gt;(char*s)</h3>
<p>Reads a word from the stream and returns a reference to the stream.
<h3 class="fn">QTextStream&amp;<a name="b7"></a>QTextStream::operator&gt;&gt;(double&amp;f)</h3>
<p>Reads a <code>double</code> from the stream and returns a reference to the stream.
See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b6"></a>QTextStream::operator&gt;&gt;(float&amp;f)</h3>
<p>Reads a <code>float</code> from the stream and returns a reference to the stream.
See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b2"></a>QTextStream::operator&gt;&gt;(signedint&amp;i)</h3>
<p>Reads a signed <code>int</code> from the stream and returns a reference to the
stream. See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b4"></a>QTextStream::operator&gt;&gt;(signedlong&amp;i)</h3>
<p>Reads a signed <code>long</code> int from the stream and returns a reference to the
stream. See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b0"></a>QTextStream::operator&gt;&gt;(signedshort&amp;i)</h3>
<p>Reads a signed <code>short</code> integer from the stream and returns a reference to
the stream. See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b3"></a>QTextStream::operator&gt;&gt;(unsignedint&amp;i)</h3>
<p>Reads an unsigned <code>int</code> from the stream and returns a reference to the
stream. See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b5"></a>QTextStream::operator&gt;&gt;(unsignedlong&amp;i)</h3>
<p>Reads an unsigned <code>long</code> int from the stream and returns a reference to the
stream. See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">QTextStream&amp;<a name="b1"></a>QTextStream::operator&gt;&gt;(unsignedshort&amp;i)</h3>
<p>Reads an unsigned <code>short</code> integer from the stream and returns a reference to
the stream. See <a href="qtextstream.html#d4">flags</a>() for an explanation of expected input format.
<h3 class="fn">int<a name="e4"></a>QTextStream::precision()const</h3>
<p>Returns the precision. The default value is 6.
<h3 class="fn">int<a name="e5"></a>QTextStream::precision(intp)</h3>
<p>Sets the precision to <em>p.</em> Returns the previous precision setting.
<h3 class="fn"><a href="qstring.html">QString</a><a name="d3"></a>QTextStream::readLine()</h3>
<p>Reads a line from the stream and returns a string containing the text.
<p>The returned string does not contain any trailing newline or carriage
return. Note that this is different from <a href="qiodevice.html#d0">QIODevice::readLine</a>(), which
does not strip the newline at the end of the line.
<p>See also:  <a href="qiodevice.html#d0">QIODevice::readLine</a>().
<p>Examples:
 <a href="application-application-cpp.html#readLine">application/application.cpp</a>
<h3 class="fn">QTextStream&amp;<a name="d1"></a>QTextStream::readRawBytes(char*s, uintlen)</h3>
<p>Reads <em>len</em> bytes from the stream into <em>e</em> s and returns a reference to
the stream.
<p>The buffer <em>s</em> must be preallocated.
<p>See also:  <a href="qiodevice.html#c8">QIODevice::readBlock</a>().
<h3 class="fn">void<a name="d9"></a>QTextStream::reset()</h3>
<p>Resets the text stream.
<p><ul>
<li> All flags are set to 0.
<li> The field width is set to 0.
<li> The fill character is set to ' ' (space).
<li> The precision is set to 6.
</ul>
<p>See also:  <a href="qtextstream.html#d6">setf</a>(), <a href="qtextstream.html#e0">width</a>(), <a href="qtextstream.html#e2">fill</a>() and <a href="qtextstream.html#e4">precision</a>().
<h3 class="fn">void<a name="a6"></a>QTextStream::setDevice(<a href="qiodevice.html">QIODevice</a>*d)</h3>
<p>Sets the IO device to <em>d.</em>
<p>See also:  <a href="qtextstream.html#a5">device</a>() and <a href="qtextstream.html#a7">unsetDevice</a>().
<h3 class="fn">int<a name="d6"></a>QTextStream::setf(intbits)</h3>
<p>Sets the stream flag bits <em>bits.</em>
Returns the previous stream flags.
<p>Equivalent to <code><a href="qtextstream.html#d4">flags</a>( flags() | bits )</code>.
<p>See also:  setf() and <a href="qtextstream.html#d8">unsetf</a>().
<h3 class="fn">int<a name="d7"></a>QTextStream::setf(intbits, intmask)</h3>
<p>Sets the stream flag bits <em>bits</em> with a bit mask <em>mask.</em>
Returns the previous stream flags.
<p>Equivalent to <code><a href="qtextstream.html#d4">flags</a>( (flags() & ~mask) | (bits & mask) )</code>.
<p>See also:  <a href="qtextstream.html#d6">setf</a>() and <a href="qtextstream.html#d8">unsetf</a>().
<h3 class="fn">void<a name="a7"></a>QTextStream::unsetDevice()</h3>
<p>Unsets the IO device.  Equivalent to <a href="qtextstream.html#a6">setDevice</a>( 0 ).
<p>See also:  <a href="qtextstream.html#a5">device</a>() and <a href="qtextstream.html#a6">setDevice</a>().
<h3 class="fn">int<a name="d8"></a>QTextStream::unsetf(intbits)</h3>
<p>Clears the stream flag bits <em>bits.</em>
Returns the previous stream flags.
<p>Equivalent to <code><a href="qtextstream.html#d4">flags</a>( flags() & ~mask )</code>.
<p>See also:  <a href="qtextstream.html#d6">setf</a>().
<h3 class="fn">int<a name="e0"></a>QTextStream::width()const</h3>
<p>Returns the field width. The default value is 0.
<h3 class="fn">int<a name="e1"></a>QTextStream::width(intw)</h3>
<p>Sets the field width to <em>w.</em> Returns the previous field width.
<h3 class="fn">QTextStream&amp;<a name="d2"></a>QTextStream::writeRawBytes(constchar*s, uintlen)</h3>
<p>Writes the <em>len</em> bytes from <em>s</em> to the stream and returns a reference to
the stream.
<p>See also:  <a href="qiodevice.html#c9">QIODevice::writeBlock</a>().
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses 
<a href="http://www.troll.no">www.troll.no</a>):<br>
<form method=post action="http://www.troll.no/search.cgi">
<input type=hidden name="version" value="1.44"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright &copy; 1995-99
<a href="troll.html">Troll Tech</a>, all rights reserved.
<p>
It was generated from the following files:
<ul>
<li>qtextstream.h: 1998/08/25
<li>qtextstream.cpp: 1998/07/03
</ul>
<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  1999 Troll Tech<td><a href="trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 1.45</div>
</table></div></address></body></html>