RFC: wallpaper and containment handling in 4.2

Aaron J. Seigo aseigo at kde.org
Fri Jul 11 23:58:50 CEST 2008


hi all...

here is my proposal for wallpapers and containments in 4.2:

* the "desktop settings" dialog from DefaultDesktop will move into the plasma 
binary for the time being. this will provide the separation needed to make it 
more generic. it does not belong in Containment or any of its subclasses 
because it will be used to swap between Containment plugins

* the settings dialog will be provided by the View (DesktopView, PanelView, 
etc)

* the settings dialog will allow selecting both between Containment types for 
the current Activity associated with the view as well as selecting the 
Wallpaper plugin for the Containment. this really only requires one more 
combobox in the current dialog (to pick between Containments)

* a wallpaper plugin API will be defined. the api (a QObject subclass) will be 
kept very simple and will provide the following properties:

	QRectF boundingRect -> the geometry to paint into, public read/write
	Plasma::FormFactors formFactors -> the form factors this wallpaper allows, 
public read, protected write; defaults to "All"

the following signals:

	void update(const QRectF &exposed area) -> used to connect to the 
Containments update() method

the following methods:

	void paint(QPainter *painter, const QRectF &exposed area) (public, virtual)
	QWidget *configuration(QWidget *parent) (public, virtual)

* Wallpapers should be ScriptEngine-able

* Containment will support loading and using a wallpaper plugin. assuming a 
wallpaper plugin is used, the wallpaper's paint method will be called from the 
Applet::paint method. there will be a setWallpaper(const QString &pluginName) 
method for setting the paper

* Containment subclasses will be able to define whether or not they support 
arbitrary wallpaper plugins, no wallpaper plugins or a specific set of such 
plugins (by category? by KServiceTypeTrader syntax? hmm...)

* we will need a way to migrate all the applets from one Containment to 
another, destroy the first and set the geometry (and screen and desktop) of the 
second one in its place

* Containments will be able to provide, via their .desktop file, the name of a 
preview picture that we can use, for instance, as an overlay on top of the 
wallpaper preview in the configuration dialog

i await your comments, criticisms and ideas for improvement.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080711/d621bb72/attachment-0001.pgp 


More information about the Panel-devel mailing list