KDE3Support
#include <k3dockwidget_private.h>

Public Member Functions | |
K3DockSplitter (QWidget *parent=0, const char *name=0, Qt::Orientation orient=Qt::Vertical, int pos=50) | |
virtual | ~K3DockSplitter () |
void | activate (QWidget *c0, QWidget *c1=0L) |
void | deactivate () |
virtual bool | event (QEvent *) |
virtual bool | eventFilter (QObject *, QEvent *) |
QWidget * | getAnother (QWidget *w) const |
QWidget * | getFirst () const |
QWidget * | getLast () const |
bool | keepSize () const |
bool | opaqueResize () const |
Qt::Orientation | orientation () |
void | restoreFromForcedFixedSize (K3DockWidget *dw) |
int | separatorPos () const |
int | separatorPosInPercent () |
void | setForcedFixedHeight (K3DockWidget *dw, int h) |
void | setForcedFixedWidth (K3DockWidget *dw, int w) |
void | setKeepSize (bool b=true) |
void | setOpaqueResize (bool b=true) |
void | setSeparatorPos (int pos, bool do_resize=true) |
void | setSeparatorPosInPercent (int percent) |
void | setSeparatorPosX (int pos, bool do_resize=false) |
void | updateName () |
Protected Member Functions | |
int | checkValue (int position) const |
int | checkValueOverlapped (int position, QWidget *child) const |
virtual void | resizeEvent (QResizeEvent *ev) |
Detailed Description
Like QSplitter but specially designed for dockwidgets stuff.
Definition at line 49 of file k3dockwidget_private.h.
Constructor & Destructor Documentation
◆ K3DockSplitter()
K3DockSplitter::K3DockSplitter | ( | QWidget * | parent = 0 , |
const char * | name = 0 , |
||
Qt::Orientation | orient = Qt::Vertical , |
||
int | pos = 50 |
||
) |
Constructor.
- Parameters
-
parent parent widget name name orient orientation. Either Vertical
orHorizontal
pos procentual position of the splitter. Must be int [0...100].
Definition at line 33 of file k3dockwidget_private.cpp.
◆ ~K3DockSplitter()
|
inlinevirtual |
Definition at line 65 of file k3dockwidget_private.h.
Member Function Documentation
◆ activate()
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
Definition at line 52 of file k3dockwidget_private.cpp.
◆ checkValue()
|
protected |
Make sure the splitter position is not out of bounds.
- Parameters
-
position the current position
- Returns
- a (new) valid splitter position.
Definition at line 467 of file k3dockwidget_private.cpp.
◆ checkValueOverlapped()
|
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.
Definition at line 443 of file k3dockwidget_private.cpp.
◆ deactivate()
void K3DockSplitter::deactivate | ( | ) |
Disables the splitter.
Definition at line 205 of file k3dockwidget_private.cpp.
◆ event()
|
virtual |
Definition at line 568 of file k3dockwidget_private.cpp.
◆ eventFilter()
The eventfilter installed on the divider
processes all splitter resizing events.
Definition at line 493 of file k3dockwidget_private.cpp.
◆ getAnother()
If w
is child0, return child1, otherwise child0.
- Returns
- the other child widget
Definition at line 579 of file k3dockwidget_private.cpp.
◆ getFirst()
|
inline |
- Returns
- the top/left child widget.
Definition at line 129 of file k3dockwidget_private.h.
◆ getLast()
|
inline |
- Returns
- the bottom/right child widget.
Definition at line 133 of file k3dockwidget_private.h.
◆ keepSize()
bool K3DockSplitter::keepSize | ( | ) | const |
Definition at line 617 of file k3dockwidget_private.cpp.
◆ opaqueResize()
bool K3DockSplitter::opaqueResize | ( | ) | const |
Definition at line 607 of file k3dockwidget_private.cpp.
◆ orientation()
|
inline |
The orientation is either Horizontal
or Vertical
.
Definition at line 164 of file k3dockwidget_private.h.
◆ resizeEvent()
|
protectedvirtual |
The resize event resizes child0
, child1
and the divider
.
The new sizes are dependent on
- whether
child0
orchild1
is a K3DockContainer - 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).
Definition at line 240 of file k3dockwidget_private.cpp.
◆ restoreFromForcedFixedSize()
void K3DockSplitter::restoreFromForcedFixedSize | ( | K3DockWidget * | dw | ) |
Definition at line 155 of file k3dockwidget_private.cpp.
◆ separatorPos()
int K3DockSplitter::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%.
Definition at line 235 of file k3dockwidget_private.cpp.
◆ separatorPosInPercent()
int K3DockSplitter::separatorPosInPercent | ( | ) |
Return the separator position in percent (%), so the range is [0..100].
- Returns
- separator position in percent
Definition at line 212 of file k3dockwidget_private.cpp.
◆ setForcedFixedHeight()
void K3DockSplitter::setForcedFixedHeight | ( | K3DockWidget * | dw, |
int | h | ||
) |
Definition at line 133 of file k3dockwidget_private.cpp.
◆ setForcedFixedWidth()
void K3DockSplitter::setForcedFixedWidth | ( | K3DockWidget * | dw, |
int | w | ||
) |
Definition at line 111 of file k3dockwidget_private.cpp.
◆ setKeepSize()
void K3DockSplitter::setKeepSize | ( | bool | b = true | ) |
If b
is true, the splitter will keep its size on resize events.
If no K3DockContainer
is around, always the left child0 will be fixed size.
Definition at line 612 of file k3dockwidget_private.cpp.
◆ setOpaqueResize()
void K3DockSplitter::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.
Definition at line 602 of file k3dockwidget_private.cpp.
◆ setSeparatorPos()
void K3DockSplitter::setSeparatorPos | ( | int | pos, |
bool | do_resize = true |
||
) |
set separator position.
- Parameters
-
pos the separator position in range [0..100000]. 100000 is 100%. do_resize if this is true, then a resize event is generated. This may cause the size to change.
Definition at line 222 of file k3dockwidget_private.cpp.
◆ setSeparatorPosInPercent()
void K3DockSplitter::setSeparatorPosInPercent | ( | int | percent | ) |
Set the separator position in percent (%), so the range must be [0..100].
- Parameters
-
percent separator position in percent
Definition at line 217 of file k3dockwidget_private.cpp.
◆ setSeparatorPosX()
void K3DockSplitter::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.
Definition at line 229 of file k3dockwidget_private.cpp.
◆ updateName()
void K3DockSplitter::updateName | ( | ) |
Definition at line 584 of file k3dockwidget_private.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.