Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The TQSplitter class implements a splitter widget. More...
#include <tqsplitter.h>
Inherits TQFrame.
A splitter lets the user control the size of child widgets by dragging the boundary between the children. Any number of widgets may be controlled by a single splitter.
To show a TQListBox, a TQListView and a TQTextEdit side by side:
TQSplitter *split = new TQSplitter( parent ); TQListBox *lb = new TQListBox( split ); TQListView *lv = new TQListView( split ); TQTextEdit *ed = new TQTextEdit( split );
TQSplitter lays out its children horizontally (side by side); you can use setOrientation(TQSplitter::Vertical) to lay out the children vertically.
By default, all widgets can be as large or as small as the user wishes, between the minimumSizeHint() (or minimumSize()) and maximumSize() of the widgets. Use setResizeMode() to specify that a widget should keep its size when the splitter is resized, or set the stretch component of the sizePolicy.
Although TQSplitter normally resizes the children only at the end of a resize operation, if you call setOpaqueResize(TRUE) the widgets are resized as often as possible.
The initial distribution of size between the widgets is determined by the initial size of each widget. You can also use setSizes() to set the sizes of all the widgets. The function sizes() returns the sizes set by the user.
If you hide() a child its space will be distributed among the other children. It will be reinstated when you show() it again. It is also possible to reorder the widgets within the splitter using moveToFirst() and moveToLast().
See also TQTabBar and Organizers.
This enum type describes how TQSplitter will resize each of its child widgets.
See also idAfter().
Reimplemented from TQObject.
Returns TRUE if child widgets can be resized down to size 0 by the user; otherwise returns FALSE. See the "childrenCollapsible" property for details.
Draws the splitter handle in the rectangle described by x, y, w, h using painter p.
See also TQStyle::drawPrimitive().
See also idAfter().
Returns the width of the splitter handle. See the "handleWidth" property for details.
For Arabic, Hebrew and other right-to-left languages the layout is reversed. p is then the distance from the right (or top) edge of the widget.
See also idAfter().
Example: splitter/splitter.cpp.
Returns TRUE if resizing is opaque; otherwise returns FALSE. See the "opaqueResize" property for details.
Returns the orientation of the splitter. See the "orientation" property for details.
Updates the splitter's state. You should not need to call this function.
Sets whether child widgets can be resized down to size 0 by the user. See the "childrenCollapsible" property for details.
By default, children are collapsible, meaning that the user can resize them down to size 0, even if they have a non-zero minimumSize() or minimumSizeHint(). This behavior can be changed on a per-widget basis by calling this function, or globally for all the widgets in the splitter by setting the childrenCollapsible property.
See also childrenCollapsible.
Sets the width of the splitter handle. See the "handleWidth" property for details.
Sets whether resizing is opaque. See the "opaqueResize" property for details.
Sets the orientation of the splitter. See the "orientation" property for details.
Examples: fileiconview/mainwindow.cpp, listviews/listviews.cpp, and splitter/splitter.cpp.
If list contains too few values, the result is undefined but the program will still be well-behaved.
Note that the values in list should be the height/width that the widgets should be resized to.
See also sizes().
If the splitter's orientation is horizontal, the list is a list of widget widths; if the orientation is vertical, the list is a list of widget heights.
Giving the values to another splitter's setSizes() function will produce a splitter with the same layout as this one.
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
TQValueList<int> list = mySplitter.sizes(); TQValueList<int>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
See also setSizes().
This property holds whether child widgets can be resized down to size 0 by the user.
By default, children are collapsible. It is possible to enable and disable the collapsing of individual children; see setCollapsible().
Set this property's value with setChildrenCollapsible() and get this property's value with childrenCollapsible().
This property holds the width of the splitter handle.
Set this property's value with setHandleWidth() and get this property's value with handleWidth().
This property holds whether resizing is opaque.
Opaque resizing is off by default.
Set this property's value with setOpaqueResize() and get this property's value with opaqueResize().
This property holds the orientation of the splitter.
By default the orientation is horizontal (the widgets are side by side). The possible orientations are Horizontal and Vertical.
Set this property's value with setOrientation() and get this property's value with orientation().
Writes the sizes and the hidden state of the widgets in the splitter splitter to the text stream ts.
See also operator>>(), sizes(), and TQWidget::hidden.
Reads the sizes and the hidden state of the widgets in the splitter splitter from the text stream ts. The sizes must have been previously written by the operator<<() function.
See also operator<<(), setSizes(), and TQWidget::hide().
This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.
Copyright © 2007 Trolltech | Trademarks | TQt 3.3.8
|