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

Plasma

IconLoader Class Reference

#include <iconloader.h>

Inheritance diagram for IconLoader:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 36 of file iconloader.h.


Public Member Functions

 IconLoader (DefaultDesktop *parent)
 ~IconLoader ()
bool showDeviceIcons ()
void setShowDeviceIcons (bool show)
bool isGridAligned () const
void setGridAligned (bool align)
QSizeF gridSize () const
QPointF findFreePlaceNear (QPointF p)
void alignToGrid (QGraphicsItem *item)
void alignToGrid (QGraphicsItem *item, const QPoint &pos)
QPoint mapToGrid (const QPointF &pos) const
QPointF mapFromGrid (const QPoint &pos) const
void setGridSize (const QSizeF &gridSize)
QSize gridDimensions () const
virtual QList< QAction * > contextActions ()
bool showIcons () const
void setShowIcons (bool iconsVisible)
void changeAlignment (bool horizontal)

Constructor & Destructor Documentation

IconLoader::IconLoader ( DefaultDesktop *  parent  ) 

Definition at line 36 of file iconloader.cpp.

IconLoader::~IconLoader (  ) 

Definition at line 47 of file iconloader.cpp.


Member Function Documentation

bool IconLoader::showDeviceIcons (  ) 

Get whether device icons will be displayed or not.

Returns:
whether device icons will be displayed

void IconLoader::setShowDeviceIcons ( bool  show  ) 

Sets whether to display device icons or not.

Parameters:
show true sets device icons to be displayed.

bool IconLoader::isGridAligned (  )  const

Definition at line 358 of file iconloader.cpp.

void IconLoader::setGridAligned ( bool  align  ) 

Definition at line 363 of file iconloader.cpp.

QSizeF IconLoader::gridSize (  )  const

Definition at line 392 of file iconloader.cpp.

QPointF IconLoader::findFreePlaceNear ( QPointF  p  ) 

Definition at line 292 of file iconloader.cpp.

void IconLoader::alignToGrid ( QGraphicsItem *  item  ) 

Definition at line 375 of file iconloader.cpp.

void IconLoader::alignToGrid ( QGraphicsItem *  item,
const QPoint &  pos 
)

Definition at line 382 of file iconloader.cpp.

QPoint IconLoader::mapToGrid ( const QPointF &  pos  )  const [inline]

Get the grid square index where a point in local coordinates is located.

In normal circustances desktop coordinates is screen position. A grid place is like a square in a checkboard.

Parameters:
pos A point in desktop coordinates
Returns:
The grid 2D index pos is located.

Definition at line 156 of file iconloader.h.

QPointF IconLoader::mapFromGrid ( const QPoint &  pos  )  const [inline]

A grid place is like a square in a checkboard, and this method returns its center point.

So if you want the top left corner gridSize()/2 must be substracted.

Parameters:
pos A grid place index
Returns:
The center point of the grid square indexed by pos.

Definition at line 162 of file iconloader.h.

void IconLoader::setGridSize ( const QSizeF &  gridSize  ) 

Sets the grid size to the nearest size which results in a integer number of grid places.

If the desktop width is 1024 and the desired grid width is 100 the resulting gridSize will be 102.4 because it's the nearest width with a integer number of divisions (10)

  • gridSize The desired grid size to be set.

Definition at line 404 of file iconloader.cpp.

QSize IconLoader::gridDimensions (  )  const

The width and height of the size returned by this method represents the grid places a Applet can be placed.

A grid place is like a square in a checkboard, this size represents the white and black squares for each border.

Returns:
The grid places for each dimension

Definition at line 397 of file iconloader.cpp.

QList< QAction * > IconLoader::contextActions (  )  [virtual]

The actions associated with the menu.

Returns:
The menu items relating to icons.

Definition at line 93 of file iconloader.cpp.

bool IconLoader::showIcons (  )  const

Definition at line 419 of file iconloader.cpp.

void IconLoader::setShowIcons ( bool  iconsVisible  ) 

Definition at line 424 of file iconloader.cpp.

void IconLoader::changeAlignment ( bool  horizontal  ) 

Definition at line 118 of file iconloader.cpp.


The documentation for this class was generated from the following files:
  • iconloader.h
  • iconloader.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
  •   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