libplasma
Plasma::Layout Class Reference
#include <layout.h>

Detailed Description
Base class for Plasma Layout managers.All layout managers must implement this class. Normal users should use the specific layouts, like Plasma::VBoxLayout, Plasma::HBoxLayout and Plasma::GridLayout.
Definition at line 45 of file layout.h.
Public Member Functions | |
| Layout (LayoutItem *parent) | |
| virtual | ~Layout () |
| qreal | margin (Plasma::MarginEdge edge) const |
| void | setMargin (Plasma::MarginEdge edge, qreal m) |
| void | setMargin (qreal m) |
| qreal | spacing () const |
| void | setSpacing (qreal s) |
| LayoutItem * | parent () const |
| void | setParent (LayoutItem *parent) |
| virtual int | count () const =0 |
| bool | isEmpty () const |
| virtual void | addItem (LayoutItem *l)=0 |
| virtual void | removeItem (LayoutItem *l)=0 |
| virtual int | indexOf (LayoutItem *l) const =0 |
| virtual LayoutItem * | itemAt (int i) const =0 |
| virtual LayoutItem * | takeAt (int i)=0 |
| virtual LayoutAnimator * | animator () const |
| virtual void | setAnimator (LayoutAnimator *animator) |
| virtual QRectF | geometry () const |
| void | setGeometry (const QRectF &geometry) |
| void | updateGeometry () |
| virtual QSizeF | minimumSize () const |
| virtual QSizeF | maximumSize () const |
| void | invalidate () |
Protected Member Functions | |
| virtual void | relayout ()=0 |
| void | startAnimation () |
Constructor & Destructor Documentation
| Plasma::Layout::Layout | ( | LayoutItem * | parent | ) | [explicit] |
| Plasma::Layout::~Layout | ( | ) | [virtual] |
Member Function Documentation
| qreal Plasma::Layout::margin | ( | Plasma::MarginEdge | edge | ) | const |
| void Plasma::Layout::setMargin | ( | Plasma::MarginEdge | edge, | |
| qreal | m | |||
| ) |
| void Plasma::Layout::setMargin | ( | qreal | m | ) |
| qreal Plasma::Layout::spacing | ( | ) | const |
Returns the spacing between Layout elements of this Layout.
Definition at line 198 of file layout.cpp.
| void Plasma::Layout::setSpacing | ( | qreal | s | ) |
| LayoutItem * Plasma::Layout::parent | ( | ) | const |
| void Plasma::Layout::setParent | ( | LayoutItem * | parent | ) |
| virtual int Plasma::Layout::count | ( | ) | const [pure virtual] |
Returns the number of elements of this Layout.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| bool Plasma::Layout::isEmpty | ( | ) | const |
Returns true if this Layout contains no elements, false otherwise.
Definition at line 85 of file layout.cpp.
| virtual void Plasma::Layout::addItem | ( | LayoutItem * | l | ) | [pure virtual] |
Adds a Item to this Layout.
- Parameters:
-
l Pointer to the Item to be added.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| virtual void Plasma::Layout::removeItem | ( | LayoutItem * | l | ) | [pure virtual] |
Removes a Item from this Layout.
- Parameters:
-
l Pointer to the Item to be removed.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| virtual int Plasma::Layout::indexOf | ( | LayoutItem * | l | ) | const [pure virtual] |
Returns the index of a Item in this Layout.
- Parameters:
-
l Pointer to an Item to be queryed.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| virtual LayoutItem* Plasma::Layout::itemAt | ( | int | i | ) | const [pure virtual] |
Returns a Pointer to an Item in this Layout.
- Parameters:
-
i Index of the desired Item.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| virtual LayoutItem* Plasma::Layout::takeAt | ( | int | i | ) | [pure virtual] |
Takes the Pointer of an Item in this Layout.
- Parameters:
-
i Index of the desired Item.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| LayoutAnimator * Plasma::Layout::animator | ( | ) | const [virtual] |
Returns the object controlling animation of changes in this layout or 0 if no animator has been set.
Definition at line 142 of file layout.cpp.
| void Plasma::Layout::setAnimator | ( | LayoutAnimator * | animator | ) | [virtual] |
Sets the object controlling animation of changes in this layout.
Reimplemented in Plasma::BoxLayout.
Definition at line 147 of file layout.cpp.
| QRectF Plasma::Layout::geometry | ( | ) | const [virtual] |
Returns the current geometry for this layout.
Implements Plasma::LayoutItem.
Reimplemented in Plasma::FreeLayout.
Definition at line 101 of file layout.cpp.
| void Plasma::Layout::setGeometry | ( | const QRectF & | geometry | ) | [virtual] |
Changes the geometry of this layout.
Implements Plasma::LayoutItem.
Definition at line 106 of file layout.cpp.
| void Plasma::Layout::updateGeometry | ( | ) | [virtual] |
Triggers an update of the layout.
Implements Plasma::LayoutItem.
Definition at line 90 of file layout.cpp.
| QSizeF Plasma::Layout::minimumSize | ( | ) | const [virtual] |
Returns the minimum size of this layout.
The default implementation allows unlimited resizing.
Implements Plasma::LayoutItem.
Reimplemented in Plasma::BoxLayout.
Definition at line 213 of file layout.cpp.
| QSizeF Plasma::Layout::maximumSize | ( | ) | const [virtual] |
Returns the maximum size of this layout.
The default implementation allows unlimited resizing.
Implements Plasma::LayoutItem.
Reimplemented in Plasma::BoxLayout.
Definition at line 217 of file layout.cpp.
| void Plasma::Layout::invalidate | ( | ) |
| virtual void Plasma::Layout::relayout | ( | ) | [protected, pure virtual] |
Triggers a layout, usually after a change in geometry.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, and Plasma::NodeLayout.
| void Plasma::Layout::startAnimation | ( | ) | [protected] |
Starts a layout animation.
Subclasses may call this at the end of their relayout() implementation to start the timeline associated with the layout's animator() if there is one. If an animation is already in progress then the timeline is reset to 0ms and the animation continues.
Definition at line 222 of file layout.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference