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

libplasma

Plasma::BoxLayout

Plasma::BoxLayout Class Reference

#include <boxlayout.h>

Inheritance diagram for Plasma::BoxLayout:

Inheritance graph
[legend]

List of all members.


Detailed Description

The BoxLayout class lays out items in a horizontal or vertical line.

Definition at line 36 of file boxlayout.h.


Public Types

enum  Direction { LeftToRight, RightToLeft, TopToBottom, BottomToTop }

Public Member Functions

 BoxLayout (Direction direction, LayoutItem *parent=0)
 ~BoxLayout ()
void setDirection (Direction direction)
Direction direction () const
void insertItem (int index, LayoutItem *l)
void setMultiRow (bool b)
virtual void addItem (LayoutItem *l)
virtual void removeItem (LayoutItem *l)
virtual int indexOf (LayoutItem *l) const
virtual LayoutItem * itemAt (int i) const
virtual LayoutItem * takeAt (int i)
virtual Qt::Orientations expandingDirections () const
virtual int count () const
virtual void setAnimator (LayoutAnimator *animator)
virtual QSizeF minimumSize () const
virtual QSizeF maximumSize () const
virtual QSizeF sizeHint () const

Protected Member Functions

void relayout ()

Member Enumeration Documentation

enum Plasma::BoxLayout::Direction

This enum describes the directions in which items can be laid out.

Enumerator:
LeftToRight  Lay items out horizontally, from left to right.

RightToLeft  Lay items out horizontally, from right to left.

TopToBottom  Lay items out vertically, from top to bottom.

BottomToTop  Lay items out vertically, from bottom to top.

Definition at line 43 of file boxlayout.h.


Constructor & Destructor Documentation

Plasma::BoxLayout::BoxLayout ( Direction  direction,
LayoutItem *  parent = 0 
) [explicit]

Creates a new box layout which lays items out in the specified direction.

Definition at line 277 of file boxlayout.cpp.

Plasma::BoxLayout::~BoxLayout (  ) 

Definition at line 294 of file boxlayout.cpp.


Member Function Documentation

void Plasma::BoxLayout::setDirection ( Direction  direction  ) 

Sets the direction in which items are laid out.

Definition at line 284 of file boxlayout.cpp.

BoxLayout::Direction Plasma::BoxLayout::direction (  )  const

Returns the direction in which items are laid out.

Definition at line 289 of file boxlayout.cpp.

void Plasma::BoxLayout::insertItem ( int  index,
LayoutItem *  l 
)

Inserts a new item into the layout at the specified index.

Definition at line 334 of file boxlayout.cpp.

void Plasma::BoxLayout::setMultiRow ( bool  b  ) 

Set weither this layout will take severals row.

Definition at line 553 of file boxlayout.cpp.

void Plasma::BoxLayout::addItem ( LayoutItem *  l  )  [virtual]

Adds a Item to this Layout.

Parameters:
l Pointer to the Item to be added.

Implements Plasma::Layout.

Definition at line 355 of file boxlayout.cpp.

void Plasma::BoxLayout::removeItem ( LayoutItem *  l  )  [virtual]

Removes a Item from this Layout.

Parameters:
l Pointer to the Item to be removed.

Implements Plasma::Layout.

Definition at line 364 of file boxlayout.cpp.

int Plasma::BoxLayout::indexOf ( LayoutItem *  l  )  const [virtual]

Returns the index of a Item in this Layout.

Parameters:
l Pointer to an Item to be queryed.

Implements Plasma::Layout.

Definition at line 380 of file boxlayout.cpp.

LayoutItem * Plasma::BoxLayout::itemAt ( int  i  )  const [virtual]

Returns a Pointer to an Item in this Layout.

Parameters:
i Index of the desired Item.

Implements Plasma::Layout.

Definition at line 385 of file boxlayout.cpp.

LayoutItem * Plasma::BoxLayout::takeAt ( int  i  )  [virtual]

Takes the Pointer of an Item in this Layout.

Parameters:
i Index of the desired Item.

Implements Plasma::Layout.

Definition at line 394 of file boxlayout.cpp.

Qt::Orientations Plasma::BoxLayout::expandingDirections (  )  const [virtual]

Returns a bitmask with the directions that this Item can be expanded.

Implements Plasma::LayoutItem.

Definition at line 302 of file boxlayout.cpp.

int Plasma::BoxLayout::count (  )  const [virtual]

Returns the number of elements of this Layout.

Implements Plasma::Layout.

Definition at line 317 of file boxlayout.cpp.

void Plasma::BoxLayout::setAnimator ( LayoutAnimator *  animator  )  [virtual]

Sets the object controlling animation of changes in this layout.

Reimplemented from Plasma::Layout.

Definition at line 322 of file boxlayout.cpp.

QSizeF Plasma::BoxLayout::minimumSize (  )  const [virtual]

Returns the minimum size of this layout.

The default implementation allows unlimited resizing.

Reimplemented from Plasma::Layout.

Definition at line 544 of file boxlayout.cpp.

QSizeF Plasma::BoxLayout::maximumSize (  )  const [virtual]

Returns the maximum size of this layout.

The default implementation allows unlimited resizing.

Reimplemented from Plasma::Layout.

Definition at line 540 of file boxlayout.cpp.

QSizeF Plasma::BoxLayout::sizeHint (  )  const [virtual]

Returns the most appropriate size of this Item to hold whatever contents it has.

Implements Plasma::LayoutItem.

Definition at line 548 of file boxlayout.cpp.

void Plasma::BoxLayout::relayout (  )  [protected, virtual]

Triggers a layout, usually after a change in geometry.

Implements Plasma::Layout.

Definition at line 405 of file boxlayout.cpp.


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

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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