libplasma
Plasma::LayoutItem Class Reference
#include <layoutitem.h>

Detailed Description
Base class for Plasma layout-managed items.All layout-managed items should implement this class, but regular users just need to use Plasma::Widget and Plasma::Layout.
Definition at line 44 of file layoutitem.h.
Public Member Functions | |
| LayoutItem () | |
| virtual | ~LayoutItem () |
| virtual Qt::Orientations | expandingDirections () const =0 |
| virtual QSizeF | minimumSize () const =0 |
| virtual QSizeF | maximumSize () const =0 |
| virtual bool | hasHeightForWidth () const |
| virtual qreal | heightForWidth (qreal w) const |
| virtual bool | hasWidthForHeight () const |
| virtual qreal | widthForHeight (qreal h) const |
| virtual QRectF | geometry () const =0 |
| virtual void | setGeometry (const QRectF &geometry)=0 |
| virtual void | updateGeometry ()=0 |
| virtual QSizeF | sizeHint () const =0 |
| void | setLayout (Layout *layout) |
| Layout * | layout () const |
| void | setManagingLayout (Layout *layout) |
| void | unsetManagingLayout (Layout *layout) |
| Layout * | managingLayout () const |
| virtual QGraphicsItem * | graphicsItem () |
Protected Member Functions | |
| virtual void | managingLayoutChanged () |
Constructor & Destructor Documentation
| Plasma::LayoutItem::LayoutItem | ( | ) | [explicit] |
| Plasma::LayoutItem::~LayoutItem | ( | ) | [virtual] |
Member Function Documentation
| virtual Qt::Orientations Plasma::LayoutItem::expandingDirections | ( | ) | const [pure virtual] |
Returns a bitmask with the directions that this Item can be expanded.
Implemented in Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, Plasma::NodeLayout, Plasma::Label, Plasma::LineEdit, Plasma::PushButton, Plasma::Rectangle, Plasma::SignalPlotter, and Plasma::Widget.
| virtual QSizeF Plasma::LayoutItem::minimumSize | ( | ) | const [pure virtual] |
Returns the minimum size of this Item and it's contents.
Implemented in Plasma::BoxLayout, Plasma::Layout, Plasma::LineEdit, Plasma::PushButton, and Plasma::Widget.
| virtual QSizeF Plasma::LayoutItem::maximumSize | ( | ) | const [pure virtual] |
Returns the maximum size of this Item.
Implemented in Plasma::BoxLayout, Plasma::Layout, Plasma::LineEdit, and Plasma::Widget.
| bool Plasma::LayoutItem::hasHeightForWidth | ( | ) | const [virtual] |
Returns true whatever this Item can use height-for-width layout management, false otherwise.
Reimplemented in Plasma::Label, Plasma::LineEdit, and Plasma::Widget.
Definition at line 66 of file layoutitem.cpp.
| qreal Plasma::LayoutItem::heightForWidth | ( | qreal | w | ) | const [virtual] |
Returns the corresponding height for a given width.
- Parameters:
-
w Width
Reimplemented in Plasma::Label, Plasma::LineEdit, and Plasma::Widget.
Definition at line 71 of file layoutitem.cpp.
| bool Plasma::LayoutItem::hasWidthForHeight | ( | ) | const [virtual] |
Returns true whatever this Item can use width-for-height layout management, false otherwise.
Reimplemented in Plasma::LineEdit, and Plasma::Widget.
Definition at line 77 of file layoutitem.cpp.
| qreal Plasma::LayoutItem::widthForHeight | ( | qreal | h | ) | const [virtual] |
Returns the corresponding width for a given height.
- Parameters:
-
h Height
Reimplemented in Plasma::LineEdit, and Plasma::Widget.
Definition at line 82 of file layoutitem.cpp.
| virtual QRectF Plasma::LayoutItem::geometry | ( | ) | const [pure virtual] |
Returns the geometry of this Item.
Implemented in Plasma::FreeLayout, Plasma::Layout, Plasma::LineEdit, and Plasma::Widget.
| virtual void Plasma::LayoutItem::setGeometry | ( | const QRectF & | geometry | ) | [pure virtual] |
Sets the geometry of this Item.
Implemented in Plasma::Applet, Plasma::Layout, Plasma::LineEdit, Plasma::SignalPlotter, and Plasma::Widget.
| virtual void Plasma::LayoutItem::updateGeometry | ( | ) | [pure virtual] |
Updates the layouting of the item without first changing its geometry.
Calling this may result in a geometry change, but may not, depending on the managing layout if any.
Implemented in Plasma::Layout, Plasma::LineEdit, and Plasma::Widget.
| virtual QSizeF Plasma::LayoutItem::sizeHint | ( | ) | const [pure virtual] |
Returns the most appropriate size of this Item to hold whatever contents it has.
Implemented in Plasma::Applet, Plasma::BorderLayout, Plasma::BoxLayout, Plasma::FlowLayout, Plasma::FreeLayout, Plasma::NodeLayout, Plasma::Label, Plasma::LineEdit, Plasma::Meter, Plasma::ProgressBar, Plasma::PushButton, and Plasma::Widget.
| void Plasma::LayoutItem::setLayout | ( | Layout * | layout | ) |
Sets the layout that will manage children items.
- Parameters:
-
layout The Layout that this LayoutItem will be managed by.
Definition at line 88 of file layoutitem.cpp.
| Layout * Plasma::LayoutItem::layout | ( | ) | const |
- Returns:
- the layout this item is currently associated with.
Definition at line 108 of file layoutitem.cpp.
| void Plasma::LayoutItem::setManagingLayout | ( | Layout * | layout | ) |
Sets the layout that manages this item's geometry.
- Parameters:
-
layout the layout that manage this item's geometry
Definition at line 113 of file layoutitem.cpp.
| void Plasma::LayoutItem::unsetManagingLayout | ( | Layout * | layout | ) |
Resets the layout that manges this item's geometry if it is the currently associated layout.
- Parameters:
-
layout to unset
Definition at line 127 of file layoutitem.cpp.
| Layout * Plasma::LayoutItem::managingLayout | ( | ) | const |
- Returns:
- the layout that manages this item's geometry, or 0 if none
Definition at line 139 of file layoutitem.cpp.
| QGraphicsItem * Plasma::LayoutItem::graphicsItem | ( | ) | [virtual] |
Returns the graphics item associated with this layout item or 0 if there is no associated graphics item.
The default implementation returns 0.
Reimplemented in Plasma::Widget.
Definition at line 61 of file layoutitem.cpp.
| void Plasma::LayoutItem::managingLayoutChanged | ( | ) | [protected, virtual] |
Reimplement to respond to a change in managing layout.
Reimplemented in Plasma::Widget.
Definition at line 135 of file layoutitem.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference