#include <ksplitter.h>
Like TQSplitter but specially designed for dockwidgets stuff.
Definition at line 46 of file ksplitter.h.
◆ KDockSplitter()
| KDockSplitter::KDockSplitter |
( |
TQWidget * | parent = 0, |
|
|
const char * | name = 0, |
|
|
TQt::Orientation | orient = TQt::Vertical, |
|
|
int | pos = 50 ) |
Constructor.
- Parameters
-
| parent | parent widget |
| name | name |
| orient | orientation. Either TQt::Vertical or TQt::Horizontal |
| pos | procentual position of the splitter. Must be int [0...100]. |
◆ ~KDockSplitter()
| virtual KDockSplitter::~KDockSplitter |
( |
| ) |
|
|
inlinevirtual |
◆ activate()
| void KDockSplitter::activate |
( |
TQWidget * | c0, |
|
|
TQWidget * | c1 = 0L ) |
Initialize the splitter.
If c0 or c1 is 0L the child will not be replaced. So if you want to change c1 and not change c0, you'd call activate(0L,new_widget);
- Parameters
-
| c0 | the widget on top/left |
| c1 | the widget on borrom/right |
◆ checkValue()
| int KDockSplitter::checkValue |
( |
int | position | ) |
const |
|
protected |
Make sure the splitter position is not out of bounds.
- Parameters
-
| position | the current position |
- Returns
- a (new) valid splitter position.
◆ checkValueOverlapped()
| int KDockSplitter::checkValueOverlapped |
( |
int | position, |
|
|
TQWidget * | child ) const |
|
protected |
Make sure the splitter position is not out of bounds.
It has to honor all child widgets' mimimumSize. - Parameters
-
| position | current divider position |
| child | the overlapping child |
- Returns
- the (new) splitter position.
◆ deactivate()
| void KDockSplitter::deactivate |
( |
| ) |
|
◆ eventFilter()
| virtual bool KDockSplitter::eventFilter |
( |
TQObject * | , |
|
|
TQEvent * | ) |
|
virtual |
The eventfilter installed on the divider processes all splitter resizing events.
◆ getAnother()
| TQWidget * KDockSplitter::getAnother |
( |
TQWidget * | w | ) |
const |
If w is child0, return child1, otherwise child0.
- Returns
- the other child widget
◆ getFirst()
| TQWidget * KDockSplitter::getFirst |
( |
| ) |
const |
|
inline |
- Returns
- the top/left child widget.
Definition at line 122 of file ksplitter.h.
◆ getLast()
| TQWidget * KDockSplitter::getLast |
( |
| ) |
const |
|
inline |
- Returns
- the bottom/right child widget.
Definition at line 126 of file ksplitter.h.
◆ orientation()
| TQt::Orientation KDockSplitter::orientation |
( |
| ) |
|
|
inline |
The orientation is either TQt::Horizontal or TQt::Vertical.
Definition at line 157 of file ksplitter.h.
◆ resizeEvent()
| virtual void KDockSplitter::resizeEvent |
( |
TQResizeEvent * | ev | ) |
|
|
protectedvirtual |
The resize event resizes child0, child1 and the divider.
The new sizes are dependant of
- whether
child0 or child1 is a KDockContainer
- the current mode which may be
- Closed
- Overlapped (opened)
- Nonoverlap (opened)
So there are 3*2=6 different modes we have to face. - Parameters
-
| ev | the resize Event. If ev=0L the user changed the mode (for example from overlap to nonoverlap mode). |
◆ separatorPos()
| int KDockSplitter::separatorPos |
( |
| ) |
const |
Return the separator position in the range [0..100000] To get the separator position in procent (%), call separatorPositionInPercent()!
- Returns
- high resolution separator position in range [0..100000], where 100000 is 100%.
◆ separatorPosInPercent()
| int KDockSplitter::separatorPosInPercent |
( |
| ) |
|
Return the separator position in percent (%), so the range is [0..100].
- Returns
- separator position in percent
◆ setKeepSize()
| void KDockSplitter::setKeepSize |
( |
bool | b = true | ) |
|
If b is true, the splitter will keep its size on resize events.
If no KDockContainer is around, always the left child0 will be fixed size.
◆ setOpaqueResize()
| void KDockSplitter::setOpaqueResize |
( |
bool | b = true | ) |
|
Set opaque flag.
- Parameters
-
| b | if true, both child widgets are resized immediately, if false, the widgets only resize on MouseUpEvent. |
◆ setSeparatorPos()
| void KDockSplitter::setSeparatorPos |
( |
int | pos, |
|
|
bool | do_resize = true ) |
set separator position.
- Parameters
-
| pos | the separator position in range [0..100000]. 100000 is 100%. |
| do_resize | true by default |
◆ setSeparatorPosInPercent()
| void KDockSplitter::setSeparatorPosInPercent |
( |
int | percent | ) |
|
Set the separator position in percent (%), so the range must be [0..100].
- Parameters
-
| percent | separator position in percent |
◆ setSeparatorPosX()
| void KDockSplitter::setSeparatorPosX |
( |
int | pos, |
|
|
bool | do_resize = false ) |
For usage from outside.
If the splitter is in fixed position when called, the value of pos will be saved and used when the splitter is restored. If do_resize is true, the size will be changed unless the splitter is in fixed mode.
◆ KDockContainer
| friend class KDockContainer |
|
friend |
The documentation for this class was generated from the following file:
|