[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: ? about Plasma::Container.setWallpaper();
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2009-03-26 1:56:01
Message-ID: 200903251956.02593.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Wednesday 25 March 2009, David Boosalis wrote:
> The first argument is pluginName, being that the method is setWallpaper, I
> thought it was something like "Air", but in looking at the .cpp for the
> containment class it looks like you first must read a config entry for
> wallpaper plugin and then pass it as this argument.
yes, wallpapers are provided as plugins. currently we have:
* image
* color
we also have some new ones lined up:
* mandelbrot
* virus
you can get a list using Wallpaper::listWAllaperInfo.
the mode in setWallpaper is dependent on the plugin; for instance, the image
plugin provides both SingleImage and Slideshow, as seen in the .desktop file
for it:
Actions=SingleImage;Slideshow;
you can also get this programmaticaly via the wallpaper info.
as for setting the default wallpaper, there are a few ways of doing it. one
is to provide a stock configuration for Image; another is to set the default
wallpaper for the Plasma::Theme, but putting this in the metadata.desktop for
the theme:
[Wallpaper]
defaultWallpaperTheme=themeOrFilePath
there are also some other customizations you can make in there, including
defaultWallpaperSuffix, defaultWallpaperWidth, defaultHeight though you
shouldn't generally require those.
> If I want a container to have a customized wallpaper do I use the
> setWallpaper?
you certainly can. you can also provide your own wallpaper plugin, or you can
skip wallpapers and provide a Containment plugin that just does the background
painting itself.
if you want an image, the easiest is to use the image wallpaper with a
customized theme. iirc, you're putting together a stock embedded type system
so you could just as well provide a default plasma-desktop-appletsrc that has
this information in it and then there's no need to write any code or do
anything else.
e.g. if i were you i'd grab the blankdesktop Containment plugin that is in
trunk/playground/base/plasma/containments/blankdesktop/ and put something like
this in the plasma-desktop-appletsrc:
[$i]
[Containments][1]
plugin=blankdesktop
screen=0
wallpaperplugin=image
wallpaperpluginmode=SingleImage
[Containments][1][Wallpaper][image]
wallpaper=/usr/share/wallpapers/mywallpaper.jpg
that would give you a plasma desktop with nothing on the desktop layer but
mywallpaper.jpg, no panel and everything locked down (the [$i] thing at the
top)
--
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 Qt Software
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic