You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
224 lines
12 KiB
224 lines
12 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
6 months ago
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/workspace/tqworkspace.cpp:74 -->
|
||
13 years ago
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQWorkspace 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 Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped 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>TQWorkspace Class Reference<br><small>[<a href="workspace.html">workspace module</a>]</small></h1>
|
||
|
|
||
|
<p>The TQWorkspace widget provides a workspace window that can
|
||
|
contain decorated windows, e.g. for MDI.
|
||
|
<a href="#details">More...</a>
|
||
6 months ago
|
<p><tt>#include <<a href="tqworkspace-h.html">tqworkspace.h</a>></tt>
|
||
7 months ago
|
<p>Inherits <a href="tqwidget.html">TQWidget</a>.
|
||
6 months ago
|
<p><a href="tqworkspace-members.html">List of all member functions.</a>
|
||
13 years ago
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQWorkspace"><b>TQWorkspace</b></a> ( TQWidget * parent = 0, const char * name = 0 )</li>
|
||
|
<li class=fn><a href="#~TQWorkspace"><b>~TQWorkspace</b></a> ()</li>
|
||
|
<li class=fn>enum <a href="#WindowOrder-enum"><b>WindowOrder</b></a> { CreationOrder, StackingOrder }</li>
|
||
|
<li class=fn>TQWidget * <a href="#activeWindow"><b>activeWindow</b></a> () const</li>
|
||
|
<li class=fn>TQWidgetList windowList () const <em>(obsolete)</em></li>
|
||
|
<li class=fn>TQWidgetList <a href="#windowList"><b>windowList</b></a> ( WindowOrder order ) const</li>
|
||
|
<li class=fn>bool <a href="#scrollBarsEnabled"><b>scrollBarsEnabled</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setScrollBarsEnabled"><b>setScrollBarsEnabled</b></a> ( bool enable )</li>
|
||
|
</ul>
|
||
|
<h2>Public Slots</h2>
|
||
|
<ul>
|
||
|
<li class=fn>void <a href="#cascade"><b>cascade</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#tile"><b>tile</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#closeActiveWindow"><b>closeActiveWindow</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#closeAllWindows"><b>closeAllWindows</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#activateNextWindow"><b>activateNextWindow</b></a> ()</li>
|
||
|
<li class=fn>void <a href="#activatePrevWindow"><b>activatePrevWindow</b></a> ()</li>
|
||
|
</ul>
|
||
|
<h2>Signals</h2>
|
||
|
<ul>
|
||
|
<li class=fn>void <a href="#windowActivated"><b>windowActivated</b></a> ( TQWidget * w )</li>
|
||
|
</ul>
|
||
|
<h2>Properties</h2>
|
||
|
<ul>
|
||
|
<li class=fn>bool <a href="#scrollBarsEnabled-prop"><b>scrollBarsEnabled</b></a> - whether the workspace provides scrollbars</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
The TQWorkspace widget provides a workspace window that can
|
||
|
contain decorated windows, e.g. for MDI.
|
||
|
<p>
|
||
|
<p>
|
||
|
|
||
|
|
||
|
<p> MDI (multiple document interface) applications typically have one
|
||
|
main window with a menu bar and toolbar, and a central widget that
|
||
|
is a TQWorkspace. The workspace itself contains zero, one or more
|
||
|
document windows, each of which is a widget.
|
||
|
<p> The workspace itself is an ordinary TQt widget. It has a standard
|
||
|
constructor that takes a parent widget and an object name. The
|
||
6 months ago
|
parent window is usually a <a href="tqmainwindow.html">TQMainWindow</a>, but it need not be.
|
||
13 years ago
|
<p> Document windows (i.e. MDI windows) are also ordinary TQt widgets
|
||
|
which have the workspace as their parent widget. When you call
|
||
7 months ago
|
<a href="tqwidget.html#show">show</a>(), <a href="tqwidget.html#hide">hide</a>(), <a href="tqwidget.html#showMaximized">showMaximized</a>(), <a href="tqwidget.html#setCaption">setCaption</a>(), etc. on a document
|
||
13 years ago
|
window, it is shown, hidden, etc. with a frame, caption, icon and
|
||
|
icon text, just as you'd expect. You can provide widget flags
|
||
|
which will be used for the layout of the decoration or the
|
||
|
behaviour of the widget itself.
|
||
|
<p> To change or retrieve the geometry of MDI windows you must operate
|
||
7 months ago
|
on the MDI widget's <a href="tqwidget.html#parentWidget">parentWidget</a>(). (The parentWidget() provides
|
||
13 years ago
|
access to the decorated window in which the MDI window's widget is
|
||
|
shown.)
|
||
|
<p> A document window becomes active when it gets the <a href="focus.html#keyboard-focus">keyboard focus</a>.
|
||
7 months ago
|
You can also activate a window in code using <a href="tqwidget.html#setFocus">setFocus</a>(). The user
|
||
13 years ago
|
can activate a window by moving focus in the usual ways, for
|
||
|
example by clicking a window or by pressing Tab. 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> TQWorkspace 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, TQWorkspace 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 far left of the menu bar.
|
||
|
<p>See also <a href="application.html">Main Window and Related Classes</a> and <a href="organizers.html">Organizers</a>.
|
||
|
|
||
|
<hr><h2>Member Type Documentation</h2>
|
||
|
<h3 class=fn><a name="WindowOrder-enum"></a>TQWorkspace::WindowOrder</h3>
|
||
|
|
||
|
<p> Specifies the order in which windows are returned from <a href="#windowList">windowList</a>().
|
||
|
<ul>
|
||
|
<li><tt>TQWorkspace::CreationOrder</tt> - The windows are returned in the order of their creation
|
||
|
<li><tt>TQWorkspace::StackingOrder</tt> - The windows are returned in the order of their stacking
|
||
|
</ul>
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
7 months ago
|
<h3 class=fn><a name="TQWorkspace"></a>TQWorkspace::TQWorkspace ( <a href="tqwidget.html">TQWidget</a> * parent = 0, const char * name = 0 )
|
||
13 years ago
|
</h3>
|
||
|
Constructs a workspace with a <em>parent</em> and a <em>name</em>.
|
||
|
|
||
|
<h3 class=fn><a name="~TQWorkspace"></a>TQWorkspace::~TQWorkspace ()
|
||
|
</h3> Destroys the workspace and frees any allocated resources.
|
||
|
<h3 class=fn>void <a name="activateNextWindow"></a>TQWorkspace::activateNextWindow ()<tt> [slot]</tt>
|
||
|
</h3>
|
||
|
Activates the next window in the child window chain.
|
||
|
<p> <p>See also <a href="#activatePrevWindow">activatePrevWindow</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="activatePrevWindow"></a>TQWorkspace::activatePrevWindow ()<tt> [slot]</tt>
|
||
|
</h3>
|
||
|
Activates the previous window in the child window chain.
|
||
|
<p> <p>See also <a href="#activateNextWindow">activateNextWindow</a>().
|
||
|
|
||
7 months ago
|
<h3 class=fn><a href="tqwidget.html">TQWidget</a> * <a name="activeWindow"></a>TQWorkspace::activeWindow () const
|
||
13 years ago
|
</h3>
|
||
|
Returns the active window, or 0 if no window is active.
|
||
|
|
||
|
<p>Example: <a href="mdi-example.html#x2090">mdi/application.cpp</a>.
|
||
|
<h3 class=fn>void <a name="cascade"></a>TQWorkspace::cascade ()<tt> [slot]</tt>
|
||
|
</h3>
|
||
|
Arranges all the child windows in a cascade pattern.
|
||
|
<p> <p>See also <a href="#tile">tile</a>().
|
||
|
|
||
|
<p>Example: <a href="mdi-example.html#x2091">mdi/application.cpp</a>.
|
||
|
<h3 class=fn>void <a name="closeActiveWindow"></a>TQWorkspace::closeActiveWindow ()<tt> [slot]</tt>
|
||
|
</h3>
|
||
|
Closes the child window that is currently active.
|
||
|
<p> <p>See also <a href="#closeAllWindows">closeAllWindows</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="closeAllWindows"></a>TQWorkspace::closeAllWindows ()<tt> [slot]</tt>
|
||
|
</h3>
|
||
|
Closes all child windows.
|
||
|
<p> The windows are closed in random order. The operation stops if a
|
||
|
window does not accept the close event.
|
||
|
<p> <p>See also <a href="#closeActiveWindow">closeActiveWindow</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="scrollBarsEnabled"></a>TQWorkspace::scrollBarsEnabled () const
|
||
|
</h3><p>Returns TRUE if the workspace provides scrollbars; otherwise returns FALSE.
|
||
6 months ago
|
See the <a href="tqworkspace.html#scrollBarsEnabled-prop">"scrollBarsEnabled"</a> property for details.
|
||
13 years ago
|
<h3 class=fn>void <a name="setScrollBarsEnabled"></a>TQWorkspace::setScrollBarsEnabled ( bool enable )
|
||
|
</h3><p>Sets whether the workspace provides scrollbars to <em>enable</em>.
|
||
6 months ago
|
See the <a href="tqworkspace.html#scrollBarsEnabled-prop">"scrollBarsEnabled"</a> property for details.
|
||
13 years ago
|
<h3 class=fn>void <a name="tile"></a>TQWorkspace::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#x2093">mdi/application.cpp</a>.
|
||
7 months ago
|
<h3 class=fn>void <a name="windowActivated"></a>TQWorkspace::windowActivated ( <a href="tqwidget.html">TQWidget</a> * w )<tt> [signal]</tt>
|
||
13 years ago
|
</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
|
||
|
emitted for a single activation event.
|
||
|
<p> <p>See also <a href="#activeWindow">activeWindow</a>() and <a href="#windowList">windowList</a>().
|
||
|
|
||
6 months ago
|
<h3 class=fn>TQWidgetList <a name="windowList"></a>TQWorkspace::windowList ( <a href="tqworkspace.html#WindowOrder-enum">WindowOrder</a> order ) const
|
||
13 years ago
|
</h3>
|
||
|
Returns a list of all windows. If <em>order</em> is CreationOrder
|
||
|
(the default) the windows are listed in the order in which they
|
||
|
had been inserted into the workspace. If <em>order</em> is StackingOrder
|
||
|
the windows are listed in their stacking order, with the topmost window
|
||
|
being the last window in the list.
|
||
6 months ago
|
<p> TQWidgetList is the same as <a href="tqptrlist.html">TQPtrList</a><TQWidget>.
|
||
|
<p> <p>See also <a href="tqptrlist.html">TQPtrList</a>.
|
||
13 years ago
|
|
||
|
<p>Example: <a href="mdi-example.html#x2094">mdi/application.cpp</a>.
|
||
|
<h3 class=fn>TQWidgetList <a name="windowList-2"></a>TQWorkspace::windowList () const
|
||
|
</h3>
|
||
|
<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
||
|
<p>
|
||
|
<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">TQt toolkit</a>.
|
||
|
Copyright © 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 © 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>
|