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

Plasma

DesktopLayout Class Reference

#include <desktoplayout.h>

Inheritance diagram for DesktopLayout:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void addItem (QGraphicsLayoutItem *item, bool pushBack, const QRectF &preferredGeom, const QRectF &lastGeom=QRectF())
void addItem (QGraphicsLayoutItem *item, bool pushBack=true, const QSizeF &size=QSizeF())
int count () const
 DesktopLayout (QGraphicsLayoutItem *parent=0)
QRectF getLastGeometry (int index)
QRectF getPreferredGeometry (int index)
bool getPushBack (int index)
QGraphicsLayoutItem * itemAt (int index) const
void itemGeometryChanged (QGraphicsLayoutItem *layoutItem)
void removeAt (int index)
void setAlignment (Qt::Alignment alignment)
void setAutoWorkingArea (bool value)
void setGeometry (const QRectF &rect)
void setPlacementSpacing (qreal spacing)
void setScreenSpacing (qreal spacing)
void setShiftingSpacing (qreal spacing)
void setTemporaryPlacement (bool enabled)
void setVisibilityTolerance (qreal part)
void setWorkingArea (QRectF area)
QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const

Detailed Description

Definition at line 23 of file desktoplayout.h.


Constructor & Destructor Documentation

DesktopLayout::DesktopLayout ( QGraphicsLayoutItem *  parent = 0  ) 

Definition at line 23 of file desktoplayout.cpp.


Member Function Documentation

void DesktopLayout::addItem ( QGraphicsLayoutItem *  item,
bool  pushBack,
const QRectF &  preferredGeom,
const QRectF &  lastGeom = QRectF() 
)

Adds a previously managed item.

Definition at line 35 of file desktoplayout.cpp.

void DesktopLayout::addItem ( QGraphicsLayoutItem *  item,
bool  pushBack = true,
const QSizeF &  size = QSizeF() 
)

Adds a new item.

The item will be automatically positioned.

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
size the size initial size of the item; if invalid or not supplied, the PreferredSize hint will be used

Definition at line 56 of file desktoplayout.cpp.

int DesktopLayout::count (  )  const

Definition at line 199 of file desktoplayout.cpp.

QRectF DesktopLayout::getLastGeometry ( int  index  ) 

Definition at line 140 of file desktoplayout.cpp.

QRectF DesktopLayout::getPreferredGeometry ( int  index  ) 

Definition at line 131 of file desktoplayout.cpp.

bool DesktopLayout::getPushBack ( int  index  ) 

Definition at line 122 of file desktoplayout.cpp.

QGraphicsLayoutItem * DesktopLayout::itemAt ( int  index  )  const

Definition at line 204 of file desktoplayout.cpp.

void DesktopLayout::itemGeometryChanged ( QGraphicsLayoutItem *  layoutItem  ) 

Checks if the specified item's geometry has been changed externally and sets its preferred position to the current position.

Call this when an item has been manually moved or resized.

Definition at line 314 of file desktoplayout.cpp.

void DesktopLayout::removeAt ( int  index  ) 

Reimplemented from QGraphicsLayout.

Definition at line 213 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 182 of file desktoplayout.cpp.

void DesktopLayout::setAutoWorkingArea ( bool  value  ) 

Sets whether the working area should always be considered the geometry of the managed widget.

Default is on.

Definition at line 194 of file desktoplayout.cpp.

void DesktopLayout::setGeometry ( const QRectF &  rect  ) 

Definition at line 256 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 149 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 154 of file desktoplayout.cpp.

void DesktopLayout::setShiftingSpacing ( qreal  spacing  ) 

Sets spacing between items when items are being pushed around.

Definition at line 160 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 166 of file desktoplayout.cpp.

void DesktopLayout::setWorkingArea ( QRectF  area  ) 

Sets the area of the widget where items can be displayed.

If you turned off auto working area, you have to use this function to adjust it manually every time it changes.

Definition at line 172 of file desktoplayout.cpp.

QSizeF DesktopLayout::sizeHint ( Qt::SizeHint  which,
const QSizeF &  constraint = QSizeF() 
) const

Definition at line 349 of file desktoplayout.cpp.


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

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
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