• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

Konsole::ViewSplitter

Konsole::ViewSplitter Class Reference

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. More...

#include <ViewSplitter.h>

Inheritance diagram for Konsole::ViewSplitter:

Inheritance graph
[legend]

List of all members.


Signals

void allContainersEmpty ()
void empty (ViewSplitter *splitter)

Public Member Functions

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)
 ViewSplitter (QWidget *parent=0)

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

ViewSplitter::ViewSplitter ( QWidget *  parent = 0  ) 

Definition at line 36 of file ViewSplitter.cpp.


Member Function Documentation

void ViewSplitter::activateNextContainer (  ) 

Gives the focus to the active view in the next container.

Definition at line 206 of file ViewSplitter.cpp.

void ViewSplitter::activatePreviousContainer (  ) 

Gives the focus to the active view in the previous container.

Definition at line 223 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 246 of file ViewSplitter.cpp.

ViewSplitter * ViewSplitter::activeSplitter (  ) 

Returns the child ViewSplitter widget which currently has the focus.

Definition at line 74 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 139 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 50 of file ViewSplitter.cpp.

void Konsole::ViewSplitter::allContainersEmpty (  )  [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)

QList<ViewContainer*> Konsole::ViewSplitter::containers (  )  const [inline]

Returns a list of the containers held by this splitter.

Definition at line 98 of file ViewSplitter.h.

void Konsole::ViewSplitter::empty ( ViewSplitter *  splitter  )  [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.

See setRecursiveSplitting()

Definition at line 127 of file ViewSplitter.cpp.

void ViewSplitter::removeContainer ( ViewContainer *  container  ) 

Removes a container from the splitter.

The container is not deleted.

Definition at line 132 of file ViewSplitter.cpp.

void ViewSplitter::setActiveContainer ( ViewContainer *  container  ) 

Gives the focus to the active view in the specified container.

Definition at line 238 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 123 of file ViewSplitter.cpp.


The documentation for this class was generated from the following files:
  • ViewSplitter.h
  • ViewSplitter.cpp

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal