Splitter Class Reference
A special splitter that lacks many of the features of QSplitter, but has some other features we need: One can replace one widget by another, add widgets at an arbitrary position in the chain, and the user can resize the widgets by moving a SplitterBar (which is much easier to grab than a QSplitterHandle) around. More...
#include <splitter.h>
Inheritance diagram for Splitter:


Signals | |
void | collapsed (Splitter *splitter) |
Public Member Functions | |
Splitter (QWidget *parent=0, const char *name=0) | |
~Splitter () | |
void | setOrientation (Orientation orient) |
Orientation | orientation () const |
bool | hasMultipleChildren () const |
Returns true if there is more than one child. | |
QWidget * | firstChild () |
Returns the first child. | |
void | addChild (QWidget *w) |
Adds the widget w to the list of managed children. | |
void | splitChild (QWidget *old, QWidget *w) |
Splits the space covered by old into two halves and embeds the widget w into the second. | |
void | replaceChild (QWidget *old, QWidget *w) |
Puts the widget w into the space formerly covered by old. | |
void | moveSplitter (QWidget *w, int pos) |
Moves the splitter after widget w to the vertical offset pos. | |
Protected Member Functions | |
virtual QSize | minimumSizeHint () const |
virtual void | childEvent (QChildEvent *e) |
virtual void | resizeEvent (QResizeEvent *e) |
Private Slots | |
void | collapse () |
Private Member Functions | |
void | doLayout () |
int | handleWidth () const |
Private Attributes | |
QPtrList< QWidget > | childlist |
QPtrList< SplitterHandle > | handlelist |
QValueList< int > | sizes |
Orientation | _or |
Detailed Description
A special splitter that lacks many of the features of QSplitter, but has some other features we need: One can replace one widget by another, add widgets at an arbitrary position in the chain, and the user can resize the widgets by moving a SplitterBar (which is much easier to grab than a QSplitterHandle) around.Because of these features, widgets are not automatically embedded by using the splitter as parent.
Definition at line 39 of file splitter.h.
Constructor & Destructor Documentation
|
Definition at line 29 of file splitter.cpp. References _or, and handlelist. |
|
Definition at line 38 of file splitter.cpp. |
Member Function Documentation
|
Adds the widget w to the list of managed children.
Definition at line 89 of file splitter.cpp. References childlist, doLayout(), handlelist, kdDebug(), orientation(), and splitChild(). |
|
Definition at line 237 of file splitter.cpp. References childlist, collapse(), doLayout(), handlelist, orientation(), and sizes. |
|
Definition at line 262 of file splitter.cpp. References collapsed(). Referenced by childEvent(). |
|
Referenced by collapse(). |
|
Definition at line 182 of file splitter.cpp. References childlist, handlelist, orientation(), and sizes. Referenced by addChild(), childEvent(), moveSplitter(), replaceChild(), resizeEvent(), setOrientation(), and splitChild(). |
|
Returns the first child. This is useful for destroying the splitter when the number of children has gone down to one. See TopLevel::eventFilter(). Definition at line 77 of file splitter.cpp. References childlist. |
|
Definition at line 83 of file splitter.cpp. References orientation(). Referenced by moveSplitter(), and splitChild(). |
|
Returns true if there is more than one child.
Definition at line 71 of file splitter.cpp. References childlist. Referenced by setOrientation(). |
|
Definition at line 224 of file splitter.cpp. References childlist, and orientation(). |
|
Moves the splitter after widget w to the vertical offset pos.
Definition at line 164 of file splitter.cpp. References childlist, doLayout(), handleWidth(), and sizes. |
|
Definition at line 65 of file splitter.cpp. Referenced by addChild(), childEvent(), doLayout(), handleWidth(), minimumSizeHint(), replaceChild(), and splitChild(). |
|
Puts the widget w into the space formerly covered by old. old is not destroyed. Note: w must have the splitter as parent. Definition at line 144 of file splitter.cpp. References childlist, doLayout(), handlelist, kdDebug(), and orientation(). |
|
Definition at line 268 of file splitter.cpp. References doLayout(). |
|
Definition at line 42 of file splitter.cpp. References _or, childlist, doLayout(), handlelist, hasMultipleChildren(), and kdDebug(). |
|
Splits the space covered by old into two halves and embeds the widget w into the second. Note: w must have the splitter as parent. Definition at line 109 of file splitter.cpp. References childlist, doLayout(), handlelist, handleWidth(), kdDebug(), orientation(), and sizes. Referenced by addChild(). |
Member Data Documentation
|
Definition at line 101 of file splitter.h. Referenced by setOrientation(), and Splitter(). |
|
Definition at line 98 of file splitter.h. Referenced by addChild(), childEvent(), doLayout(), firstChild(), hasMultipleChildren(), minimumSizeHint(), moveSplitter(), replaceChild(), setOrientation(), and splitChild(). |
|
Definition at line 99 of file splitter.h. Referenced by addChild(), childEvent(), doLayout(), replaceChild(), setOrientation(), splitChild(), and Splitter(). |
|
Definition at line 100 of file splitter.h. Referenced by childEvent(), doLayout(), moveSplitter(), and splitChild(). |
The documentation for this class was generated from the following files:
- lib/util/splitter.h
- lib/util/splitter.cpp