diff options
Diffstat (limited to 'doc/html/tqdockarea.html')
-rw-r--r-- | doc/html/tqdockarea.html | 278 |
1 files changed, 278 insertions, 0 deletions
diff --git a/doc/html/tqdockarea.html b/doc/html/tqdockarea.html new file mode 100644 index 000000000..59b6b7d35 --- /dev/null +++ b/doc/html/tqdockarea.html @@ -0,0 +1,278 @@ +<!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/tqdockarea.cpp:450 --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>TQDockArea 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>TQDockArea Class Reference</h1> + +<p>The TQDockArea class manages and lays out TQDockWindows. +<a href="#details">More...</a> +<p><tt>#include <<a href="tqdockarea-h.html">tqdockarea.h</a>></tt> +<p>Inherits <a href="tqwidget.html">TQWidget</a>. +<p><a href="tqdockarea-members.html">List of all member functions.</a> +<h2>Public Members</h2> +<ul> +<li class=fn>enum <a href="#HandlePosition-enum"><b>HandlePosition</b></a> { Normal, Reverse }</li> +<li class=fn><a href="#TQDockArea"><b>TQDockArea</b></a> ( Orientation o, HandlePosition h = Normal, TQWidget * parent = 0, const char * name = 0 )</li> +<li class=fn><a href="#~TQDockArea"><b>~TQDockArea</b></a> ()</li> +<li class=fn>void <a href="#moveDockWindow-2"><b>moveDockWindow</b></a> ( TQDockWindow * w, const TQPoint & p, const TQRect & r, bool swap )</li> +<li class=fn>void <a href="#removeDockWindow"><b>removeDockWindow</b></a> ( TQDockWindow * w, bool makeFloating, bool swap, bool fixNewLines = TRUE )</li> +<li class=fn>void <a href="#moveDockWindow"><b>moveDockWindow</b></a> ( TQDockWindow * w, int index = -1 )</li> +<li class=fn>bool <a href="#hasDockWindow"><b>hasDockWindow</b></a> ( TQDockWindow * w, int * index = 0 )</li> +<li class=fn>Orientation <a href="#orientation"><b>orientation</b></a> () const</li> +<li class=fn>HandlePosition <a href="#handlePosition"><b>handlePosition</b></a> () const</li> +<li class=fn>bool <a href="#isEmpty"><b>isEmpty</b></a> () const</li> +<li class=fn>int <a href="#count"><b>count</b></a> () const</li> +<li class=fn>TQPtrList<TQDockWindow> <a href="#dockWindowList"><b>dockWindowList</b></a> () const</li> +<li class=fn>bool <a href="#isDockWindowAccepted"><b>isDockWindowAccepted</b></a> ( TQDockWindow * dw )</li> +<li class=fn>void <a href="#setAcceptDockWindow"><b>setAcceptDockWindow</b></a> ( TQDockWindow * dw, bool accept )</li> +</ul> +<h2>Public Slots</h2> +<ul> +<li class=fn>void <a href="#lineUp"><b>lineUp</b></a> ( bool keepNewLines )</li> +</ul> +<h2>Properties</h2> +<ul> +<li class=fn>int <a href="#count-prop"><b>count</b></a> - the number of dock windows in the dock area <em>(read only)</em></li> +<li class=fn>bool <a href="#empty-prop"><b>empty</b></a> - whether the dock area is empty <em>(read only)</em></li> +<li class=fn>HandlePosition <a href="#handlePosition-prop"><b>handlePosition</b></a> - where the dock window splitter handle is placed in the dock area <em>(read only)</em></li> +<li class=fn>Orientation <a href="#orientation-prop"><b>orientation</b></a> - the dock area's orientation <em>(read only)</em></li> +</ul> +<h2>Related Functions</h2> +<ul> +<li class=fn>TQTextStream & <a href="#operator-lt-lt"><b>operator<<</b></a> ( TQTextStream & ts, const TQDockArea & dockArea )</li> +<li class=fn>TQTextStream & <a href="#operator-gt-gt"><b>operator>></b></a> ( TQTextStream & ts, TQDockArea & dockArea )</li> +</ul> +<hr><a name="details"></a><h2>Detailed Description</h2> + + +The TQDockArea class manages and lays out TQDockWindows. +<p> +<p> A TQDockArea is a container which manages a list of +<a href="tqdockwindow.html">TQDockWindow</a>s which it lays out within its area. In cooperation +with the <a href="tqdockwindow.html">TQDockWindow</a>s it is responsible for the docking and +undocking of <a href="tqdockwindow.html">TQDockWindow</a>s and moving them inside the dock +area. TQDockAreas also handle the wrapping of <a href="tqdockwindow.html">TQDockWindow</a>s to +fill the available space as compactly as possible. TQDockAreas can +contain TQToolBars since <a href="tqtoolbar.html">TQToolBar</a> is a <a href="tqdockwindow.html">TQDockWindow</a> subclass. +<p> <a href="tqmainwindow.html">TQMainWindow</a> contains four TQDockAreas which you can use for your +TQToolBars and TQDockWindows, so in most situations you do not need +to use the TQDockArea class directly. Although TQMainWindow contains +support for its own dock areas it isn't convenient for adding new +TQDockAreas. If you need to create your own dock areas we suggest +that you create a subclass of <a href="tqwidget.html">TQWidget</a> and add your TQDockAreas to +your subclass. +<p> <center><img src="tqmainwindow-tqdockareas.png" alt="TQMainWindow's TQDockAreas"></center> +<p> <a name="lines"></a> +<em>Lines</em>. TQDockArea uses the concept of lines. A line is a +horizontal region which may contain dock windows side-by-side. A +dock area may have room for more than one line. When dock windows +are docked into a dock area they are usually added at the right +hand side of the top-most line that has room (unless manually +placed by the user). When users move dock windows they may leave +empty lines or gaps in non-empty lines. Dock windows can be lined +up to minimize wasted space using the <a href="#lineUp">lineUp</a>() function. +<p> The TQDockArea class maintains a position list of all its child +dock windows. Dock windows are added to a dock area from position +0 onwards. Dock windows are laid out sequentially in position +order from left to right, and in the case of multiple lines of +dock windows, from top to bottom. If a dock window is floated it +still retains its position since this is where the window will +return if the user double clicks its caption. A dock window's +position can be determined with <a href="#hasDockWindow">hasDockWindow</a>(). The position can +be changed with <a href="#moveDockWindow">moveDockWindow</a>(). +<p> To dock or undock a dock window use <a href="tqdockwindow.html#dock">TQDockWindow::dock</a>() and +<a href="tqdockwindow.html#undock">TQDockWindow::undock</a>() respectively. If you want to control which +dock windows can dock in a dock area use <a href="#setAcceptDockWindow">setAcceptDockWindow</a>(). To +see if a dock area contains a particular dock window use +<a href="#hasDockWindow">hasDockWindow</a>(); to see how many dock windows a dock area +contains use <a href="#count">count</a>(). +<p> The streaming operators can write the positions of the dock +windows in the dock area to a <a href="tqtextstream.html">TQTextStream</a>. The positions can be +read back later to restore the saved positions. +<p> Save the positions to a TQTextStream: +<pre> + ts << *myDockArea; + </pre> + +<p> Restore the positions from a TQTextStream: +<pre> + ts >> *myDockArea; + </pre> + +<p>See also <a href="application.html">Main Window and Related Classes</a>. + +<hr><h2>Member Type Documentation</h2> +<h3 class=fn><a name="HandlePosition-enum"></a>TQDockArea::HandlePosition</h3> + +<p> A dock window has two kinds of handles, the dock window handle +used for dragging the dock window, and the splitter handle used to +resize the dock window in relation to other dock windows using a +splitter. (The splitter handle is only visible for docked +windows.) +<p> This enum specifies where the dock window splitter handle is +placed in the dock area. +<ul> +<li><tt>TQDockArea::Normal</tt> - The splitter handles of dock windows are placed at +the right or bottom. +<li><tt>TQDockArea::Reverse</tt> - The splitter handles of dock windows are placed at +the left or top. +</ul> +<hr><h2>Member Function Documentation</h2> +<h3 class=fn><a name="TQDockArea"></a>TQDockArea::TQDockArea ( <a href="ntqt.html#Orientation-enum">Orientation</a> o, <a href="tqdockarea.html#HandlePosition-enum">HandlePosition</a> h = Normal, <a href="tqwidget.html">TQWidget</a> * parent = 0, const char * name = 0 ) +</h3> +Constructs a TQDockArea with orientation <em>o</em>, HandlePosition <em>h</em>, +parent <em>parent</em> and called <em>name</em>. + +<h3 class=fn><a name="~TQDockArea"></a>TQDockArea::~TQDockArea () +</h3> +Destroys the dock area and all the dock windows docked in the dock +area. +<p> Does not affect any floating dock windows or dock windows in other +dock areas, even if they first appeared in this dock area. +Floating dock windows are effectively top level windows and are +not child windows of the dock area. When a floating dock window is +docked (dragged into a dock area) its parent becomes the dock +area. + +<h3 class=fn>int <a name="count"></a>TQDockArea::count () const +</h3><p>Returns the number of dock windows in the dock area. +See the <a href="tqdockarea.html#count-prop">"count"</a> property for details. +<h3 class=fn><a href="tqptrlist.html">TQPtrList</a><TQDockWindow> <a name="dockWindowList"></a>TQDockArea::dockWindowList () const +</h3> +Returns a list of the dock windows in the dock area. + +<h3 class=fn><a href="tqdockarea.html#HandlePosition-enum">HandlePosition</a> <a name="handlePosition"></a>TQDockArea::handlePosition () const +</h3><p>Returns where the dock window splitter handle is placed in the dock area. +See the <a href="tqdockarea.html#handlePosition-prop">"handlePosition"</a> property for details. +<h3 class=fn>bool <a name="hasDockWindow"></a>TQDockArea::hasDockWindow ( <a href="tqdockwindow.html">TQDockWindow</a> * w, int * index = 0 ) +</h3> +Returns TRUE if the dock area contains the dock window <em>w</em>; +otherwise returns FALSE. If <em>index</em> is not 0 it will be set as +follows: if the dock area contains the dock window <em>*index</em> is +set to <em>w</em>'s index position; otherwise <em>*index</em> is set to -1. + +<h3 class=fn>bool <a name="isDockWindowAccepted"></a>TQDockArea::isDockWindowAccepted ( <a href="tqdockwindow.html">TQDockWindow</a> * dw ) +</h3> +Returns TRUE if dock window <em>dw</em> could be docked into the dock +area; otherwise returns FALSE. +<p> <p>See also <a href="#setAcceptDockWindow">setAcceptDockWindow</a>(). + +<h3 class=fn>bool <a name="isEmpty"></a>TQDockArea::isEmpty () const +</h3><p>Returns TRUE if the dock area is empty; otherwise returns FALSE. +See the <a href="tqdockarea.html#empty-prop">"empty"</a> property for details. +<h3 class=fn>void <a name="lineUp"></a>TQDockArea::lineUp ( bool keepNewLines )<tt> [slot]</tt> +</h3> +Lines up the dock windows in this dock area to minimize wasted +space. If <em>keepNewLines</em> is TRUE, only space within lines is +cleaned up. If <em>keepNewLines</em> is FALSE the number of lines might +be changed. + +<h3 class=fn>void <a name="moveDockWindow"></a>TQDockArea::moveDockWindow ( <a href="tqdockwindow.html">TQDockWindow</a> * w, int index = -1 ) +</h3> +Moves the <a href="tqdockwindow.html">TQDockWindow</a> <em>w</em> within the dock area. If <em>w</em> is not +already docked in this area, <em>w</em> is docked first. If <em>index</em> is +-1 or larger than the number of docked widgets, <em>w</em> is appended +at the end, otherwise it is inserted at the position <em>index</em>. + +<h3 class=fn>void <a name="moveDockWindow-2"></a>TQDockArea::moveDockWindow ( <a href="tqdockwindow.html">TQDockWindow</a> * w, const <a href="tqpoint.html">TQPoint</a> & p, const <a href="tqrect.html">TQRect</a> & r, bool swap ) +</h3> +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +<p> Moves the dock window <em>w</em> inside the dock area where <em>p</em> is the +new position (in global screen coordinates), <em>r</em> is the suggested +rectangle of the dock window and <em>swap</em> specifies whether or not +the orientation of the docked widget needs to be changed. +<p> This function is used internally by <a href="tqdockwindow.html">TQDockWindow</a>. You shouldn't +need to call it yourself. + +<h3 class=fn><a href="ntqt.html#Orientation-enum">Orientation</a> <a name="orientation"></a>TQDockArea::orientation () const +</h3><p>Returns the dock area's orientation. +See the <a href="tqdockarea.html#orientation-prop">"orientation"</a> property for details. +<h3 class=fn>void <a name="removeDockWindow"></a>TQDockArea::removeDockWindow ( <a href="tqdockwindow.html">TQDockWindow</a> * w, bool makeFloating, bool swap, bool fixNewLines = TRUE ) +</h3> +Removes the dock window <em>w</em> from the dock area. If <em>makeFloating</em> is TRUE, <em>w</em> gets floated, and if <em>swap</em> is TRUE, +the orientation of <em>w</em> gets swapped. If <em>fixNewLines</em> is TRUE +(the default) newlines in the area will be fixed. +<p> You should never need to call this function yourself. Use +<a href="tqdockwindow.html#dock">TQDockWindow::dock</a>() and <a href="tqdockwindow.html#undock">TQDockWindow::undock</a>() instead. + +<h3 class=fn>void <a name="setAcceptDockWindow"></a>TQDockArea::setAcceptDockWindow ( <a href="tqdockwindow.html">TQDockWindow</a> * dw, bool accept ) +</h3> +If <em>accept</em> is TRUE, dock window <em>dw</em> can be docked in the dock +area. If <em>accept</em> is FALSE, dock window <em>dw</em> cannot be docked in +the dock area. +<p> <p>See also <a href="#isDockWindowAccepted">isDockWindowAccepted</a>(). + +<hr><h2>Property Documentation</h2> +<h3 class=fn>int <a name="count-prop"></a>count</h3> +<p>This property holds the number of dock windows in the dock area. +<p> +<p>Get this property's value with <a href="#count">count</a>(). +<h3 class=fn>bool <a name="empty-prop"></a>empty</h3> +<p>This property holds whether the dock area is empty. +<p> +<p>Get this property's value with <a href="#isEmpty">isEmpty</a>(). +<h3 class=fn><a href="tqdockarea.html#HandlePosition-enum">HandlePosition</a> <a name="handlePosition-prop"></a>handlePosition</h3> +<p>This property holds where the dock window splitter handle is placed in the dock area. +<p>The default position is <a href="#HandlePosition-enum">Normal</a>. + +<p>Get this property's value with <a href="#handlePosition">handlePosition</a>(). +<h3 class=fn><a href="ntqt.html#Orientation-enum">Orientation</a> <a name="orientation-prop"></a>orientation</h3> +<p>This property holds the dock area's orientation. +<p>There is no default value; the orientation is specified in the +constructor. + +<p>Get this property's value with <a href="#orientation">orientation</a>(). +<hr><h2>Related Functions</h2> +<h3 class=fn><a href="tqtextstream.html">TQTextStream</a> & <a name="operator-lt-lt"></a>operator<< ( <a href="tqtextstream.html">TQTextStream</a> & ts, const <a href="tqdockarea.html">TQDockArea</a> & dockArea ) +</h3> + +<p> Writes the layout of the dock windows in dock area <em>dockArea</em> to +the text stream <em>ts</em>. +<p> <p>See also <a href="#operator-gt-gt">operator>></a>(). + +<h3 class=fn><a href="tqtextstream.html">TQTextStream</a> & <a name="operator-gt-gt"></a>operator>> ( <a href="tqtextstream.html">TQTextStream</a> & ts, <a href="tqdockarea.html">TQDockArea</a> & dockArea ) +</h3> + +<p> Reads the layout description of the dock windows in dock area <em>dockArea</em> from the text stream <em>ts</em> and restores it. The layout +description must have been previously written by the <a href="#operator-lt-lt">operator<<</a>() +function. +<p> <p>See also <a href="#operator-lt-lt">operator<<</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> |