Plasma
DesktopLayout Class Reference
#include <desktoplayout.h>

Public Types | |
| enum | ItemTransformType { ItemTransformUser = 1, ItemTransformSelf = 2 } |
Public Member Functions | |
| DesktopLayout () | |
| void | addItem (QGraphicsWidget *item, bool pushBack=true, bool position=true) |
| void | adjustPhysicalPositions () |
| int | count () const |
| QRectF | getLastGeometry (int index) |
| QPointF | getPreferredPosition (int index) |
| bool | getPushBack (int index) |
| QGraphicsWidget * | itemAt (int index) const |
| void | itemTransformed (QGraphicsWidget *item, ItemTransformType type) |
| void | removeAt (int index) |
| void | setAlignment (Qt::Alignment alignment) |
| void | setPlacementSpacing (qreal spacing) |
| void | setScreenSpacing (qreal spacing) |
| void | setShiftingSpacing (qreal spacing) |
| void | setTemporaryPlacement (bool enabled) |
| void | setVisibilityTolerance (qreal part) |
| void | setWorkingArea (QRectF area) |
Detailed Description
Definition at line 21 of file desktoplayout.h.
Member Enumeration Documentation
Definition at line 86 of file desktoplayout.h.
Constructor & Destructor Documentation
| DesktopLayout::DesktopLayout | ( | ) |
Definition at line 23 of file desktoplayout.cpp.
Member Function Documentation
| void DesktopLayout::addItem | ( | QGraphicsWidget * | item, | |
| bool | pushBack = true, |
|||
| bool | position = true | |||
| ) |
Adds a new item.
- Parameters:
-
item the item to add pushBack if the item should attempt to always be in its preferred position; if false, it will only move when pushed by other items or edges of the working area position if the item should be repositioned
Definition at line 32 of file desktoplayout.cpp.
| void DesktopLayout::adjustPhysicalPositions | ( | ) |
Adjusts the items' on-screen positions to match calculations.
Definition at line 289 of file desktoplayout.cpp.
| int DesktopLayout::count | ( | ) | const |
Returns the count of items in the layout.
Definition at line 193 of file desktoplayout.cpp.
| QRectF DesktopLayout::getLastGeometry | ( | int | index | ) |
Definition at line 144 of file desktoplayout.cpp.
| QPointF DesktopLayout::getPreferredPosition | ( | int | index | ) |
Definition at line 135 of file desktoplayout.cpp.
| bool DesktopLayout::getPushBack | ( | int | index | ) |
Definition at line 126 of file desktoplayout.cpp.
| QGraphicsWidget * DesktopLayout::itemAt | ( | int | index | ) | const |
Returns the applet at the specified position.
Definition at line 198 of file desktoplayout.cpp.
| void DesktopLayout::itemTransformed | ( | QGraphicsWidget * | item, | |
| ItemTransformType | type | |||
| ) |
Call this when an item has been moved/resized/transformed either by the user or itself.
- Parameters:
-
item the item affected type whether the change was by the user (ItemTransformUser) or the applet itself (ItemTransformSelf)
Definition at line 335 of file desktoplayout.cpp.
| void DesktopLayout::removeAt | ( | int | index | ) |
Removes the item at the specified position.
The ordering of remaining items after removing one is undefined.
Definition at line 207 of file desktoplayout.cpp.
| void DesktopLayout::setAlignment | ( | Qt::Alignment | alignment | ) |
Sets the alignment.
This defines the sides of the working area where items are pushed inside in case the working area shrinks. Default is Qt::AlignTop|QtAlignLeft which pushes items on the right and the bottom sides.
Definition at line 183 of file desktoplayout.cpp.
| void DesktopLayout::setPlacementSpacing | ( | qreal | spacing | ) |
Sets spacing required between an item and the edge of the working area when a new item is positioned.
Definition at line 153 of file desktoplayout.cpp.
| void DesktopLayout::setScreenSpacing | ( | qreal | spacing | ) |
Sets spacing between an item and the edge of the working area when items are being pushed around and when an item is moved by the user.
Definition at line 158 of file desktoplayout.cpp.
| void DesktopLayout::setShiftingSpacing | ( | qreal | spacing | ) |
Sets spacing between items when items are being pushed around.
Definition at line 163 of file desktoplayout.cpp.
| void DesktopLayout::setTemporaryPlacement | ( | bool | enabled | ) |
Enables or disables temporary placement.
Definition at line 188 of file desktoplayout.cpp.
| void DesktopLayout::setVisibilityTolerance | ( | qreal | part | ) |
Sets the tolerance for temporary placement in terms of surface of the item concerned.
Definition at line 169 of file desktoplayout.cpp.
| void DesktopLayout::setWorkingArea | ( | QRectF | area | ) |
Call this to change the working area.
Definition at line 174 of file desktoplayout.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference