Konsole
#include <ViewSplitter.h>
Signals | |
void | allContainersEmpty () |
void | empty (ViewSplitter *splitter) |
Public Member Functions | |
ViewSplitter (QWidget *parent=0) | |
void | activateNextContainer () |
void | activatePreviousContainer () |
ViewContainer * | activeContainer () const |
ViewSplitter * | activeSplitter () |
void | addContainer (ViewContainer *container, Qt::Orientation orientation) |
void | adjustContainerSize (ViewContainer *container, int percentage) |
QList< ViewContainer * > | containers () const |
bool | recursiveSplitting () const |
void | removeContainer (ViewContainer *container) |
void | setActiveContainer (ViewContainer *container) |
void | setRecursiveSplitting (bool recursive) |
Detailed Description
A splitter which holds a number of ViewContainer objects and allows the user to control the size of each view container by dragging a splitter bar between them.
Each splitter can also contain child ViewSplitter widgets, allowing for a hierarchy of view splitters and containers.
The addContainer() method is used to split the existing view and insert a new view container. Containers can only be removed from the hierarchy by deleting them.
Definition at line 47 of file ViewSplitter.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 33 of file ViewSplitter.cpp.
Member Function Documentation
void ViewSplitter::activateNextContainer | ( | ) |
Gives the focus to the active view in the next container.
Definition at line 190 of file ViewSplitter.cpp.
void ViewSplitter::activatePreviousContainer | ( | ) |
Gives the focus to the active view in the previous container.
Definition at line 207 of file ViewSplitter.cpp.
ViewContainer * ViewSplitter::activeContainer | ( | ) | const |
Returns the container which currently has the focus or 0 if none of the immediate child containers have the focus.
This does not search through child splitters. activeSplitter() can be used to search recursively through child splitters for the splitter which currently has the focus.
To find the currently active container, use mySplitter->activeSplitter()->activeContainer() where mySplitter is the ViewSplitter widget at the top of the hierarchy.
Definition at line 229 of file ViewSplitter.cpp.
ViewSplitter * ViewSplitter::activeSplitter | ( | ) |
Returns the child ViewSplitter widget which currently has the focus.
Definition at line 70 of file ViewSplitter.cpp.
void ViewSplitter::addContainer | ( | ViewContainer * | container, |
Qt::Orientation | orientation | ||
) |
Locates the child ViewSplitter widget which currently has the focus and inserts the container into it.
- Parameters
-
container The container to insert orientation Specifies whether the view should be split horizontally or vertically. If the orientation is the same as the ViewSplitter into which the container is to be inserted, or if the splitter has fewer than two child widgets then the container will be added to that splitter. If the orientation is different, then a new child splitter will be created, into which the container will be inserted.
Definition at line 131 of file ViewSplitter.cpp.
void ViewSplitter::adjustContainerSize | ( | ViewContainer * | container, |
int | percentage | ||
) |
Changes the size of the specified container
by a given percentage
.
percentage
may be positive ( in which case the size of the container is increased ) or negative ( in which case the size of the container is decreased ).
The sizes of the remaining containers are increased or decreased uniformly to maintain the width of the splitter.
Definition at line 47 of file ViewSplitter.cpp.
|
signal |
Signal emitted when the containers held by this splitter become empty, this differs from the empty() signal which is only emitted when all of the containers are deleted.
This signal is emitted even if there are still container widgets.
TODO: This does not yet work recursively (ie. when splitters inside splitters have empty containers)
|
inline |
Returns a list of the containers held by this splitter.
Definition at line 98 of file ViewSplitter.h.
|
signal |
Signal emitted when the last child widget is removed from the splitter.
bool ViewSplitter::recursiveSplitting | ( | ) | const |
Returns whether the view may be split recursively.
Definition at line 119 of file ViewSplitter.cpp.
void ViewSplitter::removeContainer | ( | ViewContainer * | container | ) |
Removes a container from the splitter.
The container is not deleted.
Definition at line 124 of file ViewSplitter.cpp.
void ViewSplitter::setActiveContainer | ( | ViewContainer * | container | ) |
Gives the focus to the active view in the specified container.
Definition at line 221 of file ViewSplitter.cpp.
void ViewSplitter::setRecursiveSplitting | ( | bool | recursive | ) |
Specifies whether the view may be split recursively.
If this is false, all containers will be placed into the same top-level splitter. Adding a container with an orientation which is different to that specified when adding the previous containers will change the orientation for all dividers between containers.
If this is true, adding a container to the view splitter with an orientation different to the orientation of the previous area will result in the previously active container being replaced with a new splitter containing the active container and the newly added container.
Definition at line 115 of file ViewSplitter.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.