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

Plasma

wallpaper.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2008 by Aaron Seigo <aseigo@kde.org>
00003  *   Copyright 2008 by Petri Damsten <damu@iki.fi>
00004 
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU Library General Public License as
00007  *   published by the Free Software Foundation; either version 2, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details
00014  *
00015  *   You should have received a copy of the GNU Library General Public
00016  *   License along with this program; if not, write to the
00017  *   Free Software Foundation, Inc.,
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 #ifndef PLASMA_WALLPAPER_H
00022 #define PLASMA_WALLPAPER_H
00023 
00024 #include <kplugininfo.h>
00025 
00026 #include <plasma/plasma.h>
00027 #include <plasma/version.h>
00028 
00029 namespace Plasma
00030 {
00031 class WallpaperPrivate;
00032 
00051 class PLASMA_EXPORT Wallpaper : public QObject
00052 {
00053     Q_OBJECT
00054     Q_PROPERTY(QRectF boundingRect READ boundingRect WRITE setBoundingRect)
00055     Q_PROPERTY(QString name READ name)
00056     Q_PROPERTY(QString pluginName READ pluginName)
00057     Q_PROPERTY(QString icon READ icon)
00058     Q_PROPERTY(KServiceAction renderingMode READ renderingMode)
00059     Q_PROPERTY(QList<KServiceAction> listRenderingModes READ listRenderingModes)
00060 
00061     public:
00062         ~Wallpaper();
00063 
00069         static KPluginInfo::List listWallpaperInfo(const QString &formFactor = QString());
00070 
00082         static Wallpaper *load(const QString &name, const QVariantList &args = QVariantList());
00083 
00095         static Wallpaper *load(const KPluginInfo &info, const QVariantList &args = QVariantList());
00096 
00103         QString name() const;
00104 
00108         QString pluginName() const;
00109 
00113         QString icon() const;
00114 
00118         KServiceAction renderingMode() const;
00119 
00120 
00126         void setRenderingMode(const QString &mode);
00127 
00132         QList<KServiceAction> listRenderingModes() const;
00133 
00137         bool isInitialized() const;
00138 
00142         QRectF boundingRect() const;
00143 
00147         void setBoundingRect(const QRectF &boundingRect);
00148 
00155         virtual void paint(QPainter *painter, const QRectF &exposedRect) = 0;
00156 
00162         void restore(const KConfigGroup &config);
00163 
00168         virtual void save(KConfigGroup &config);
00169 
00173         virtual QWidget *createConfigurationInterface(QWidget *parent);
00174 
00181         virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
00182 
00189         virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
00190 
00197         virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
00198 
00205         virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
00206 
00207     Q_SIGNALS:
00211         void update(const QRectF &exposedArea);
00212 
00213     protected:
00222         Wallpaper(QObject *parent, const QVariantList &args);
00223 
00231         virtual void init(const KConfigGroup &config);
00232 
00233     private:
00234         WallpaperPrivate *const d;
00235 };
00236 
00237 } // Plasma namespace
00238 
00242 #define K_EXPORT_PLASMA_WALLPAPER(libname, classname) \
00243 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
00244 K_EXPORT_PLUGIN(factory("plasma_wallpaper_" #libname)) \
00245 K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
00246 
00247 #endif // multiple inclusion guard

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