[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Unable to load images for pushbuttons from relative path
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2009-03-31 16:21:17
Message-ID: 200903311021.18324.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Tuesday 31 March 2009, Eitzenberger Thomas wrote:
> Hi,
>
> someone on #plasma told me i could ask for help via this emailaddr too....
>
> I need a pushbutton in the parley applet to trigger playing the sound file
>
> The button shall show up green if the url is valid and orange if not, grey
> if checking/ongoing
>
> Up to now I was only able to get the pushbutton showing up with the images
> using absolute URLS
>
> I tried with "widgets/play_green.png" "widgets/play_green" and also tried
> to embedd teh images in to the svg file but there I am stranded as the
> PushButton doesnt want a QPixmap but a path QString.....
png files shouldn't be installed into the theme, as it only deals with svg
files.
i can think of a couple of different ways to go about this:
* install the png's into apddata and then use KStandardDirs to find it, e.g.:
KGlobal::dirs()->locate("appdata", "parley/play_green.png");
* put all of the png's into an svg file, install that into the theme as you
have done and then we could add to the widget API something like:
void setImage(const QString &path, const QString &elementId)
that would paint just the svg element from the svg, much as IconWidget does.
this would only work for kde 4.3 and beyond, however.
thoughts?
--
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)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic