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/src/widgets/qlcdnumber.cpp:44 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QLCDNumber Class</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>QLCDNumber Class Reference</h1>
|
---|
33 |
|
---|
34 | <p>The QLCDNumber widget displays a number with LCD-like digits.
|
---|
35 | <a href="#details">More...</a>
|
---|
36 | <p><tt>#include <<a href="qlcdnumber-h.html">qlcdnumber.h</a>></tt>
|
---|
37 | <p>Inherits <a href="qframe.html">QFrame</a>.
|
---|
38 | <p><a href="qlcdnumber-members.html">List of all member functions.</a>
|
---|
39 | <h2>Public Members</h2>
|
---|
40 | <ul>
|
---|
41 | <li class=fn><a href="#QLCDNumber"><b>QLCDNumber</b></a> ( QWidget * parent = 0, const char * name = 0 )</li>
|
---|
42 | <li class=fn><a href="#QLCDNumber-2"><b>QLCDNumber</b></a> ( uint numDigits, QWidget * parent = 0, const char * name = 0 )</li>
|
---|
43 | <li class=fn><a href="#~QLCDNumber"><b>~QLCDNumber</b></a> ()</li>
|
---|
44 | <li class=fn>enum <a href="#Mode-enum"><b>Mode</b></a> { Hex, Dec, Oct, Bin, HEX = Hex, DEC = Dec, OCT = Oct, BIN = Bin }</li>
|
---|
45 | <li class=fn>enum <a href="#SegmentStyle-enum"><b>SegmentStyle</b></a> { Outline, Filled, Flat }</li>
|
---|
46 | <li class=fn>bool <a href="#smallDecimalPoint"><b>smallDecimalPoint</b></a> () const</li>
|
---|
47 | <li class=fn>int <a href="#numDigits"><b>numDigits</b></a> () const</li>
|
---|
48 | <li class=fn>virtual void <a href="#setNumDigits"><b>setNumDigits</b></a> ( int nDigits )</li>
|
---|
49 | <li class=fn>bool <a href="#checkOverflow"><b>checkOverflow</b></a> ( double num ) const</li>
|
---|
50 | <li class=fn>bool <a href="#checkOverflow-2"><b>checkOverflow</b></a> ( int num ) const</li>
|
---|
51 | <li class=fn>Mode <a href="#mode"><b>mode</b></a> () const</li>
|
---|
52 | <li class=fn>virtual void <a href="#setMode"><b>setMode</b></a> ( Mode )</li>
|
---|
53 | <li class=fn>SegmentStyle <a href="#segmentStyle"><b>segmentStyle</b></a> () const</li>
|
---|
54 | <li class=fn>virtual void <a href="#setSegmentStyle"><b>setSegmentStyle</b></a> ( SegmentStyle )</li>
|
---|
55 | <li class=fn>double <a href="#value"><b>value</b></a> () const</li>
|
---|
56 | <li class=fn>int <a href="#intValue"><b>intValue</b></a> () const</li>
|
---|
57 | </ul>
|
---|
58 | <h2>Public Slots</h2>
|
---|
59 | <ul>
|
---|
60 | <li class=fn>void <a href="#display"><b>display</b></a> ( const QString & s )</li>
|
---|
61 | <li class=fn>void <a href="#display-2"><b>display</b></a> ( int num )</li>
|
---|
62 | <li class=fn>void <a href="#display-3"><b>display</b></a> ( double num )</li>
|
---|
63 | <li class=fn>virtual void <a href="#setHexMode"><b>setHexMode</b></a> ()</li>
|
---|
64 | <li class=fn>virtual void <a href="#setDecMode"><b>setDecMode</b></a> ()</li>
|
---|
65 | <li class=fn>virtual void <a href="#setOctMode"><b>setOctMode</b></a> ()</li>
|
---|
66 | <li class=fn>virtual void <a href="#setBinMode"><b>setBinMode</b></a> ()</li>
|
---|
67 | <li class=fn>virtual void <a href="#setSmallDecimalPoint"><b>setSmallDecimalPoint</b></a> ( bool )</li>
|
---|
68 | </ul>
|
---|
69 | <h2>Signals</h2>
|
---|
70 | <ul>
|
---|
71 | <li class=fn>void <a href="#overflow"><b>overflow</b></a> ()</li>
|
---|
72 | </ul>
|
---|
73 | <h2>Properties</h2>
|
---|
74 | <ul>
|
---|
75 | <li class=fn>int <a href="#intValue-prop"><b>intValue</b></a> - the displayed value rounded to the nearest integer</li>
|
---|
76 | <li class=fn>Mode <a href="#mode-prop"><b>mode</b></a> - the current display mode (number base)</li>
|
---|
77 | <li class=fn>int <a href="#numDigits-prop"><b>numDigits</b></a> - the current number of digits displayed</li>
|
---|
78 | <li class=fn>SegmentStyle <a href="#segmentStyle-prop"><b>segmentStyle</b></a> - the style of the LCDNumber</li>
|
---|
79 | <li class=fn>bool <a href="#smallDecimalPoint-prop"><b>smallDecimalPoint</b></a> - the style of the decimal point</li>
|
---|
80 | <li class=fn>double <a href="#value-prop"><b>value</b></a> - the displayed value</li>
|
---|
81 | </ul>
|
---|
82 | <h2>Protected Members</h2>
|
---|
83 | <ul>
|
---|
84 | <li class=fn>virtual void <a href="#drawContents"><b>drawContents</b></a> ( QPainter * p )</li>
|
---|
85 | </ul>
|
---|
86 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
87 |
|
---|
88 |
|
---|
89 | <p> The QLCDNumber widget displays a number with LCD-like digits.
|
---|
90 | <p>
|
---|
91 |
|
---|
92 | <p> It can display a number in just about any size. It can display
|
---|
93 | decimal, hexadecimal, octal or binary numbers. It is easy to
|
---|
94 | connect to data sources using the <a href="#display">display</a>() slot, which is
|
---|
95 | overloaded to take any of five argument types.
|
---|
96 | <p> There are also slots to change the base with <a href="#setMode">setMode</a>() and the
|
---|
97 | decimal point with <a href="#setSmallDecimalPoint">setSmallDecimalPoint</a>().
|
---|
98 | <p> QLCDNumber emits the <a href="#overflow">overflow</a>() signal when it is asked to display
|
---|
99 | something beyond its range. The range is set by <a href="#setNumDigits">setNumDigits</a>(),
|
---|
100 | but setSmallDecimalPoint() also influences it. If the display is
|
---|
101 | set to hexadecimal, octal or binary, the integer equivalent of the
|
---|
102 | value is displayed.
|
---|
103 | <p> These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S,
|
---|
104 | 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o,
|
---|
105 | P, r, u, U, Y, colon, degree sign (which is specified as single
|
---|
106 | quote in the string) and space. QLCDNumber substitutes spaces for
|
---|
107 | illegal characters.
|
---|
108 | <p> It is not possible to retrieve the contents of a QLCDNumber
|
---|
109 | object, although you can retrieve the numeric value with <a href="#value">value</a>().
|
---|
110 | If you really need the text, we recommend that you connect the
|
---|
111 | signals that feed the <a href="#display">display</a>() slot to another slot as well and
|
---|
112 | store the value there.
|
---|
113 | <p> Incidentally, QLCDNumber is the very oldest part of Qt, tracing
|
---|
114 | back to a BASIC program on the <a href="http://www.nvg.ntnu.no/sinclair/computers/zxspectrum/zxspectrum.htm">Sinclair Spectrum</a>.
|
---|
115 | <p> <img src=qlcdnum-m.png> <img src=qlcdnum-w.png>
|
---|
116 | <p> <p>See also <a href="qlabel.html">QLabel</a>, <a href="qframe.html">QFrame</a>, and <a href="basic.html">Basic Widgets</a>.
|
---|
117 |
|
---|
118 | <hr><h2>Member Type Documentation</h2>
|
---|
119 | <h3 class=fn><a name="Mode-enum"></a>QLCDNumber::Mode</h3>
|
---|
120 |
|
---|
121 | <p> This type determines how numbers are shown.
|
---|
122 | <ul>
|
---|
123 | <li><tt>QLCDNumber::Hex</tt> - Hexadecimal
|
---|
124 | <li><tt>QLCDNumber::Dec</tt> - Decimal
|
---|
125 | <li><tt>QLCDNumber::Oct</tt> - Octal
|
---|
126 | <li><tt>QLCDNumber::Bin</tt> - Binary
|
---|
127 | </ul><p> If the display is set to hexadecimal, octal or binary, the integer
|
---|
128 | equivalent of the value is displayed.
|
---|
129 |
|
---|
130 | <h3 class=fn><a name="SegmentStyle-enum"></a>QLCDNumber::SegmentStyle</h3>
|
---|
131 |
|
---|
132 | <p> This type determines the visual appearance of the QLCDNumber
|
---|
133 | widget.
|
---|
134 | <ul>
|
---|
135 | <li><tt>QLCDNumber::Outline</tt> - gives raised segments filled with the background brush.
|
---|
136 | <li><tt>QLCDNumber::Filled</tt> - gives raised segments filled with the foreground brush.
|
---|
137 | <li><tt>QLCDNumber::Flat</tt> - gives flat segments filled with the foreground brush.
|
---|
138 | </ul>
|
---|
139 | <hr><h2>Member Function Documentation</h2>
|
---|
140 | <h3 class=fn><a name="QLCDNumber"></a>QLCDNumber::QLCDNumber ( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 )
|
---|
141 | </h3>
|
---|
142 | Constructs an LCD number, sets the number of digits to 5, the base
|
---|
143 | to decimal, the decimal point mode to 'small' and the frame style
|
---|
144 | to a raised box. The <a href="#segmentStyle">segmentStyle</a>() is set to <a href="#SegmentStyle-enum">Outline</a>.
|
---|
145 | <p> The <em>parent</em> and <em>name</em> arguments are passed to the <a href="qframe.html">QFrame</a>
|
---|
146 | constructor.
|
---|
147 | <p> <p>See also <a href="#numDigits-prop">numDigits</a> and <a href="#smallDecimalPoint-prop">smallDecimalPoint</a>.
|
---|
148 |
|
---|
149 | <h3 class=fn><a name="QLCDNumber-2"></a>QLCDNumber::QLCDNumber ( uint numDigits, <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 )
|
---|
150 | </h3>
|
---|
151 | Constructs an LCD number, sets the number of digits to <em>numDigits</em>, the base to decimal, the decimal point mode to 'small'
|
---|
152 | and the frame style to a raised box. The <a href="#segmentStyle">segmentStyle</a>() is set to
|
---|
153 | <a href="#SegmentStyle-enum">Outline</a>.
|
---|
154 | <p> The <em>parent</em> and <em>name</em> arguments are passed to the <a href="qframe.html">QFrame</a>
|
---|
155 | constructor.
|
---|
156 | <p> <p>See also <a href="#numDigits-prop">numDigits</a> and <a href="#smallDecimalPoint-prop">smallDecimalPoint</a>.
|
---|
157 |
|
---|
158 | <h3 class=fn><a name="~QLCDNumber"></a>QLCDNumber::~QLCDNumber ()
|
---|
159 | </h3>
|
---|
160 | Destroys the LCD number.
|
---|
161 |
|
---|
162 | <h3 class=fn>bool <a name="checkOverflow"></a>QLCDNumber::checkOverflow ( double num ) const
|
---|
163 | </h3>
|
---|
164 | Returns TRUE if <em>num</em> is too big to be displayed in its entirety;
|
---|
165 | otherwise returns FALSE.
|
---|
166 | <p> <p>See also <a href="#display">display</a>(), <a href="#numDigits-prop">numDigits</a>, and <a href="#smallDecimalPoint-prop">smallDecimalPoint</a>.
|
---|
167 |
|
---|
168 | <h3 class=fn>bool <a name="checkOverflow-2"></a>QLCDNumber::checkOverflow ( int num ) const
|
---|
169 | </h3>
|
---|
170 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
171 | <p> Returns TRUE if <em>num</em> is too big to be displayed in its entirety;
|
---|
172 | otherwise returns FALSE.
|
---|
173 | <p> <p>See also <a href="#display">display</a>(), <a href="#numDigits-prop">numDigits</a>, and <a href="#smallDecimalPoint-prop">smallDecimalPoint</a>.
|
---|
174 |
|
---|
175 | <h3 class=fn>void <a name="display"></a>QLCDNumber::display ( const <a href="qstring.html">QString</a> & s )<tt> [slot]</tt>
|
---|
176 | </h3>
|
---|
177 | Displays the number represented by the string <em>s</em>.
|
---|
178 | <p> This version of the function disregards <a href="#mode">mode</a>() and
|
---|
179 | <a href="#smallDecimalPoint">smallDecimalPoint</a>().
|
---|
180 | <p> These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S,
|
---|
181 | 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o,
|
---|
182 | P, r, u, U, Y, colon, degree sign (which is specified as single
|
---|
183 | quote in the string) and space. QLCDNumber substitutes spaces for
|
---|
184 | illegal characters.
|
---|
185 |
|
---|
186 | <p>Examples: <a href="rangecontrols-example.html#x1384">rangecontrols/rangecontrols.cpp</a>, <a href="tutorial1-12.html#x2386">t12/lcdrange.cpp</a>, <a href="tutorial1-13.html#x2414">t13/gamebrd.cpp</a>, <a href="tutorial1-05.html#x2314">t5/main.cpp</a>, <a href="tutorial1-06.html#x2324">t6/main.cpp</a>, <a href="tutorial1-07.html#x2330">t7/lcdrange.cpp</a>, and <a href="xform-example.html#x1229">xform/xform.cpp</a>.
|
---|
187 | <h3 class=fn>void <a name="display-2"></a>QLCDNumber::display ( int num )<tt> [slot]</tt>
|
---|
188 | </h3><p>Sets the displayed value rounded to the nearest integer to <em>num</em>.
|
---|
189 | See the <a href="qlcdnumber.html#intValue-prop">"intValue"</a> property for details.
|
---|
190 | <h3 class=fn>void <a name="display-3"></a>QLCDNumber::display ( double num )<tt> [slot]</tt>
|
---|
191 | </h3>
|
---|
192 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
193 | <p> Displays the number <em>num</em>.
|
---|
194 |
|
---|
195 | <h3 class=fn>void <a name="drawContents"></a>QLCDNumber::drawContents ( <a href="qpainter.html">QPainter</a> * p )<tt> [virtual protected]</tt>
|
---|
196 | </h3>
|
---|
197 | Draws the LCD number using painter <em>p</em>. This function is called
|
---|
198 | from <a href="qframe.html#paintEvent">QFrame::paintEvent</a>().
|
---|
199 |
|
---|
200 | <p>Reimplemented from <a href="qframe.html#drawContents">QFrame</a>.
|
---|
201 | <h3 class=fn>int <a name="intValue"></a>QLCDNumber::intValue () const
|
---|
202 | </h3><p>Returns the displayed value rounded to the nearest integer.
|
---|
203 | See the <a href="qlcdnumber.html#intValue-prop">"intValue"</a> property for details.
|
---|
204 | <h3 class=fn><a href="qlcdnumber.html#Mode-enum">Mode</a> <a name="mode"></a>QLCDNumber::mode () const
|
---|
205 | </h3><p>Returns the current display mode (number base).
|
---|
206 | See the <a href="qlcdnumber.html#mode-prop">"mode"</a> property for details.
|
---|
207 | <h3 class=fn>int <a name="numDigits"></a>QLCDNumber::numDigits () const
|
---|
208 | </h3><p>Returns the current number of digits displayed.
|
---|
209 | See the <a href="qlcdnumber.html#numDigits-prop">"numDigits"</a> property for details.
|
---|
210 | <h3 class=fn>void <a name="overflow"></a>QLCDNumber::overflow ()<tt> [signal]</tt>
|
---|
211 | </h3>
|
---|
212 |
|
---|
213 | <p> This signal is emitted whenever the QLCDNumber is asked to display
|
---|
214 | a too-large number or a too-long string.
|
---|
215 | <p> It is never emitted by <a href="#setNumDigits">setNumDigits</a>().
|
---|
216 |
|
---|
217 | <h3 class=fn><a href="qlcdnumber.html#SegmentStyle-enum">SegmentStyle</a> <a name="segmentStyle"></a>QLCDNumber::segmentStyle () const
|
---|
218 | </h3><p>Returns the style of the LCDNumber.
|
---|
219 | See the <a href="qlcdnumber.html#segmentStyle-prop">"segmentStyle"</a> property for details.
|
---|
220 | <h3 class=fn>void <a name="setBinMode"></a>QLCDNumber::setBinMode ()<tt> [virtual slot]</tt>
|
---|
221 | </h3>
|
---|
222 | Calls <a href="#setMode">setMode</a>( BIN ). Provided for convenience (e.g. for
|
---|
223 | connecting buttons to it).
|
---|
224 | <p> <p>See also <a href="#mode-prop">mode</a>, <a href="#setHexMode">setHexMode</a>(), <a href="#setDecMode">setDecMode</a>(), <a href="#setOctMode">setOctMode</a>(), and <a href="#mode-prop">mode</a>.
|
---|
225 |
|
---|
226 | <h3 class=fn>void <a name="setDecMode"></a>QLCDNumber::setDecMode ()<tt> [virtual slot]</tt>
|
---|
227 | </h3>
|
---|
228 | Calls <a href="#setMode">setMode</a>( DEC ). Provided for convenience (e.g. for
|
---|
229 | connecting buttons to it).
|
---|
230 | <p> <p>See also <a href="#mode-prop">mode</a>, <a href="#setHexMode">setHexMode</a>(), <a href="#setOctMode">setOctMode</a>(), <a href="#setBinMode">setBinMode</a>(), and <a href="#mode-prop">mode</a>.
|
---|
231 |
|
---|
232 | <h3 class=fn>void <a name="setHexMode"></a>QLCDNumber::setHexMode ()<tt> [virtual slot]</tt>
|
---|
233 | </h3>
|
---|
234 | Calls <a href="#setMode">setMode</a>( HEX ). Provided for convenience (e.g. for
|
---|
235 | connecting buttons to it).
|
---|
236 | <p> <p>See also <a href="#mode-prop">mode</a>, <a href="#setDecMode">setDecMode</a>(), <a href="#setOctMode">setOctMode</a>(), <a href="#setBinMode">setBinMode</a>(), and <a href="#mode-prop">mode</a>.
|
---|
237 |
|
---|
238 | <h3 class=fn>void <a name="setMode"></a>QLCDNumber::setMode ( <a href="qlcdnumber.html#Mode-enum">Mode</a> )<tt> [virtual]</tt>
|
---|
239 | </h3><p>Sets the current display mode (number base).
|
---|
240 | See the <a href="qlcdnumber.html#mode-prop">"mode"</a> property for details.
|
---|
241 | <h3 class=fn>void <a name="setNumDigits"></a>QLCDNumber::setNumDigits ( int nDigits )<tt> [virtual]</tt>
|
---|
242 | </h3><p>Sets the current number of digits displayed to <em>nDigits</em>.
|
---|
243 | See the <a href="qlcdnumber.html#numDigits-prop">"numDigits"</a> property for details.
|
---|
244 | <h3 class=fn>void <a name="setOctMode"></a>QLCDNumber::setOctMode ()<tt> [virtual slot]</tt>
|
---|
245 | </h3>
|
---|
246 | Calls <a href="#setMode">setMode</a>( OCT ). Provided for convenience (e.g. for
|
---|
247 | connecting buttons to it).
|
---|
248 | <p> <p>See also <a href="#mode-prop">mode</a>, <a href="#setHexMode">setHexMode</a>(), <a href="#setDecMode">setDecMode</a>(), <a href="#setBinMode">setBinMode</a>(), and <a href="#mode-prop">mode</a>.
|
---|
249 |
|
---|
250 | <h3 class=fn>void <a name="setSegmentStyle"></a>QLCDNumber::setSegmentStyle ( <a href="qlcdnumber.html#SegmentStyle-enum">SegmentStyle</a> )<tt> [virtual]</tt>
|
---|
251 | </h3><p>Sets the style of the LCDNumber.
|
---|
252 | See the <a href="qlcdnumber.html#segmentStyle-prop">"segmentStyle"</a> property for details.
|
---|
253 | <h3 class=fn>void <a name="setSmallDecimalPoint"></a>QLCDNumber::setSmallDecimalPoint ( bool )<tt> [virtual slot]</tt>
|
---|
254 | </h3><p>Sets the style of the decimal point.
|
---|
255 | See the <a href="qlcdnumber.html#smallDecimalPoint-prop">"smallDecimalPoint"</a> property for details.
|
---|
256 | <h3 class=fn>bool <a name="smallDecimalPoint"></a>QLCDNumber::smallDecimalPoint () const
|
---|
257 | </h3><p>Returns the style of the decimal point.
|
---|
258 | See the <a href="qlcdnumber.html#smallDecimalPoint-prop">"smallDecimalPoint"</a> property for details.
|
---|
259 | <h3 class=fn>double <a name="value"></a>QLCDNumber::value () const
|
---|
260 | </h3><p>Returns the displayed value.
|
---|
261 | See the <a href="qlcdnumber.html#value-prop">"value"</a> property for details.
|
---|
262 | <hr><h2>Property Documentation</h2>
|
---|
263 | <h3 class=fn>int <a name="intValue-prop"></a>intValue</h3>
|
---|
264 | <p>This property holds the displayed value rounded to the nearest integer.
|
---|
265 | <p>This property corresponds to the nearest integer to the current
|
---|
266 | value displayed by the LCDNumber. This is the value used for
|
---|
267 | hexadecimal, octal and binary modes.
|
---|
268 | <p> If the displayed value is not a number, the property has a value
|
---|
269 | of 0.
|
---|
270 |
|
---|
271 | <p>Set this property's value with <a href="#display">display</a>() and get this property's value with <a href="#intValue">intValue</a>().
|
---|
272 | <h3 class=fn><a href="qlcdnumber.html#Mode-enum">Mode</a> <a name="mode-prop"></a>mode</h3>
|
---|
273 | <p>This property holds the current display mode (number base).
|
---|
274 | <p>Corresponds to the current display mode, which is one of <a href="#Mode-enum">BIN</a>,
|
---|
275 | <a href="#Mode-enum">OCT</a>, <a href="#Mode-enum">DEC</a> (the default) and <a href="#Mode-enum">HEX</a>. <a href="#Mode-enum">DEC</a> mode can display
|
---|
276 | floating point values, the other modes display the integer
|
---|
277 | equivalent.
|
---|
278 | <p> <p>See also <a href="#smallDecimalPoint-prop">smallDecimalPoint</a>, <a href="#setHexMode">setHexMode</a>(), <a href="#setDecMode">setDecMode</a>(), <a href="#setOctMode">setOctMode</a>(), and <a href="#setBinMode">setBinMode</a>().
|
---|
279 |
|
---|
280 | <p>Set this property's value with <a href="#setMode">setMode</a>() and get this property's value with <a href="#mode">mode</a>().
|
---|
281 | <h3 class=fn>int <a name="numDigits-prop"></a>numDigits</h3>
|
---|
282 | <p>This property holds the current number of digits displayed.
|
---|
283 | <p>Corresponds to the current number of digits. If <a href="#smallDecimalPoint-prop">QLCDNumber::smallDecimalPoint</a> is FALSE, the decimal point occupies
|
---|
284 | one digit position.
|
---|
285 | <p> <p>See also <a href="#smallDecimalPoint-prop">smallDecimalPoint</a>.
|
---|
286 |
|
---|
287 | <p>Set this property's value with <a href="#setNumDigits">setNumDigits</a>() and get this property's value with <a href="#numDigits">numDigits</a>().
|
---|
288 | <h3 class=fn><a href="qlcdnumber.html#SegmentStyle-enum">SegmentStyle</a> <a name="segmentStyle-prop"></a>segmentStyle</h3>
|
---|
289 | <p>This property holds the style of the LCDNumber.
|
---|
290 | <p><center><table cellpadding="4" cellspacing="2" border="0">
|
---|
291 | <tr bgcolor="#a2c511"> <th valign="top">Style <th valign="top">Result
|
---|
292 | <tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SegmentStyle-enum">Outline</a>
|
---|
293 | <td valign="top">Produces raised segments filled with the background color
|
---|
294 | (this is the default).
|
---|
295 | <tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SegmentStyle-enum">Filled</a>
|
---|
296 | <td valign="top">Produces raised segments filled with the foreground color.
|
---|
297 | <tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SegmentStyle-enum">Flat</a>
|
---|
298 | <td valign="top">Produces flat segments filled with the foreground color.
|
---|
299 | </table></center>
|
---|
300 | <p> <a href="#SegmentStyle-enum">Outline</a> and <a href="#SegmentStyle-enum">Filled</a> will additionally use
|
---|
301 | <a href="qcolorgroup.html#light">QColorGroup::light</a>() and <a href="qcolorgroup.html#dark">QColorGroup::dark</a>() for shadow effects.
|
---|
302 |
|
---|
303 | <p>Set this property's value with <a href="#setSegmentStyle">setSegmentStyle</a>() and get this property's value with <a href="#segmentStyle">segmentStyle</a>().
|
---|
304 | <h3 class=fn>bool <a name="smallDecimalPoint-prop"></a>smallDecimalPoint</h3>
|
---|
305 | <p>This property holds the style of the decimal point.
|
---|
306 | <p>If TRUE the decimal point is drawn between two digit positions.
|
---|
307 | Otherwise it occupies a digit position of its own, i.e. is drawn
|
---|
308 | in a digit position. The default is FALSE.
|
---|
309 | <p> The inter-digit space is made slightly wider when the decimal
|
---|
310 | point is drawn between the digits.
|
---|
311 | <p> <p>See also <a href="#mode-prop">mode</a>.
|
---|
312 |
|
---|
313 | <p>Set this property's value with <a href="#setSmallDecimalPoint">setSmallDecimalPoint</a>() and get this property's value with <a href="#smallDecimalPoint">smallDecimalPoint</a>().
|
---|
314 | <h3 class=fn>double <a name="value-prop"></a>value</h3>
|
---|
315 | <p>This property holds the displayed value.
|
---|
316 | <p>This property corresponds to the current value displayed by the
|
---|
317 | LCDNumber.
|
---|
318 | <p> If the displayed value is not a number, the property has a value
|
---|
319 | of 0.
|
---|
320 |
|
---|
321 | <p>Set this property's value with <a href="#display">display</a>() and get this property's value with <a href="#value">value</a>().
|
---|
322 | <!-- eof -->
|
---|
323 | <hr><p>
|
---|
324 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
325 | Copyright © 1995-2007
|
---|
326 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
327 | <table width=100% cellspacing=0 border=0><tr>
|
---|
328 | <td>Copyright © 2007
|
---|
329 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
330 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
331 | </table></div></address></body>
|
---|
332 | </html>
|
---|