#include </home/clem/local/src/opie/libqtaux/qsplitter.h>
Collaboration diagram for QSplitter:

Public Types | |
| enum | ResizeMode { Stretch, KeepSize, FollowSizeHint } |
Public Member Functions | |
| QSplitter (QWidget *parent=0, const char *name=0) | |
| QSplitter (Orientation, QWidget *parent=0, const char *name=0) | |
| ~QSplitter () | |
| virtual void | setOrientation (Orientation) |
| Orientation | orientation () const |
| virtual void | setResizeMode (QWidget *w, ResizeMode) |
| virtual void | setOpaqueResize (bool=TRUE) |
| bool | opaqueResize () const |
| void | moveToFirst (QWidget *) |
| void | moveToLast (QWidget *) |
| void | refresh () |
| QSize | sizeHint () const |
| QSize | minimumSizeHint () const |
| QSizePolicy | sizePolicy () const |
| QValueList< int > | sizes () const |
| void | setSizes (QValueList< int >) |
Protected Member Functions | |
| void | childEvent (QChildEvent *) |
| bool | event (QEvent *) |
| void | resizeEvent (QResizeEvent *) |
| int | idAfter (QWidget *) const |
| void | moveSplitter (QCOORD pos, int id) |
| virtual void | drawSplitter (QPainter *, QCOORD x, QCOORD y, QCOORD w, QCOORD h) |
| void | styleChange (QStyle &) |
| int | adjustPos (int, int) |
| virtual void | setRubberband (int) |
| void | getRange (int id, int *, int *) |
Properties | |
| Orientation | orientation |
Private Member Functions | |
| void | init () |
| void | recalc (bool update=FALSE) |
| void | doResize () |
| void | storeSizes () |
| void | processChildEvents () |
| QSplitterLayoutStruct * | addWidget (QWidget *, bool first=FALSE) |
| void | recalcId () |
| void | moveBefore (int pos, int id, bool upLeft) |
| void | moveAfter (int pos, int id, bool upLeft) |
| void | setG (QWidget *w, int p, int s) |
| QCOORD | pick (const QPoint &p) const |
| QCOORD | pick (const QSize &s) const |
| QCOORD | trans (const QPoint &p) const |
| QCOORD | trans (const QSize &s) const |
Private Attributes | |
| QSplitterData * | data |
| Orientation | orient |
Friends | |
| class | QSplitterHandle |
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.
To show a QListBox, a QListView and a QMultiLineEdit side by side:
QSplitter *split = new QSplitter( parent ); QListBox *lb = new QListBox( split ); QListView *lv = new QListView( split ); QMultiLineEdit *ed = new QMultiLineEdit( split );
In QSplitter the boundary can be either horizontal or vertical. The default is horizontal (the children are side by side) and you can use setOrientation( QSplitter::Vertical ) to set it to vertical.
By default, all widgets can be as large or as small as the user wishes, down to minimumSizeHint(). You can naturally use setMinimumSize() and/or setMaximumSize() on the children. Use setResizeMode() to specify that a widget should keep its size when the splitter is resized.
QSplitter normally resizes the children only at the end of a resize operation, but 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. When you show() it again, it will be reinstated.
Definition at line 49 of file qsplitter.h.
|
|
This enum type describes how QSplitter will resize each of its child widgets. The currently defined values are:
Definition at line 55 of file qsplitter.h. |
|
||||||||||||
|
Constructs a horizontal splitter. Definition at line 233 of file qsplitter.cpp. |
|
||||||||||||||||
|
Constructs splitter with orientation o. Definition at line 245 of file qsplitter.cpp. |
|
|
Destructs the splitter. Definition at line 257 of file qsplitter.cpp. References data, QSplitterData::list, and TRUE. |
|
||||||||||||
|
Inserts the widget w at the end, or at the beginning if first is TRUE It is the responsibility of the caller of this function to make sure that w is not already in the splitter, and to call recalcId if needed. (If first is TRUE, then recalcId is very probably needed.) Definition at line 334 of file qsplitter.cpp. References data, FALSE, QSplitterLayoutStruct::isSplitter, KeepSize, QSplitterData::list, QSplitterLayoutStruct::mode, orientation(), pick(), QSplitterHandle, s, QSplitterHandle::setId(), QSplitterHandle::sizeHint(), QSplitterLayoutStruct::sizer, Stretch, TRUE, and QSplitterLayoutStruct::wid. Referenced by childEvent(), moveToFirst(), moveToLast(), and setResizeMode(). |
|
||||||||||||
|
Returns the legal position closest to p of the splitter with id id.
Definition at line 654 of file qsplitter.cpp. References getRange(), max, and min. Referenced by moveSplitter(). |
|
|
Tells the splitter that a child widget has been inserted/removed. Definition at line 373 of file qsplitter.cpp. References addWidget(), data, doResize(), QSplitterLayoutStruct::isSplitter, QSplitterData::list, p, recalc(), recalcId(), s, and QSplitterLayoutStruct::wid. |
|
|
Definition at line 665 of file qsplitter.cpp. References data, FALSE, FollowSizeHint, i, QSplitterLayoutStruct::isSplitter, KeepSize, QSplitterData::list, minSize(), QSplitterLayoutStruct::mode, orient, pick(), pos, qGeomCalc(), s, QSplitterLayoutStruct::sizer, and QSplitterLayoutStruct::wid. Referenced by childEvent(), recalc(), resizeEvent(), setSizes(), and styleChange(). |
|
||||||||||||||||||||||||
|
Draws the splitter handle in the rectangle described by x, y, w, h using painter p.
Definition at line 466 of file qsplitter.cpp. References orient. Referenced by QSplitterHandle::paintEvent(). |
|
|
Definition at line 449 of file qsplitter.cpp. References data, FALSE, QSplitterData::firstShow, and recalc(). |
|
||||||||||||||||
|
Returns the valid range of the splitter with id id in min and max.
Definition at line 605 of file qsplitter.cpp. References data, i, QSplitterLayoutStruct::isSplitter, QSplitterData::list, minSize(), pick(), s, QSplitterLayoutStruct::sizer, and QSplitterLayoutStruct::wid. Referenced by adjustPos(), and QSplitterHandle::mouseMoveEvent(). |
|
|
Returns the id of the splitter to the right of or below the widget w, or 0 if there is no such splitter. (ie. it is either not in this QSplitter, or it is at the end). Definition at line 479 of file qsplitter.cpp. References data, FALSE, QSplitterLayoutStruct::isSplitter, QSplitterData::list, s, TRUE, and QSplitterLayoutStruct::wid. |
|
|
Definition at line 264 of file qsplitter.cpp. Referenced by QSplitter(). |
|
|
Definition at line 942 of file qsplitter.cpp. References l, minSize(), o, orientation(), pick(), s, t, and trans(). |
|
||||||||||||||||
|
Places the left/top edge of the widget at id at position pos.
Definition at line 566 of file qsplitter.cpp. References data, QSplitterLayoutStruct::isSplitter, QSplitterData::list, minSize(), pick(), s, setG(), QSplitterLayoutStruct::sizer, and QSplitterLayoutStruct::wid. Referenced by moveSplitter(). |
|
||||||||||||||||
|
Places the right/bottom edge of the widget at id at position pos.
Definition at line 531 of file qsplitter.cpp. References data, QSplitterLayoutStruct::isSplitter, QSplitterData::list, minSize(), pick(), s, setG(), QSplitterLayoutStruct::sizer, and QSplitterLayoutStruct::wid. Referenced by moveSplitter(). |
|
||||||||||||
|
Moves the left/top edge of the splitter handle with id id as close as possible to p which is the distance from the left (or top) edge of the widget.
Definition at line 501 of file qsplitter.cpp. References adjustPos(), data, QSplitterData::list, moveAfter(), moveBefore(), orient, s, storeSizes(), and QSplitterLayoutStruct::wid. Referenced by QSplitterHandle::mouseMoveEvent(), and QSplitterHandle::mouseReleaseEvent(). |
|
|
Moves w to the leftmost/top position. Definition at line 845 of file qsplitter.cpp. References addWidget(), data, FALSE, QSplitterData::list, p, processChildEvents(), recalcId(), s, TRUE, and QSplitterLayoutStruct::wid. |
|
|
Moves w to the rightmost/bottom position. Definition at line 874 of file qsplitter.cpp. References addWidget(), data, FALSE, QSplitterData::list, p, processChildEvents(), recalcId(), s, TRUE, and QSplitterLayoutStruct::wid. |
|
|
Returns TRUE if opaque resize is on, FALSE otherwise.
Definition at line 823 of file qsplitter.cpp. References data, and QSplitterData::opaque. Referenced by QSplitterHandle::opaque(). |
|
|
Definition at line 62 of file qsplitter.h. Referenced by addWidget(), minimumSizeHint(), and sizeHint(). |
|
|
Definition at line 109 of file qsplitter.h. |
|
|
Definition at line 107 of file qsplitter.h. Referenced by addWidget(), doResize(), getRange(), minimumSizeHint(), QSplitterHandle::mouseMoveEvent(), QSplitterHandle::mousePressEvent(), QSplitterHandle::mouseReleaseEvent(), moveAfter(), moveBefore(), recalc(), sizeHint(), and storeSizes(). |
|
|
Gets all posted child events, ensuring that the internal state of the splitter is consistent with the programmer's idea. Definition at line 1102 of file qsplitter.cpp. Referenced by moveToFirst(), moveToLast(), setResizeMode(), and setSizes(). |
|
|
Definition at line 713 of file qsplitter.cpp. References data, doResize(), empty, FALSE, i, QSplitterLayoutStruct::isSplitter, QSplitterData::list, minSize(), orient, p, pick(), s, QSplitterLayoutStruct::sizer, trans(), TRUE, and QSplitterLayoutStruct::wid. Referenced by childEvent(), event(), and setOrientation(). |
|
|
Definition at line 899 of file qsplitter.cpp. References data, i, QSplitterLayoutStruct::isSplitter, QSplitterData::list, s, and QSplitterLayoutStruct::wid. Referenced by childEvent(), moveToFirst(), and moveToLast(). |
|
|
Updates the splitter state. You should not need to call this function during normal use of the splitter. Definition at line 71 of file qsplitter.h. References TRUE. |
|
|
Definition at line 319 of file qsplitter.cpp. References doResize(). |
|
||||||||||||||||
|
Definition at line 516 of file qsplitter.cpp. References height, orient, width, Opie::MM::x, and Opie::MM::y. Referenced by moveAfter(), and moveBefore(). |
|
|
Sets opaque resize to on. Opaque resize is initially turned off.
Definition at line 835 of file qsplitter.cpp. References data, and QSplitterData::opaque. |
|
|
Sets the orientation to o. By default the orientation is horizontal (the widgets are side by side).
Definition at line 288 of file qsplitter.cpp. References data, QSplitterLayoutStruct::isSplitter, QSplitterData::list, orient, recalc(), s, and QSplitterLayoutStruct::wid. Referenced by ConfigMainWindow::ConfigMainWindow(). |
|
||||||||||||
|
Sets resize mode of w to mode.
Definition at line 801 of file qsplitter.cpp. References addWidget(), data, QSplitterData::list, QSplitterLayoutStruct::mode, processChildEvents(), s, TRUE, and QSplitterLayoutStruct::wid. Referenced by OJanusWidget::setTreeListAutoResize(), and OJanusWidget::showEvent(). |
|
|
Shows a rubber band at position p. If p is negative, the rubber band is removed. Definition at line 421 of file qsplitter.cpp. References opaqueOldPos, and orient. Referenced by QSplitterHandle::mouseMoveEvent(), and QSplitterHandle::mouseReleaseEvent(). |
|
|
Sets the size parameters to the values given in list. If the splitter is horizontal, the values set the sizes from left to right. If it is vertical, the sizes are applied from top to bottom. Extra values in list are ignored. If list contains too few values, the result is undefined but the program will still be well-behaved.
Definition at line 1081 of file qsplitter.cpp. References QValueList< T >::begin(), data, doResize(), QValueList< T >::end(), QSplitterLayoutStruct::isSplitter, QSplitterData::list, processChildEvents(), s, and QSplitterLayoutStruct::sizer. |
|
|
Definition at line 912 of file qsplitter.cpp. |
|
|
Definition at line 971 of file qsplitter.cpp. |
|
|
Returns a list of the size parameters of all the widgets in this splitter. Giving the values to setSizes() will give a splitter with the same layout as this one.
Definition at line 1050 of file qsplitter.cpp. References QValueList< T >::append(), data, QSplitterData::list, list, and s. |
|
|
Calculates stretch parameters from current sizes Definition at line 981 of file qsplitter.cpp. References data, QSplitterLayoutStruct::isSplitter, QSplitterData::list, pick(), s, QSplitterLayoutStruct::sizer, and QSplitterLayoutStruct::wid. Referenced by moveSplitter(). |
|
|
Definition at line 1112 of file qsplitter.cpp. References data, doResize(), QSplitterLayoutStruct::isSplitter, QSplitterData::list, s, and QSplitterLayoutStruct::sizer. |
|
|
Definition at line 114 of file qsplitter.h. |
|
|
Definition at line 112 of file qsplitter.h. Referenced by minimumSizeHint(), recalc(), and sizeHint(). |
|
|
Definition at line 120 of file qsplitter.h. Referenced by addWidget(). |
|
|
Definition at line 117 of file qsplitter.h. Referenced by addWidget(), childEvent(), doResize(), event(), getRange(), idAfter(), init(), moveAfter(), moveBefore(), moveSplitter(), moveToFirst(), moveToLast(), opaqueResize(), recalc(), recalcId(), setOpaqueResize(), setOrientation(), setResizeMode(), setSizes(), sizes(), storeSizes(), styleChange(), and ~QSplitter(). |
|
|
Definition at line 119 of file qsplitter.h. Referenced by doResize(), drawSplitter(), init(), moveSplitter(), QSplitter(), recalc(), setG(), setOrientation(), and setRubberband(). |
|
|
Returns the orientation (
Definition at line 51 of file qsplitter.h. |
1.4.2