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

Plasma

Plasma::Wallpaper

Plasma::Wallpaper Class Reference

The base Wallpaper class. More...

#include <Plasma/Wallpaper>

Inheritance diagram for Plasma::Wallpaper:

Inheritance graph
[legend]

List of all members.


Signals

void update (const QRectF &exposedArea)

Public Member Functions

QRectF boundingRect () const
virtual QWidget * createConfigurationInterface (QWidget *parent)
QString icon () const
bool isInitialized () const
QList< KServiceAction > listRenderingModes () const
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
QString name () const
virtual void paint (QPainter *painter, const QRectF &exposedRect)=0
QString pluginName () const
KServiceAction renderingMode () const
void restore (const KConfigGroup &config)
virtual void save (KConfigGroup &config)
void setBoundingRect (const QRectF &boundingRect)
void setRenderingMode (const QString &mode)
virtual void wheelEvent (QGraphicsSceneWheelEvent *event)
 ~Wallpaper ()

Static Public Member Functions

static KPluginInfo::List listWallpaperInfo (const QString &formFactor=QString())
static Wallpaper * load (const KPluginInfo &info, const QVariantList &args=QVariantList())
static Wallpaper * load (const QString &name, const QVariantList &args=QVariantList())

Protected Member Functions

virtual void init (const KConfigGroup &config)
 Wallpaper (QObject *parent, const QVariantList &args)

Properties

QRectF boundingRect
QString icon
QList< KServiceAction > listRenderingModes
QString name
QString pluginName
KServiceAction renderingMode

Detailed Description

The base Wallpaper class.

"Wallpapers" are components that paint the background for Containments that do not provide their own background rendering.

Wallpaper plugins are registered using .desktop files. These files should be named using the following naming scheme:

plasma-wallpaper-<pluginname>.desktop

If a wallpaper plugin provides more than on mode (e.g. Single Image, Wallpaper) it should include a Actions= entry in the .desktop file, listing the possible actions. An actions group should be included to provide for translatable names.

Definition at line 51 of file wallpaper.h.


Constructor & Destructor Documentation

Plasma::Wallpaper::~Wallpaper (  ) 

Definition at line 66 of file wallpaper.cpp.

Plasma::Wallpaper::Wallpaper ( QObject *  parent,
const QVariantList &  args 
) [protected]

This constructor is to be used with the plugin loading systems found in KPluginInfo and KService.

The argument list is expected to have one element: the KService service ID for the desktop entry.

Parameters:
parent a QObject parent; you probably want to pass in 0
args a list of strings containing one entry: the service id

Definition at line 52 of file wallpaper.cpp.


Member Function Documentation

QRectF Plasma::Wallpaper::boundingRect (  )  const

Returns bounding rectangle.

QWidget * Plasma::Wallpaper::createConfigurationInterface ( QWidget *  parent  )  [virtual]

Returns widget for configuration dialog.

Definition at line 214 of file wallpaper.cpp.

QString Plasma::Wallpaper::icon (  )  const

Returns the icon related to this wallpaper.

void Plasma::Wallpaper::init ( const KConfigGroup &  config  )  [protected, virtual]

This method is called once the wallpaper is loaded or mode is changed.

The mode can be retrieved using the renderMode() method.

Parameters:
config Config group to load settings

Definition at line 204 of file wallpaper.cpp.

bool Plasma::Wallpaper::isInitialized (  )  const

Returns:
true if initialized (usually by calling retore), false otherwise

Definition at line 169 of file wallpaper.cpp.

QList<KServiceAction> Plasma::Wallpaper::listRenderingModes (  )  const

Returns modes the wallpaper has, as specified in the .desktop file.

KPluginInfo::List Plasma::Wallpaper::listWallpaperInfo ( const QString &  formFactor = QString()  )  [static]

Returns a list of all known wallpapers.

Returns:
list of wallpapers

Definition at line 71 of file wallpaper.cpp.

Wallpaper * Plasma::Wallpaper::load ( const KPluginInfo &  info,
const QVariantList &  args = QVariantList() 
) [static]

Attempts to load an wallpaper.

Returns a pointer to the wallpaper if successful. The caller takes responsibility for the wallpaper, including deleting it when no longer needed.

Parameters:
info KPluginInfo object for the desired wallpaper
args to send the wallpaper extra arguments
Returns:
a pointer to the loaded wallpaper, or 0 on load failure

Definition at line 115 of file wallpaper.cpp.

Wallpaper * Plasma::Wallpaper::load ( const QString &  name,
const QVariantList &  args = QVariantList() 
) [static]

Attempts to load an wallpaper.

Returns a pointer to the wallpaper if successful. The caller takes responsibility for the wallpaper, including deleting it when no longer needed.

Parameters:
name the plugin name, as returned by KPluginInfo::pluginName()
args to send the wallpaper extra arguments
Returns:
a pointer to the loaded wallpaper, or 0 on load failure

Definition at line 83 of file wallpaper.cpp.

void Plasma::Wallpaper::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event  )  [virtual]

Mouse move event.

To prevent further propagation of the event, the event must be accepted.

Parameters:
event the mouse event object

Definition at line 220 of file wallpaper.cpp.

void Plasma::Wallpaper::mousePressEvent ( QGraphicsSceneMouseEvent *  event  )  [virtual]

Mouse press event.

To prevent further propagation of the even, and to receive mouseMoveEvents, the event must be accepted.

Parameters:
event the mouse event object

Definition at line 225 of file wallpaper.cpp.

void Plasma::Wallpaper::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event  )  [virtual]

Mouse release event.

To prevent further propagation of the event, the event must be accepted.

Parameters:
event the mouse event object

Definition at line 230 of file wallpaper.cpp.

QString Plasma::Wallpaper::name (  )  const

Returns the user-visible name for the wallpaper, as specified in the .desktop file.

Returns:
the user-visible name for the wallpaper.

virtual void Plasma::Wallpaper::paint ( QPainter *  painter,
const QRectF &  exposedRect 
) [pure virtual]

This method is called when the wallpaper should be painted.

Parameters:
painter the QPainter to use to do the painting
exposedRect the rect to paint within

QString Plasma::Wallpaper::pluginName (  )  const

Returns the plugin name for the wallpaper.

KServiceAction Plasma::Wallpaper::renderingMode (  )  const

Returns:
the currently active rendering mode

void Plasma::Wallpaper::restore ( const KConfigGroup &  config  ) 

This method should be called once the wallpaper is loaded or mode is changed.

Parameters:
config Config group to load settings
See also:
init

Definition at line 198 of file wallpaper.cpp.

void Plasma::Wallpaper::save ( KConfigGroup &  config  )  [virtual]

This method is called when settings need to be saved.

Parameters:
config Config group to save settings

Definition at line 209 of file wallpaper.cpp.

void Plasma::Wallpaper::setBoundingRect ( const QRectF &  boundingRect  ) 

Sets bounding rectangle.

Definition at line 174 of file wallpaper.cpp.

void Plasma::Wallpaper::setRenderingMode ( const QString &  mode  ) 

Sets the rendering mode for this wallpaper.

Parameters:
mode One of the modes supported by the plugin, or an empty string for the default mode.

Definition at line 179 of file wallpaper.cpp.

void Plasma::Wallpaper::update ( const QRectF &  exposedArea  )  [signal]

This signal indicates that wallpaper needs to be repainted.

void Plasma::Wallpaper::wheelEvent ( QGraphicsSceneWheelEvent *  event  )  [virtual]

Mouse wheel event.

To prevent further propagation of the event, the event must be accepted.

Parameters:
event the wheel event object

Definition at line 235 of file wallpaper.cpp.


Property Documentation

QRectF Plasma::Wallpaper::boundingRect [read, write]

Definition at line 54 of file wallpaper.h.

QString Plasma::Wallpaper::icon [read]

Definition at line 57 of file wallpaper.h.

QList< KServiceAction > Plasma::Wallpaper::listRenderingModes [read]

Definition at line 59 of file wallpaper.h.

QString Plasma::Wallpaper::name [read]

Definition at line 55 of file wallpaper.h.

QString Plasma::Wallpaper::pluginName [read]

Definition at line 56 of file wallpaper.h.

KServiceAction Plasma::Wallpaper::renderingMode [read]

Definition at line 58 of file wallpaper.h.


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

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs 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