summaryrefslogtreecommitdiffstats
path: root/doc/html/ntqframe.html
blob: fa6672e0812b0fe8038f6f278e28604357f45c58 (plain)
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qframe.cpp:46 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQFrame Class</title>
<style type="text/css"><!--
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&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;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>TQFrame Class Reference</h1>

<p>The TQFrame class is the base class of widgets that can have a frame.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qframe-h.html">ntqframe.h</a>&gt;</tt>
<p>Inherits <a href="ntqwidget.html">TQWidget</a>.
<p>Inherited by <a href="ntqgroupbox.html">TQGroupBox</a>, <a href="ntqscrollview.html">TQScrollView</a>, <a href="ntqdockwindow.html">TQDockWindow</a>, <a href="ntqgrid.html">TQGrid</a>, <a href="ntqhbox.html">TQHBox</a>, <a href="ntqlabel.html">TQLabel</a>, <a href="ntqlcdnumber.html">TQLCDNumber</a>, <a href="ntqlineedit.html">TQLineEdit</a>, <a href="ntqmenubar.html">TQMenuBar</a>, <a href="ntqpopupmenu.html">TQPopupMenu</a>, <a href="ntqprogressbar.html">TQProgressBar</a>, <a href="ntqsplitter.html">TQSplitter</a>, <a href="ntqtoolbox.html">TQToolBox</a>, and <a href="ntqwidgetstack.html">TQWidgetStack</a>.
<p><a href="qframe-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#TQFrame"><b>TQFrame</b></a> ( TQWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, WFlags&nbsp;f = 0 )</li>
<li class=fn>int <a href="#frameStyle"><b>frameStyle</b></a> () const</li>
<li class=fn>virtual void <a href="#setFrameStyle"><b>setFrameStyle</b></a> ( int&nbsp;style )</li>
<li class=fn>int <a href="#frameWidth"><b>frameWidth</b></a> () const</li>
<li class=fn>TQRect <a href="#contentsRect"><b>contentsRect</b></a> () const</li>
<li class=fn>enum <a href="#Shape-enum"><b>Shape</b></a> { NoFrame = 0, Box = 0x0001, Panel = 0x0002, WinPanel = 0x0003, HLine = 0x0004, VLine = 0x0005, StyledPanel = 0x0006, PopupPanel = 0x0007, MenuBarPanel = 0x0008, ToolBarPanel = 0x0009, LineEditPanel = 0x000a, TabWidgetPanel = 0x000b, GroupBoxPanel = 0x000c, MShape = 0x000f }</li>
<li class=fn>enum <a href="#Shadow-enum"><b>Shadow</b></a> { Plain = 0x0010, Raised = 0x0020, Sunken = 0x0030, MShadow = 0x00f0 }</li>
<li class=fn>Shape <a href="#frameShape"><b>frameShape</b></a> () const</li>
<li class=fn>void <a href="#setFrameShape"><b>setFrameShape</b></a> ( Shape )</li>
<li class=fn>Shadow <a href="#frameShadow"><b>frameShadow</b></a> () const</li>
<li class=fn>void <a href="#setFrameShadow"><b>setFrameShadow</b></a> ( Shadow )</li>
<li class=fn>int <a href="#lineWidth"><b>lineWidth</b></a> () const</li>
<li class=fn>virtual void <a href="#setLineWidth"><b>setLineWidth</b></a> ( int )</li>
<li class=fn>int <a href="#margin"><b>margin</b></a> () const</li>
<li class=fn>virtual void <a href="#setMargin"><b>setMargin</b></a> ( int )</li>
<li class=fn>int <a href="#midLineWidth"><b>midLineWidth</b></a> () const</li>
<li class=fn>virtual void <a href="#setMidLineWidth"><b>setMidLineWidth</b></a> ( int )</li>
<li class=fn>TQRect <a href="#frameRect"><b>frameRect</b></a> () const</li>
<li class=fn>virtual void <a href="#setFrameRect"><b>setFrameRect</b></a> ( const TQRect &amp; )</li>
</ul>
<h2>Properties</h2>
<ul>
<li class=fn>TQRect <a href="#contentsRect-prop"><b>contentsRect</b></a>&nbsp;- the rectangle inside the frame &nbsp;<em>(read only)</em></li>
<li class=fn>TQRect <a href="#frameRect-prop"><b>frameRect</b></a>&nbsp;- the frame rectangle</li>
<li class=fn>Shadow <a href="#frameShadow-prop"><b>frameShadow</b></a>&nbsp;- the frame shadow value from the frame style</li>
<li class=fn>Shape <a href="#frameShape-prop"><b>frameShape</b></a>&nbsp;- the frame shape value from the frame style</li>
<li class=fn>int <a href="#frameWidth-prop"><b>frameWidth</b></a>&nbsp;- the width of the frame that is drawn &nbsp;<em>(read only)</em></li>
<li class=fn>int <a href="#lineWidth-prop"><b>lineWidth</b></a>&nbsp;- the line width</li>
<li class=fn>int <a href="#margin-prop"><b>margin</b></a>&nbsp;- the width of the margin</li>
<li class=fn>int <a href="#midLineWidth-prop"><b>midLineWidth</b></a>&nbsp;- the width of the mid-line</li>
</ul>
<h2>Protected Members</h2>
<ul>
<li class=fn>virtual void <a href="#paintEvent"><b>paintEvent</b></a> ( TQPaintEvent&nbsp;*&nbsp;event )</li>
<li class=fn>virtual void <a href="#resizeEvent"><b>resizeEvent</b></a> ( TQResizeEvent&nbsp;*&nbsp;e )</li>
<li class=fn>virtual void <a href="#drawFrame"><b>drawFrame</b></a> ( TQPainter&nbsp;*&nbsp;p )</li>
<li class=fn>virtual void <a href="#drawContents"><b>drawContents</b></a> ( TQPainter * )</li>
<li class=fn>virtual void <a href="#frameChanged"><b>frameChanged</b></a> ()</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The TQFrame class is the base class of widgets that can have a frame.
<p> 
<p> It draws a frame and calls a virtual function, <a href="#drawContents">drawContents</a>(), to
fill in the frame. This function is reimplemented by subclasses.
There are also two other less useful functions: <a href="#drawFrame">drawFrame</a>() and
<a href="#frameChanged">frameChanged</a>().
<p> <a href="ntqpopupmenu.html">TQPopupMenu</a> uses this to "raise" the menu above the surrounding
screen. <a href="ntqprogressbar.html">TQProgressBar</a> has a "sunken" look. <a href="ntqlabel.html">TQLabel</a> has a flat look.
The frames of widgets like these can be changed.
<p> <pre>
    <a href="ntqlabel.html">TQLabel</a> label(...);
    label.<a href="#setFrameStyle">setFrameStyle</a>( TQFrame::<a href="#Shape-enum">Panel</a> | TQFrame::<a href="#Shadow-enum">Raised</a> );
    label.<a href="#setLineWidth">setLineWidth</a>( 2 );

    <a href="ntqprogressbar.html">TQProgressBar</a> pbar(...);
    label.<a href="#setFrameStyle">setFrameStyle</a>( TQFrame::<a href="#Shape-enum">NoFrame</a> );
    </pre>
 
<p> The TQFrame class can also be used directly for creating simple
frames without any contents, although usually you would use a
<a href="ntqhbox.html">TQHBox</a> or <a href="ntqvbox.html">TQVBox</a> because they automatically lay out the widgets you
put inside the frame.
<p> A frame widget has four attributes: <a href="#frameStyle">frameStyle</a>(), <a href="#lineWidth">lineWidth</a>(),
<a href="#midLineWidth">midLineWidth</a>(), and <a href="#margin">margin</a>().
<p> The frame style is specified by a <a href="#Shape-enum">frame
    shape</a> and a <a href="#Shadow-enum">shadow style</a>. The
frame shapes are <a href="#Shape-enum">NoFrame</a>, <a href="#Shape-enum">Box</a>, <a href="#Shape-enum">Panel</a>, <a href="#Shape-enum">StyledPanel</a>, <a href="#Shape-enum">PopupPanel</a>, <a href="#Shape-enum">WinPanel</a>, <a href="#Shape-enum">ToolBarPanel</a>, <a href="#Shape-enum">MenuBarPanel</a>, <a href="#Shape-enum">HLine</a> and <a href="#Shape-enum">VLine</a>; the shadow styles are <a href="#Shadow-enum">Plain</a>, <a href="#Shadow-enum">Raised</a> and
<a href="#Shadow-enum">Sunken</a>.
<p> The line width is the width of the frame border.
<p> The mid-line width specifies the width of an extra line in the
middle of the frame, which uses a third color to obtain a special
3D effect. Notice that a mid-line is only drawn for <a href="#Shape-enum">Box</a>, <a href="#Shape-enum">HLine</a> and <a href="#Shape-enum">VLine</a> frames that are raised or sunken.
<p> The margin is the gap between the frame and the contents of the
frame.
<p> <a name="picture"></a>
This table shows the most useful combinations of styles and widths
(and some rather useless ones):
<p> <center><img src="frames.png" alt="Table of frame styles"></center> <p>See also <a href="abstractwidgets.html">Abstract Widget Classes</a>.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="Shadow-enum"></a>TQFrame::Shadow</h3>

<p> This enum type defines the 3D effect used for TQFrame's frame.
<ul>
<li><tt>TQFrame::Plain</tt> - the frame and contents appear level with the
surroundings; draws using the palette foreground color (without
any 3D effect)
<li><tt>TQFrame::Raised</tt> - the frame and contents appear raised; draws a 3D
raised line using the light and dark colors of the current color
group
<li><tt>TQFrame::Sunken</tt> - the frame and contents appear sunken; draws a 3D
sunken line using the light and dark colors of the current color
group
<li><tt>TQFrame::MShadow</tt> - internal; mask for the shadow
</ul><p> Shadow interacts with TQFrame::Shape, the <a href="#lineWidth">lineWidth</a>() and the
<a href="#midLineWidth">midLineWidth</a>(). See the <a href="#picture">picture of the frames</a>
in the class description.
<p> <p>See also <a href="#Shape-enum">TQFrame::Shape</a>, <a href="#lineWidth-prop">lineWidth</a>, and <a href="#midLineWidth-prop">midLineWidth</a>.

<h3 class=fn><a name="Shape-enum"></a>TQFrame::Shape</h3>

<p> This enum type defines the shapes of a TQFrame's frame.
<ul>
<li><tt>TQFrame::NoFrame</tt> - TQFrame draws nothing
<li><tt>TQFrame::Box</tt> - TQFrame draws a box around its contents
<li><tt>TQFrame::Panel</tt> - TQFrame draws a panel to make the contents appear
raised or sunken
<li><tt>TQFrame::StyledPanel</tt> - draws a rectangular panel with a look that
depends on the current GUI style. It can be raised or sunken.
<li><tt>TQFrame::HLine</tt> - TQFrame draws a horizontal line that frames nothing
(useful as separator)
<li><tt>TQFrame::VLine</tt> - TQFrame draws a vertical line that frames nothing
(useful as separator)
<li><tt>TQFrame::GroupBoxPanel</tt> - draws a rectangular panel
<li><tt>TQFrame::WinPanel</tt> - draws a rectangular panel that can be raised or
sunken like those in Windows 95. Specifying this shape sets
the line width to 2 pixels. WinPanel is provided for compatibility.
For GUI style independence we recommend using StyledPanel instead.
<li><tt>TQFrame::ToolBarPanel</tt>
<li><tt>TQFrame::MenuBarPanel</tt>
<li><tt>TQFrame::PopupPanel</tt>
<li><tt>TQFrame::LineEditPanel</tt> - is used to draw a frame suitable for line edits. The
look depends upon the current GUI style.
<li><tt>TQFrame::TabWidgetPanel</tt> - is used to draw a frame suitable for tab widgets. The
look depends upon the current GUI style.
<li><tt>TQFrame::MShape</tt> - internal mask
</ul><p> When it does not call <a href="ntqstyle.html">TQStyle</a>, Shape interacts with TQFrame::Shadow,
the <a href="#lineWidth">lineWidth</a>() and the <a href="#midLineWidth">midLineWidth</a>() to create the total result.
See the <a href="#picture">picture of the frames</a> in the class
description.
<p> <p>See also <a href="#Shadow-enum">TQFrame::Shadow</a>, <a href="ntqwidget.html#style">TQFrame::style</a>(), and <a href="ntqstyle.html#drawPrimitive">TQStyle::drawPrimitive</a>().

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQFrame"></a>TQFrame::TQFrame ( <a href="ntqwidget.html">TQWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, WFlags&nbsp;f = 0 )
</h3>
Constructs a frame widget with frame style <a href="#Shape-enum">NoFrame</a> and a
1-pixel frame width.
<p> The <em>parent</em>, <em>name</em> and <em>f</em> arguments are passed to the
<a href="ntqwidget.html">TQWidget</a> constructor.

<h3 class=fn><a href="ntqrect.html">TQRect</a> <a name="contentsRect"></a>TQFrame::contentsRect () const
</h3><p>Returns the rectangle inside the frame.
See the <a href="ntqframe.html#contentsRect-prop">"contentsRect"</a> property for details.
<h3 class=fn>void <a name="drawContents"></a>TQFrame::drawContents ( <a href="ntqpainter.html">TQPainter</a>&nbsp;* )<tt> [virtual protected]</tt>
</h3>
Virtual function that draws the contents of the frame.
<p> The <a href="ntqpainter.html">TQPainter</a> is already open when you get it, and you must leave
it open. Painter <a href="ntqpainter.html#setWorldMatrix">transformations</a> are switched off on entry. If you
transform the painter, remember to take the frame into account and
<a href="ntqpainter.html#resetXForm">reset transformation</a> before
returning.
<p> This function is reimplemented by subclasses that draw something
inside the frame. It should only draw inside <a href="#contentsRect">contentsRect</a>(). The
default function does nothing.
<p> <p>See also <a href="#contentsRect-prop">contentsRect</a> and <a href="ntqpainter.html#setClipRect">TQPainter::setClipRect</a>().

<p>Reimplemented in <a href="ntqlabel.html#drawContents">TQLabel</a>, <a href="ntqlcdnumber.html#drawContents">TQLCDNumber</a>, <a href="ntqmenubar.html#drawContents">TQMenuBar</a>, and <a href="ntqpopupmenu.html#drawContents">TQPopupMenu</a>.
<h3 class=fn>void <a name="drawFrame"></a>TQFrame::drawFrame ( <a href="ntqpainter.html">TQPainter</a>&nbsp;*&nbsp;p )<tt> [virtual protected]</tt>
</h3>
Draws the frame using the painter <em>p</em> and the current frame
attributes and color group. The rectangle inside the frame is not
affected.
<p> This function is virtual, but in general you do not need to
reimplement it. If you do, note that the <a href="ntqpainter.html">TQPainter</a> is already open
and must remain open.
<p> <p>See also <a href="#frameRect-prop">frameRect</a>, <a href="#contentsRect-prop">contentsRect</a>, <a href="#drawContents">drawContents</a>(), <a href="#frameStyle">frameStyle</a>(), and <a href="ntqwidget.html#palette-prop">palette</a>.

<h3 class=fn>void <a name="frameChanged"></a>TQFrame::frameChanged ()<tt> [virtual protected]</tt>
</h3>
Virtual function that is called when the frame style, line width
or mid-line width changes.
<p> This function can be reimplemented by subclasses that need to know
when the frame attributes change.
<p> The default implementation calls <a href="ntqwidget.html#update">update</a>().

<h3 class=fn><a href="ntqrect.html">TQRect</a> <a name="frameRect"></a>TQFrame::frameRect () const
</h3><p>Returns the frame rectangle.
See the <a href="ntqframe.html#frameRect-prop">"frameRect"</a> property for details.
<h3 class=fn><a href="ntqframe.html#Shadow-enum">Shadow</a> <a name="frameShadow"></a>TQFrame::frameShadow () const
</h3><p>Returns the frame shadow value from the frame style.
See the <a href="ntqframe.html#frameShadow-prop">"frameShadow"</a> property for details.
<h3 class=fn><a href="ntqframe.html#Shape-enum">Shape</a> <a name="frameShape"></a>TQFrame::frameShape () const
</h3><p>Returns the frame shape value from the frame style.
See the <a href="ntqframe.html#frameShape-prop">"frameShape"</a> property for details.
<h3 class=fn>int <a name="frameStyle"></a>TQFrame::frameStyle () const
</h3>

<p> Returns the frame style.
<p> The default value is TQFrame::NoFrame.
<p> <p>See also <a href="#setFrameStyle">setFrameStyle</a>(), <a href="#frameShape-prop">frameShape</a>, and <a href="#frameShadow-prop">frameShadow</a>.

<p>Example: <a href="scrollview-example.html#x622">scrollview/scrollview.cpp</a>.
<h3 class=fn>int <a name="frameWidth"></a>TQFrame::frameWidth () const
</h3><p>Returns the width of the frame that is drawn.
See the <a href="ntqframe.html#frameWidth-prop">"frameWidth"</a> property for details.
<h3 class=fn>int <a name="lineWidth"></a>TQFrame::lineWidth () const
</h3><p>Returns the line width.
See the <a href="ntqframe.html#lineWidth-prop">"lineWidth"</a> property for details.
<h3 class=fn>int <a name="margin"></a>TQFrame::margin () const
</h3><p>Returns the width of the margin.
See the <a href="ntqframe.html#margin-prop">"margin"</a> property for details.
<h3 class=fn>int <a name="midLineWidth"></a>TQFrame::midLineWidth () const
</h3><p>Returns the width of the mid-line.
See the <a href="ntqframe.html#midLineWidth-prop">"midLineWidth"</a> property for details.
<h3 class=fn>void <a name="paintEvent"></a>TQFrame::paintEvent ( <a href="qpaintevent.html">TQPaintEvent</a>&nbsp;*&nbsp;event )<tt> [virtual protected]</tt>
</h3>
Processes the paint event <em>event</em>.
<p> Paints the frame and the contents.
<p> Opens the painter on the frame and calls <a href="#drawFrame">drawFrame</a>(), then
<a href="#drawContents">drawContents</a>().

<p>Examples: <a href="life-example.html#x1888">life/life.cpp</a> and <a href="qfd-example.html#x1995">qfd/fontdisplayer.cpp</a>.
<p>Reimplemented from <a href="ntqwidget.html#paintEvent">TQWidget</a>.
<h3 class=fn>void <a name="resizeEvent"></a>TQFrame::resizeEvent ( <a href="qresizeevent.html">TQResizeEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
</h3>
Processes the resize event <em>e</em>.
<p> Adjusts the frame rectangle for the resized widget. The frame
rectangle is elastic, and the surrounding area is static.
<p> The resulting frame rectangle may be null or invalid. You can use
<a href="ntqwidget.html#setMinimumSize">setMinimumSize</a>() to avoid those possibilities.
<p> Nothing is done if the frame rectangle is a <a href="ntqrect.html#isNull">null rectangle</a> already.

<p>Example: <a href="life-example.html#x1889">life/life.cpp</a>.
<p>Reimplemented from <a href="ntqwidget.html#resizeEvent">TQWidget</a>.
<h3 class=fn>void <a name="setFrameRect"></a>TQFrame::setFrameRect ( const&nbsp;<a href="ntqrect.html">TQRect</a>&nbsp;&amp; )<tt> [virtual]</tt>
</h3><p>Sets the frame rectangle.
See the <a href="ntqframe.html#frameRect-prop">"frameRect"</a> property for details.
<h3 class=fn>void <a name="setFrameShadow"></a>TQFrame::setFrameShadow ( <a href="ntqframe.html#Shadow-enum">Shadow</a> )
</h3><p>Sets the frame shadow value from the frame style.
See the <a href="ntqframe.html#frameShadow-prop">"frameShadow"</a> property for details.
<h3 class=fn>void <a name="setFrameShape"></a>TQFrame::setFrameShape ( <a href="ntqframe.html#Shape-enum">Shape</a> )
</h3><p>Sets the frame shape value from the frame style.
See the <a href="ntqframe.html#frameShape-prop">"frameShape"</a> property for details.
<h3 class=fn>void <a name="setFrameStyle"></a>TQFrame::setFrameStyle ( int&nbsp;style )<tt> [virtual]</tt>
</h3>
Sets the frame style to <em>style</em>.
<p> The <em>style</em> is the bitwise OR between a frame shape and a frame
shadow style. See the <a href="#picture">illustration</a> in the
class documentation.
<p> The frame shapes are given in <a href="#Shape-enum">TQFrame::Shape</a> and the shadow
styles in <a href="#Shadow-enum">TQFrame::Shadow</a>.
<p> If a mid-line width greater than 0 is specified, an additional
line is drawn for <a href="#Shadow-enum">Raised</a> or <a href="#Shadow-enum">Sunken</a> <a href="#Shape-enum">Box</a>, <a href="#Shape-enum">HLine</a>, and <a href="#Shape-enum">VLine</a> frames. The mid-color of the current color group is used for
drawing middle lines.
<p> <p>See also <a href="#picture">Illustration</a>, <a href="#frameStyle">frameStyle</a>(), <a href="ntqwidget.html#colorGroup-prop">colorGroup</a>, and <a href="qcolorgroup.html">TQColorGroup</a>.

<p>Examples: <a href="cursor-example.html#x1114">cursor/cursor.cpp</a>, <a href="layout-example.html#x531">layout/layout.cpp</a>, <a href="listboxcombo-example.html#x1401">listboxcombo/listboxcombo.cpp</a>, <a href="rangecontrols-example.html#x1381">rangecontrols/rangecontrols.cpp</a>, <a href="scrollview-example.html#x626">scrollview/scrollview.cpp</a>, <a href="tabdialog-example.html#x52">tabdialog/tabdialog.cpp</a>, and <a href="tictac-example.html#x24">tictac/tictac.cpp</a>.
<h3 class=fn>void <a name="setLineWidth"></a>TQFrame::setLineWidth ( int )<tt> [virtual]</tt>
</h3><p>Sets the line width.
See the <a href="ntqframe.html#lineWidth-prop">"lineWidth"</a> property for details.
<h3 class=fn>void <a name="setMargin"></a>TQFrame::setMargin ( int )<tt> [virtual]</tt>
</h3><p>Sets the width of the margin.
See the <a href="ntqframe.html#margin-prop">"margin"</a> property for details.
<h3 class=fn>void <a name="setMidLineWidth"></a>TQFrame::setMidLineWidth ( int )<tt> [virtual]</tt>
</h3><p>Sets the width of the mid-line.
See the <a href="ntqframe.html#midLineWidth-prop">"midLineWidth"</a> property for details.
<hr><h2>Property Documentation</h2>
<h3 class=fn><a href="ntqrect.html">TQRect</a> <a name="contentsRect-prop"></a>contentsRect</h3>
<p>This property holds the rectangle inside the frame.
<p>Get this property's value with <a href="#contentsRect">contentsRect</a>().
<p><p>See also <a href="#frameRect-prop">frameRect</a> and <a href="#drawContents">drawContents</a>().

<h3 class=fn><a href="ntqrect.html">TQRect</a> <a name="frameRect-prop"></a>frameRect</h3>
<p>This property holds the frame rectangle.
<p>The frame rectangle is the rectangle the frame is drawn in. By
default, this is the entire widget. Setting this property does <em>not</em> cause a widget update.
<p> If this property is set to a null rectangle (for example
<tt>TQRect(0, 0, 0, 0)</tt>), then the frame rectangle is equivalent to
the <a href="ntqwidget.html#rect">widget rectangle</a>.
<p> <p>See also <a href="#contentsRect-prop">contentsRect</a>.

<p>Set this property's value with <a href="#setFrameRect">setFrameRect</a>() and get this property's value with <a href="#frameRect">frameRect</a>().
<h3 class=fn><a href="ntqframe.html#Shadow-enum">Shadow</a> <a name="frameShadow-prop"></a>frameShadow</h3>
<p>This property holds the frame shadow value from the frame style.
<p>Set this property's value with <a href="#setFrameShadow">setFrameShadow</a>() and get this property's value with <a href="#frameShadow">frameShadow</a>().
<p><p>See also <a href="#frameStyle">frameStyle</a>() and <a href="#frameShape-prop">frameShape</a>.

<h3 class=fn><a href="ntqframe.html#Shape-enum">Shape</a> <a name="frameShape-prop"></a>frameShape</h3>
<p>This property holds the frame shape value from the frame style.
<p>Set this property's value with <a href="#setFrameShape">setFrameShape</a>() and get this property's value with <a href="#frameShape">frameShape</a>().
<p><p>See also <a href="#frameStyle">frameStyle</a>() and <a href="#frameShadow-prop">frameShadow</a>.

<h3 class=fn>int <a name="frameWidth-prop"></a>frameWidth</h3>
<p>This property holds the width of the frame that is drawn.
<p>Note that the frame width depends on the <a href="#setFrameStyle">frame style</a>, not only the line
width and the mid-line width. For example, the style <a href="#Shape-enum">NoFrame</a>
always has a frame width of 0, whereas the style <a href="#Shape-enum">Panel</a> has a
frame width equivalent to the line width. The frame width also
includes the margin.
<p> <p>See also <a href="#lineWidth-prop">lineWidth</a>, <a href="#midLineWidth-prop">midLineWidth</a>, <a href="#frameStyle">frameStyle</a>(), and <a href="#margin-prop">margin</a>.

<p>Get this property's value with <a href="#frameWidth">frameWidth</a>().
<h3 class=fn>int <a name="lineWidth-prop"></a>lineWidth</h3>
<p>This property holds the line width.
<p>Note that the <em>total</em> line width for <a href="#Shape-enum">HLine</a> and <a href="#Shape-enum">VLine</a> is
given by <a href="#frameWidth">frameWidth</a>(), not <a href="#lineWidth">lineWidth</a>().
<p> The default value is 1.
<p> <p>See also <a href="#midLineWidth-prop">midLineWidth</a> and <a href="#frameWidth-prop">frameWidth</a>.

<p>Set this property's value with <a href="#setLineWidth">setLineWidth</a>() and get this property's value with <a href="#lineWidth">lineWidth</a>().
<h3 class=fn>int <a name="margin-prop"></a>margin</h3>
<p>This property holds the width of the margin.
<p>The margin is the distance between the innermost pixel of the
frame and the outermost pixel of <a href="#contentsRect">contentsRect</a>(). It is included in
<a href="#frameWidth">frameWidth</a>().
<p> The margin is filled according to <a href="ntqwidget.html#backgroundMode">backgroundMode</a>().
<p> The default value is 0.
<p> <p>See also <a href="#margin-prop">margin</a>, <a href="#lineWidth-prop">lineWidth</a>, and <a href="#frameWidth-prop">frameWidth</a>.

<p>Set this property's value with <a href="#setMargin">setMargin</a>() and get this property's value with <a href="#margin">margin</a>().
<h3 class=fn>int <a name="midLineWidth-prop"></a>midLineWidth</h3>
<p>This property holds the width of the mid-line.
<p>The default value is 0.
<p> <p>See also <a href="#lineWidth-prop">lineWidth</a> and <a href="#frameWidth-prop">frameWidth</a>.

<p>Set this property's value with <a href="#setMidLineWidth">setMidLineWidth</a>() and get this property's value with <a href="#midLineWidth">midLineWidth</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>