Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 2074

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/workspace/qworkspace.cpp:66 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QWorkspace Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #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>QWorkspace Class Reference<br><small>[<a href="workspace.html">workspace module</a>]</small></h1>

<p>The QWorkspace widget provides a workspace window that can
contain decorated windows, e.g. for MDI.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qworkspace-h.html">qworkspace.h</a>&gt;</tt>
<p>Inherits <a href="qwidget.html">QWidget</a>.
<p><a href="qworkspace-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QWorkspace"><b>QWorkspace</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#~QWorkspace"><b>~QWorkspace</b></a> ()</div></li>
<li><div class=fn>QWidget * <a href="#activeWindow"><b>activeWindow</b></a> () const</div></li>
<li><div class=fn>QWidgetList <a href="#windowList"><b>windowList</b></a> () const</div></li>
<li><div class=fn>bool <a href="#scrollBarsEnabled"><b>scrollBarsEnabled</b></a> () const</div></li>
<li><div class=fn>void <a href="#setScrollBarsEnabled"><b>setScrollBarsEnabled</b></a> ( bool&nbsp;enable )</div></li>
</ul>
<h2>Public Slots</h2>
<ul>
<li><div class=fn>void <a href="#cascade"><b>cascade</b></a> ()</div></li>
<li><div class=fn>void <a href="#tile"><b>tile</b></a> ()</div></li>
</ul>
<h2>Signals</h2>
<ul>
<li><div class=fn>void <a href="#windowActivated"><b>windowActivated</b></a> ( QWidget&nbsp;*&nbsp;w )</div></li>
</ul>
<h2>Properties</h2>
<ul>
<li><div class=fn>bool <a href="#scrollBarsEnabled-prop"><b>scrollBarsEnabled</b></a>&nbsp;- whether the workspace provides scrollbars</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The QWorkspace widget provides a workspace window that can
contain decorated windows, e.g. for MDI.
<p> 
<p> 


<p> An MDI (multiple document interface) application has one main window
with a menu bar.  The central widget of this window is a workspace.
The workspace itself contains zero, one or more document windows,
each of which displays a document.
<p> The workspace itself is an ordinary Qt widget.  It has a standard
constructor that takes a parent widget and an object name.  The
parent window is usually a <a href="qmainwindow.html">QMainWindow</a>, but it need not be.
<p> Document windows (i.e. MDI windows) are also ordinary Qt widgets which
have the workspace as parent widget.  When you call <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(),
<a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#setCaption">setCaption</a>(), etc. on a document window, it is shown,
hidden, etc. with a frame, caption, icon and icon text, just as you'd
expect. You can provide <a href="qt.html#WidgetFlags">widget flags</a> which will be used for the layout
of the decoration or the behaviour of the widget itself.
<p> To change the geometry of the MDI windows it is necessary to make the
function calls to the <a href="qwidget.html#parentWidget">parentWidget</a>() of the widget, as this
will move or resize the decorated window.
<p> A document window becomes active when it gets the <a href="focus.html#keyboard-focus">keyboard focus</a>.
You can activate it using <a href="qwidget.html#setFocus">setFocus</a>(), and the user can activate it
by moving focus in the normal ways.  The workspace emits a signal
<a href="#windowActivated">windowActivated</a>() when it detects the activation change, and the
function <a href="#activeWindow">activeWindow</a>() always returns a pointer to the active
document window.
<p> The convenience function <a href="#windowList">windowList</a>() returns a list of all document
windows.  This is useful to create a popup menu "<u>W</u>indows" on the
fly, for example.
<p> QWorkspace provides two built-in layout strategies for child
windows: <a href="#cascade">cascade</a>() and <a href="#tile">tile</a>().  Both are slots so you can easily
connect menu entries to them.
<p> If you want your users to be able to work with document windows
larger than the actual workspace, set the scrollBarsEnabled property
to TRUE.
<p> If the top-level window contains a menu bar and a document window is
maximised, QWorkspace moves the document window's minimize, restore
and close buttons from the document window's frame to the workspace
window's menu bar. It then inserts a window operations menu at the
extreme left of the menu bar.
<p> <p>See also <a href="application.html">Main Window and Related Classes</a> and <a href="organizers.html">Organizers</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QWorkspace"></a>QWorkspace::QWorkspace ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a workspace with a <em>parent</em> and a <em>name</em>.

<h3 class=fn><a name="~QWorkspace"></a>QWorkspace::~QWorkspace ()
</h3>  Destroys the workspace and frees any allocated resources. 
<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="activeWindow"></a>QWorkspace::activeWindow () const
</h3>
Returns the active window, or 0 if no window is active.

<p>Example: <a href="mdi-example.html#x1189">mdi/application.cpp</a>.
<h3 class=fn>void <a name="cascade"></a>QWorkspace::cascade ()<tt> [slot]</tt>
</h3>
Arranges all child windows in a cascade pattern.
<p> <p>See also <a href="#tile">tile</a>().

<p>Example: <a href="mdi-example.html#x1190">mdi/application.cpp</a>.
<h3 class=fn>bool <a name="scrollBarsEnabled"></a>QWorkspace::scrollBarsEnabled () const
</h3><p>Returns TRUE if the workspace provides scrollbars; otherwise returns FALSE.
See the <a href="qworkspace.html#scrollBarsEnabled-prop">"scrollBarsEnabled"</a> property for details.
<h3 class=fn>void <a name="setScrollBarsEnabled"></a>QWorkspace::setScrollBarsEnabled ( bool&nbsp;enable )
</h3><p>Sets whether the workspace provides scrollbars to <em>enable</em>.
See the <a href="qworkspace.html#scrollBarsEnabled-prop">"scrollBarsEnabled"</a> property for details.
<h3 class=fn>void <a name="tile"></a>QWorkspace::tile ()<tt> [slot]</tt>
</h3>
Arranges all child windows in a tile pattern.
<p> <p>See also <a href="#cascade">cascade</a>().

<p>Example: <a href="mdi-example.html#x1192">mdi/application.cpp</a>.
<h3 class=fn>void <a name="windowActivated"></a>QWorkspace::windowActivated ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )<tt> [signal]</tt>
</h3>

<p> This signal is emitted when the window widget <em>w</em> becomes active.
Note that <em>w</em> can be null, and that more than one signal may be
fired for one activation event.
<p> <p>See also <a href="#activeWindow">activeWindow</a>() and <a href="#windowList">windowList</a>().

<h3 class=fn>QWidgetList <a name="windowList"></a>QWorkspace::windowList () const
</h3>
Returns a list of all windows.

<p>Example: <a href="mdi-example.html#x1193">mdi/application.cpp</a>.
<hr><h2>Property Documentation</h2>
<h3 class=fn>bool <a name="scrollBarsEnabled-prop"></a>scrollBarsEnabled</h3> <p>This property holds whether the workspace provides scrollbars.
<p>If this property is set to TRUE, it is possible to resize child
windows over the right or the bottom edge out of the visible area
of the workspace. The workspace shows scrollbars to make it
possible for the user to access those windows. If this property is
set to FALSE (the default), resizing windows out of the visible
area of the workspace is not permitted.

<p>Set this property's value with <a href="#setScrollBarsEnabled">setScrollBarsEnabled</a>() and get this property's value with <a href="#scrollBarsEnabled">scrollBarsEnabled</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<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; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>